Merge pull request 'mesh-build-go reads a compose ask's gzip-packed request (issue 1966, recovery; group with mesh-delivery)' (#640) from fix/1966-checker-compositions-objects into main

This commit was merged in pull request #640.
This commit is contained in:
2026-11-09 16:31:22 +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 { if err != nil {
return nil, err 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 { if err != nil {
return nil, buildstep.Refuse("the compose ask %s: %v", a.ID, err) return nil, buildstep.Refuse("the compose ask %s: %v", a.ID, err)
} }
@@ -81,6 +81,10 @@ func TestAKeptComposerIsRunWithTheManifestsFilled(t *testing.T) {
} }
fetched := 0 fetched := 0
fetch := func(context.Context, map[string]any) (any, error) { fetched++; return nil, nil } 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) out, err := m.compose(context.Background(), fetch, a)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)