From 8edf57d0a12fece977ea133d4e73d468cecb5d5e Mon Sep 17 00:00:00 2001 From: Justin Chadwell Date: Fri, 25 Nov 2022 17:21:41 +0000 Subject: [PATCH] client: don't clear frontend attributes to send to server Originally, for a Build, we avoided sending any of the FrontendAttrs to the main Solve call, and sent them all to the sub-Solve calls. However, when we added attestations, we had to add an additional Filter, to ensure those args were sent to both locations. While unintuitive, there wasn't logical location to put them, which would have applied to the entire build. This pattern has become fairly common, for instances where the buildkit backend can provide a fallback when the frontend does not support a specified option, for example, with SOURCE_DATE_EPOCH. This means that this filtering must be updated for each instance - instead of this, we can remove the filtering entirely, which should provide for easier upgrade paths going forwards. Signed-off-by: Justin Chadwell --- client/build.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/build.go b/client/build.go index f40d83cc2..2a4bc9e10 100644 --- a/client/build.go +++ b/client/build.go @@ -4,7 +4,6 @@ import ( "context" "github.com/moby/buildkit/client/buildid" - "github.com/moby/buildkit/frontend/attestations" gateway "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/frontend/gateway/grpcclient" gatewayapi "github.com/moby/buildkit/frontend/gateway/pb" @@ -24,7 +23,6 @@ func (c *Client) Build(ctx context.Context, opt SolveOpt, product string, buildF feOpts := opt.FrontendAttrs opt.Frontend = "" - opt.FrontendAttrs = attestations.Filter(opt.FrontendAttrs) if product == "" { product = apicaps.ExportedProduct