mesh-build-go reads a compose ask's gzip-packed request (issue 1966, recovery; group with mesh-delivery) #640

Merged
mesh-tools merged 1 commits from fix/1966-checker-compositions-objects into main 2026-11-09 16:31:23 +00:00
2 changed files with 9 additions and 1 deletions
@@ -62,7 +62,11 @@ func (m *Module) compose(ctx context.Context, fetch buildstep.StepFunc, a sdkste
if err != nil {
return nil, err
}
req, err := composer.Decode(job.Request)
body, err := job.RequestBytes()
if err != nil {
return nil, buildstep.Refuse("the compose ask %s: %v", a.ID, err)
}
req, err := composer.Decode(body)
if err != nil {
return nil, buildstep.Refuse("the compose ask %s: %v", a.ID, err)
}
@@ -81,6 +81,10 @@ func TestAKeptComposerIsRunWithTheManifestsFilled(t *testing.T) {
}
fetched := 0
fetch := func(context.Context, map[string]any) (any, error) { fetched++; return nil, nil }
// Issue 1966: the request arrives gzip-packed, as the checker sends one over the bus's message limit.
if err := a.Compose.PackRequest(a.Compose.Request); err != nil {
t.Fatal(err)
}
out, err := m.compose(context.Background(), fetch, a)
if err != nil {
t.Fatal(err)