diff --git a/client/build.go b/client/build.go index 2a4bc9e105d1..5ba648177ec2 100644 --- a/client/build.go +++ b/client/build.go @@ -84,6 +84,11 @@ func (g *gatewayClientForBuild) ResolveImageConfig(ctx context.Context, in *gate return g.gateway.ResolveImageConfig(ctx, in, opts...) } +func (g *gatewayClientForBuild) ResolveSourceMeta(ctx context.Context, in *gatewayapi.ResolveSourceMetaRequest, opts ...grpc.CallOption) (*gatewayapi.ResolveSourceMetaResponse, error) { + ctx = buildid.AppendToOutgoingContext(ctx, g.buildID) + return g.gateway.ResolveSourceMeta(ctx, in, opts...) +} + func (g *gatewayClientForBuild) Solve(ctx context.Context, in *gatewayapi.SolveRequest, opts ...grpc.CallOption) (*gatewayapi.SolveResponse, error) { ctx = buildid.AppendToOutgoingContext(ctx, g.buildID) return g.gateway.Solve(ctx, in, opts...) diff --git a/client/client_test.go b/client/client_test.go index 3a890beb017f..ee4a79646f44 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -41,6 +41,7 @@ import ( intoto "github.com/in-toto/in-toto-golang/in_toto" controlapi "github.com/moby/buildkit/api/services/control" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/exporter/containerimage/exptypes" gateway "github.com/moby/buildkit/frontend/gateway/client" gatewaypb "github.com/moby/buildkit/frontend/gateway/pb" @@ -3061,7 +3062,7 @@ func testSourceDateEpochClamp(t *testing.T, sb integration.Sandbox) { var bboxConfig []byte _, err = c.Build(sb.Context(), SolveOpt{}, "", func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { - _, _, bboxConfig, err = c.ResolveImageConfig(ctx, "docker.io/library/busybox:latest", llb.ResolveImageConfigOpt{}) + _, _, bboxConfig, err = c.ResolveImageConfig(ctx, "docker.io/library/busybox:latest", sourceresolver.Opt{}) if err != nil { return nil, err } @@ -10059,7 +10060,7 @@ func testSourcePolicy(t *testing.T, sb integration.Sandbox) { }, } - ref, dgst, _, err := c.ResolveImageConfig(ctx, origRef, llb.ResolveImageConfigOpt{ + ref, dgst, _, err := c.ResolveImageConfig(ctx, origRef, sourceresolver.Opt{ SourcePolicies: pol, }) if err != nil { diff --git a/client/llb/imagemetaresolver/resolver.go b/client/llb/imagemetaresolver/resolver.go index 8a3a62995493..78ab06616f7a 100644 --- a/client/llb/imagemetaresolver/resolver.go +++ b/client/llb/imagemetaresolver/resolver.go @@ -9,6 +9,7 @@ import ( "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/util/contentutil" "github.com/moby/buildkit/util/imageutil" "github.com/moby/buildkit/version" @@ -70,32 +71,31 @@ type imageMetaResolver struct { } type resolveResult struct { - ref string config []byte dgst digest.Digest } -func (imr *imageMetaResolver) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) { +func (imr *imageMetaResolver) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt) (string, digest.Digest, []byte, error) { imr.locker.Lock(ref) defer imr.locker.Unlock(ref) - platform := opt.Platform - if platform == nil { - platform = imr.platform + platform := imr.platform + if opt.Platform != nil { + platform = opt.Platform } k := imr.key(ref, platform) if res, ok := imr.cache[k]; ok { - return res.ref, res.dgst, res.config, nil + return ref, res.dgst, res.config, nil } - ref, dgst, config, err := imageutil.Config(ctx, ref, imr.resolver, imr.buffer, nil, platform, opt.SourcePolicies) + dgst, config, err := imageutil.Config(ctx, ref, imr.resolver, imr.buffer, nil, platform) if err != nil { return "", "", nil, err } - imr.cache[k] = resolveResult{dgst: dgst, config: config, ref: ref} + imr.cache[k] = resolveResult{dgst: dgst, config: config} return ref, dgst, config, nil } diff --git a/client/llb/resolver.go b/client/llb/resolver.go index 02644f62c78b..da92b5ef084d 100644 --- a/client/llb/resolver.go +++ b/client/llb/resolver.go @@ -1,11 +1,7 @@ package llb import ( - "context" - - spb "github.com/moby/buildkit/sourcepolicy/pb" - digest "github.com/opencontainers/go-digest" - ocispecs "github.com/opencontainers/image-spec/specs-go/v1" + "github.com/moby/buildkit/client/llb/sourceresolver" ) // WithMetaResolver adds a metadata resolver to an image @@ -31,30 +27,4 @@ func WithLayerLimit(l int) ImageOption { } // ImageMetaResolver can resolve image config metadata from a reference -type ImageMetaResolver interface { - ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (string, digest.Digest, []byte, error) -} - -type ResolverType int - -const ( - ResolverTypeRegistry ResolverType = iota - ResolverTypeOCILayout -) - -type ResolveImageConfigOpt struct { - ResolverType - - Platform *ocispecs.Platform - ResolveMode string - LogName string - - Store ResolveImageConfigOptStore - - SourcePolicies []*spb.Policy -} - -type ResolveImageConfigOptStore struct { - SessionID string - StoreID string -} +type ImageMetaResolver = sourceresolver.ImageMetaResolver diff --git a/client/llb/resolver_test.go b/client/llb/resolver_test.go index 49aaf177b99d..e116a2143899 100644 --- a/client/llb/resolver_test.go +++ b/client/llb/resolver_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/containerd/containerd/platforms" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/solver/pb" digest "github.com/opencontainers/go-digest" "github.com/pkg/errors" @@ -74,7 +75,7 @@ type testResolver struct { platform string } -func (r *testResolver) ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (string, digest.Digest, []byte, error) { +func (r *testResolver) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt) (string, digest.Digest, []byte, error) { var img struct { Config struct { Env []string `json:"Env,omitempty"` diff --git a/client/llb/source.go b/client/llb/source.go index 59df9bdbb269..3139a7b4e924 100644 --- a/client/llb/source.go +++ b/client/llb/source.go @@ -10,6 +10,7 @@ import ( "strings" "github.com/distribution/reference" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/apicaps" "github.com/moby/buildkit/util/gitutil" @@ -136,10 +137,11 @@ func Image(ref string, opts ...ImageOption) State { if p == nil { p = c.Platform } - _, _, dt, err := info.metaResolver.ResolveImageConfig(ctx, ref, ResolveImageConfigOpt{ - Platform: p, - ResolveMode: info.resolveMode.String(), - ResolverType: ResolverTypeRegistry, + _, _, dt, err := info.metaResolver.ResolveImageConfig(ctx, ref, sourceresolver.Opt{ + Platform: p, + ImageOpt: &sourceresolver.ResolveImageOpt{ + ResolveMode: info.resolveMode.String(), + }, }) if err != nil { return State{}, err @@ -152,10 +154,11 @@ func Image(ref string, opts ...ImageOption) State { if p == nil { p = c.Platform } - ref, dgst, dt, err := info.metaResolver.ResolveImageConfig(context.TODO(), ref, ResolveImageConfigOpt{ - Platform: p, - ResolveMode: info.resolveMode.String(), - ResolverType: ResolverTypeRegistry, + ref, dgst, dt, err := info.metaResolver.ResolveImageConfig(context.TODO(), ref, sourceresolver.Opt{ + Platform: p, + ImageOpt: &sourceresolver.ResolveImageOpt{ + ResolveMode: info.resolveMode.String(), + }, }) if err != nil { return State{}, err diff --git a/client/llb/sourceresolver/imageresolver.go b/client/llb/sourceresolver/imageresolver.go new file mode 100644 index 000000000000..fa370900886d --- /dev/null +++ b/client/llb/sourceresolver/imageresolver.go @@ -0,0 +1,59 @@ +package sourceresolver + +import ( + "context" + "strings" + + "github.com/distribution/reference" + "github.com/moby/buildkit/solver/pb" + "github.com/moby/buildkit/util/imageutil" + digest "github.com/opencontainers/go-digest" + "github.com/pkg/errors" +) + +type ImageMetaResolver interface { + ResolveImageConfig(ctx context.Context, ref string, opt Opt) (string, digest.Digest, []byte, error) +} + +type imageMetaResolver struct { + mr MetaResolver +} + +var _ ImageMetaResolver = &imageMetaResolver{} + +func NewImageMetaResolver(mr MetaResolver) ImageMetaResolver { + return &imageMetaResolver{ + mr: mr, + } +} + +func (imr *imageMetaResolver) ResolveImageConfig(ctx context.Context, ref string, opt Opt) (string, digest.Digest, []byte, error) { + parsed, err := reference.ParseNormalizedNamed(ref) + if err != nil { + return "", "", nil, errors.Wrapf(err, "could not parse reference %q", ref) + } + ref = parsed.String() + op := &pb.SourceOp{ + Identifier: "docker-image://" + ref, + } + if opt := opt.OCILayoutOpt; opt != nil { + op.Identifier = "oci-layout://" + ref + op.Attrs = map[string]string{} + if opt.Store.SessionID != "" { + op.Attrs[pb.AttrOCILayoutSessionID] = opt.Store.SessionID + } + if opt.Store.StoreID != "" { + op.Attrs[pb.AttrOCILayoutStoreID] = opt.Store.StoreID + } + } + res, err := imr.mr.ResolveSourceMetadata(ctx, op, opt) + if err != nil { + return "", "", nil, errors.Wrapf(err, "failed to resolve source metadata for %s", ref) + } + if res.Image == nil { + return "", "", nil, &imageutil.ResolveToNonImageError{Ref: ref, Updated: res.Op.Identifier} + } + ref = strings.TrimPrefix(res.Op.Identifier, "docker-image://") + ref = strings.TrimPrefix(ref, "oci-layout://") + return ref, res.Image.Digest, res.Image.Config, nil +} diff --git a/client/llb/sourceresolver/types.go b/client/llb/sourceresolver/types.go new file mode 100644 index 000000000000..dc8b586a12e0 --- /dev/null +++ b/client/llb/sourceresolver/types.go @@ -0,0 +1,54 @@ +package sourceresolver + +import ( + "context" + + "github.com/moby/buildkit/solver/pb" + spb "github.com/moby/buildkit/sourcepolicy/pb" + digest "github.com/opencontainers/go-digest" + ocispecs "github.com/opencontainers/image-spec/specs-go/v1" +) + +type ResolverType int + +const ( + ResolverTypeRegistry ResolverType = iota + ResolverTypeOCILayout +) + +type MetaResolver interface { + ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt Opt) (*MetaResponse, error) +} + +type Opt struct { + LogName string + SourcePolicies []*spb.Policy + Platform *ocispecs.Platform + + ImageOpt *ResolveImageOpt + OCILayoutOpt *ResolveOCILayoutOpt +} + +type MetaResponse struct { + Op *pb.SourceOp + + Image *ResolveImageResponse +} + +type ResolveImageOpt struct { + ResolveMode string +} + +type ResolveImageResponse struct { + Digest digest.Digest + Config []byte +} + +type ResolveOCILayoutOpt struct { + Store ResolveImageConfigOptStore +} + +type ResolveImageConfigOptStore struct { + SessionID string + StoreID string +} diff --git a/control/gateway/gateway.go b/control/gateway/gateway.go index 4a59c48c2546..3012c1e269a1 100644 --- a/control/gateway/gateway.go +++ b/control/gateway/gateway.go @@ -96,6 +96,15 @@ func (gwf *GatewayForwarder) ResolveImageConfig(ctx context.Context, req *gwapi. return fwd.ResolveImageConfig(ctx, req) } +func (gwf *GatewayForwarder) ResolveSourceMeta(ctx context.Context, req *gwapi.ResolveSourceMetaRequest) (*gwapi.ResolveSourceMetaResponse, error) { + fwd, err := gwf.lookupForwarder(ctx) + if err != nil { + return nil, errors.Wrap(err, "forwarding ResolveSourceMeta") + } + + return fwd.ResolveSourceMeta(ctx, req) +} + func (gwf *GatewayForwarder) Solve(ctx context.Context, req *gwapi.SolveRequest) (*gwapi.SolveResponse, error) { fwd, err := gwf.lookupForwarder(ctx) if err != nil { diff --git a/frontend/attestations/sbom/sbom.go b/frontend/attestations/sbom/sbom.go index c52229c2843c..6e90cfdd280c 100644 --- a/frontend/attestations/sbom/sbom.go +++ b/frontend/attestations/sbom/sbom.go @@ -9,6 +9,7 @@ import ( intoto "github.com/in-toto/in-toto-golang/in_toto" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" gatewaypb "github.com/moby/buildkit/frontend/gateway/pb" "github.com/moby/buildkit/solver/result" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" @@ -33,12 +34,13 @@ const ( // attestation. type Scanner func(ctx context.Context, name string, ref llb.State, extras map[string]llb.State, opts ...llb.ConstraintsOpt) (result.Attestation[*llb.State], error) -func CreateSBOMScanner(ctx context.Context, resolver llb.ImageMetaResolver, scanner string, resolveOpt llb.ResolveImageConfigOpt) (Scanner, error) { +func CreateSBOMScanner(ctx context.Context, resolver sourceresolver.MetaResolver, scanner string, resolveOpt sourceresolver.Opt) (Scanner, error) { if scanner == "" { return nil, nil } - scanner, _, dt, err := resolver.ResolveImageConfig(ctx, scanner, resolveOpt) + imr := sourceresolver.NewImageMetaResolver(resolver) + scanner, _, dt, err := imr.ResolveImageConfig(ctx, scanner, resolveOpt) if err != nil { return nil, err } diff --git a/frontend/dockerfile/builder/build.go b/frontend/dockerfile/builder/build.go index e30a273e37fe..a9f4a2f1c539 100644 --- a/frontend/dockerfile/builder/build.go +++ b/frontend/dockerfile/builder/build.go @@ -7,6 +7,7 @@ import ( "github.com/containerd/containerd/platforms" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/exporter/containerimage/image" "github.com/moby/buildkit/frontend" "github.com/moby/buildkit/frontend/attestations/sbom" @@ -101,8 +102,11 @@ func Build(ctx context.Context, c client.Client) (_ *client.Result, err error) { var scanner sbom.Scanner if bc.SBOM != nil { - scanner, err = sbom.CreateSBOMScanner(ctx, c, bc.SBOM.Generator, llb.ResolveImageConfigOpt{ - ResolveMode: opts["image-resolve-mode"], + // TODO: scanner should pass policy + scanner, err = sbom.CreateSBOMScanner(ctx, c, bc.SBOM.Generator, sourceresolver.Opt{ + ImageOpt: &sourceresolver.ResolveImageOpt{ + ResolveMode: opts["image-resolve-mode"], + }, }) if err != nil { return nil, err diff --git a/frontend/dockerfile/dockerfile2llb/convert.go b/frontend/dockerfile/dockerfile2llb/convert.go index 67d662e5793d..e862ec022298 100644 --- a/frontend/dockerfile/dockerfile2llb/convert.go +++ b/frontend/dockerfile/dockerfile2llb/convert.go @@ -20,6 +20,7 @@ import ( "github.com/docker/go-connections/nat" "github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb/imagemetaresolver" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/exporter/containerimage/image" "github.com/moby/buildkit/frontend/dockerfile/instructions" "github.com/moby/buildkit/frontend/dockerfile/parser" @@ -423,12 +424,12 @@ func toDispatchState(ctx context.Context, dt []byte, opt ConvertOpt) (*dispatchS prefix += platforms.Format(*platform) + " " } prefix += "internal]" - mutRef, dgst, dt, err := metaResolver.ResolveImageConfig(ctx, d.stage.BaseName, llb.ResolveImageConfigOpt{ - Platform: platform, - ResolveMode: opt.ImageResolveMode.String(), - LogName: fmt.Sprintf("%s load metadata for %s", prefix, d.stage.BaseName), - ResolverType: llb.ResolverTypeRegistry, - SourcePolicies: nil, + mutRef, dgst, dt, err := metaResolver.ResolveImageConfig(ctx, d.stage.BaseName, sourceresolver.Opt{ + LogName: fmt.Sprintf("%s load metadata for %s", prefix, d.stage.BaseName), + Platform: platform, + ImageOpt: &sourceresolver.ResolveImageOpt{ + ResolveMode: opt.ImageResolveMode.String(), + }, }) if err != nil { return suggest.WrapError(errors.Wrap(err, origName), origName, append(allStageNames, commonImageNames()...), true) diff --git a/frontend/dockerfile/dockerfile_test.go b/frontend/dockerfile/dockerfile_test.go index b60785d1ba44..72c7feaa716f 100644 --- a/frontend/dockerfile/dockerfile_test.go +++ b/frontend/dockerfile/dockerfile_test.go @@ -47,6 +47,7 @@ import ( "github.com/moby/buildkit/session/upload/uploadprovider" "github.com/moby/buildkit/solver/errdefs" "github.com/moby/buildkit/solver/pb" + spb "github.com/moby/buildkit/sourcepolicy/pb" "github.com/moby/buildkit/util/contentutil" "github.com/moby/buildkit/util/testutil" "github.com/moby/buildkit/util/testutil/httpserver" @@ -178,6 +179,7 @@ var allTests = integration.TestFuncs( testCopyUnicodePath, testFrontendDeduplicateSources, testDuplicateLayersProvenance, + testSourcePolicyWithNamedContext, ) // Tests that depend on the `security.*` entitlements @@ -7020,6 +7022,56 @@ COPY test+aou.txt / require.Equal(t, "baz", string(dt)) } +func testSourcePolicyWithNamedContext(t *testing.T, sb integration.Sandbox) { + f := getFrontend(t, sb) + c, err := client.New(sb.Context(), sb.Address()) + require.NoError(t, err) + defer c.Close() + + dockerfile := []byte(` + FROM scratch AS replace + + FROM scratch + COPY --from=replace /foo / + `) + + replaceContext := integration.Tmpdir(t, fstest.CreateFile("foo", []byte("foo"), 0644)) + mainContext := integration.Tmpdir(t, fstest.CreateFile("Dockerfile", dockerfile, 0600)) + + out := t.TempDir() + _, err = f.Solve(sb.Context(), c, client.SolveOpt{ + Exports: []client.ExportEntry{ + {Type: client.ExporterLocal, OutputDir: out}, + }, + FrontendAttrs: map[string]string{ + "context:replace": "docker-image:docker.io/library/alpine:latest", + }, + LocalMounts: map[string]fsutil.FS{ + dockerui.DefaultLocalNameDockerfile: mainContext, + dockerui.DefaultLocalNameContext: mainContext, + "test": replaceContext, + }, + SourcePolicy: &spb.Policy{ + Rules: []*spb.Rule{ + { + Action: spb.PolicyAction_CONVERT, + Selector: &spb.Selector{ + Identifier: "docker-image://docker.io/library/alpine:latest", + }, + Updates: &spb.Update{ + Identifier: "local://test", + }, + }, + }, + }, + }, nil) + require.NoError(t, err) + + dt, err := os.ReadFile(filepath.Join(out, "foo")) + require.NoError(t, err) + require.Equal(t, "foo", string(dt)) +} + func runShell(dir string, cmds ...string) error { for _, args := range cmds { var cmd *exec.Cmd diff --git a/frontend/dockerui/namedcontext.go b/frontend/dockerui/namedcontext.go index 79622d481e0a..5b9913511355 100644 --- a/frontend/dockerui/namedcontext.go +++ b/frontend/dockerui/namedcontext.go @@ -10,6 +10,7 @@ import ( "github.com/distribution/reference" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/exporter/containerimage/exptypes" "github.com/moby/buildkit/exporter/containerimage/image" "github.com/moby/buildkit/frontend/gateway/client" @@ -31,7 +32,8 @@ func (bc *Client) namedContext(ctx context.Context, name string, nameWithPlatfor func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWithPlatform string, opt ContextOpt, count int) (*llb.State, *image.Image, error) { opts := bc.bopts.Opts - v, ok := opts[contextPrefix+nameWithPlatform] + contextKey := contextPrefix + nameWithPlatform + v, ok := opts[contextKey] if !ok { return nil, nil, nil } @@ -71,16 +73,23 @@ func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWi named = reference.TagNameOnly(named) - ref, dgst, data, err := bc.client.ResolveImageConfig(ctx, named.String(), llb.ResolveImageConfigOpt{ - Platform: opt.Platform, - ResolveMode: opt.ResolveMode, - LogName: fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, ref), - ResolverType: llb.ResolverTypeRegistry, + ref, dgst, data, err := bc.client.ResolveImageConfig(ctx, named.String(), sourceresolver.Opt{ + LogName: fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, ref), + Platform: opt.Platform, + ImageOpt: &sourceresolver.ResolveImageOpt{ + ResolveMode: opt.ResolveMode, + }, }) if err != nil { e := &imageutil.ResolveToNonImageError{} if errors.As(err, &e) { - return bc.namedContextRecursive(ctx, e.Updated, name, opt, count+1) + before, after, ok := strings.Cut(e.Updated, "://") + if !ok { + return nil, nil, errors.Errorf("could not parse ref: %s", e.Updated) + } + + bc.bopts.Opts[contextKey] = before + ":" + after + return bc.namedContextRecursive(ctx, name, nameWithPlatform, opt, count+1) } return nil, nil, err } @@ -139,15 +148,14 @@ func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWi return nil, nil, errors.Wrapf(err, "could not wrap %q with digest", name) } - // TODO: How should source policy be handled here with a dummy ref? - _, dgst, data, err := bc.client.ResolveImageConfig(ctx, dummyRef.String(), llb.ResolveImageConfigOpt{ - Platform: opt.Platform, - ResolveMode: opt.ResolveMode, - LogName: fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, dummyRef.String()), - ResolverType: llb.ResolverTypeOCILayout, - Store: llb.ResolveImageConfigOptStore{ - SessionID: bc.bopts.SessionID, - StoreID: named.Name(), + _, dgst, data, err := bc.client.ResolveImageConfig(ctx, dummyRef.String(), sourceresolver.Opt{ + LogName: fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, dummyRef.String()), + Platform: opt.Platform, + OCILayoutOpt: &sourceresolver.ResolveOCILayoutOpt{ + Store: sourceresolver.ResolveImageConfigOptStore{ + SessionID: bc.bopts.SessionID, + StoreID: named.Name(), + }, }, }) if err != nil { diff --git a/frontend/frontend.go b/frontend/frontend.go index 6152ee36b9c1..897600d3da93 100644 --- a/frontend/frontend.go +++ b/frontend/frontend.go @@ -3,7 +3,7 @@ package frontend import ( "context" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor" gw "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/session" @@ -22,8 +22,8 @@ type Frontend interface { } type FrontendLLBBridge interface { + sourceresolver.MetaResolver Solve(ctx context.Context, req SolveRequest, sid string) (*Result, error) - ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) Warn(ctx context.Context, dgst digest.Digest, msg string, opts WarnOpts) error } diff --git a/frontend/gateway/client/client.go b/frontend/gateway/client/client.go index 23585de9078e..042d66c9c4a5 100644 --- a/frontend/gateway/client/client.go +++ b/frontend/gateway/client/client.go @@ -6,6 +6,7 @@ import ( "syscall" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/solver/result" spb "github.com/moby/buildkit/sourcepolicy/pb" @@ -26,8 +27,9 @@ func NewResult() *Result { } type Client interface { + sourceresolver.MetaResolver Solve(ctx context.Context, req SolveRequest) (*Result, error) - ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) + ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt) (string, digest.Digest, []byte, error) BuildOpts() BuildOpts Inputs(ctx context.Context) (map[string]llb.State, error) NewContainer(ctx context.Context, req NewContainerRequest) (Container, error) diff --git a/frontend/gateway/forwarder/forward.go b/frontend/gateway/forwarder/forward.go index cc8201c74feb..eeb984fb3edd 100644 --- a/frontend/gateway/forwarder/forward.go +++ b/frontend/gateway/forwarder/forward.go @@ -6,6 +6,7 @@ import ( cacheutil "github.com/moby/buildkit/cache/util" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor" "github.com/moby/buildkit/frontend" "github.com/moby/buildkit/frontend/gateway/client" @@ -94,6 +95,12 @@ func (c *BridgeClient) Solve(ctx context.Context, req client.SolveRequest) (*cli return cRes, nil } + +func (c *BridgeClient) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt) (string, digest.Digest, []byte, error) { + imr := sourceresolver.NewImageMetaResolver(c) + return imr.ResolveImageConfig(ctx, ref, opt) +} + func (c *BridgeClient) loadBuildOpts() client.BuildOpts { wis := c.workers.WorkerInfos() workers := make([]client.WorkerInfo, len(wis)) diff --git a/frontend/gateway/gateway.go b/frontend/gateway/gateway.go index bc0189bdf900..68aa2a893224 100644 --- a/frontend/gateway/gateway.go +++ b/frontend/gateway/gateway.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "log" "net" "os" "path/filepath" @@ -25,6 +26,7 @@ import ( cacheutil "github.com/moby/buildkit/cache/util" "github.com/moby/buildkit/client" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor" "github.com/moby/buildkit/exporter/containerimage/exptypes" "github.com/moby/buildkit/exporter/containerimage/image" @@ -164,7 +166,8 @@ func (gf *gatewayFrontend) Solve(ctx context.Context, llbBridge frontend.Fronten return nil, err } - ref, dgst, config, err := llbBridge.ResolveImageConfig(ctx, reference.TagNameOnly(sourceRef).String(), llb.ResolveImageConfigOpt{}) + imr := sourceresolver.NewImageMetaResolver(llbBridge) + ref, dgst, config, err := imr.ResolveImageConfig(ctx, reference.TagNameOnly(sourceRef).String(), sourceresolver.Opt{}) if err != nil { return nil, err } @@ -554,6 +557,49 @@ type llbBridgeForwarder struct { ctrsMu sync.Mutex } +func (lbf *llbBridgeForwarder) ResolveSourceMeta(ctx context.Context, req *pb.ResolveSourceMetaRequest) (*pb.ResolveSourceMetaResponse, error) { + if req.Source == nil { + return nil, status.Error(codes.InvalidArgument, "source is required") + } + log.Printf("bridge.ResolveSourceMeta: %v", req.Source) + + ctx = tracing.ContextWithSpanFromContext(ctx, lbf.callCtx) + var platform *ocispecs.Platform + if p := req.Platform; p != nil { + platform = &ocispecs.Platform{ + OS: p.OS, + Architecture: p.Architecture, + Variant: p.Variant, + OSVersion: p.OSVersion, + OSFeatures: p.OSFeatures, + } + } + resolveopt := sourceresolver.Opt{ + LogName: req.LogName, + SourcePolicies: req.SourcePolicies, + Platform: platform, + } + resolveopt.ImageOpt = &sourceresolver.ResolveImageOpt{ + ResolveMode: req.ResolveMode, + } + resp, err := lbf.llbBridge.ResolveSourceMetadata(ctx, req.Source, resolveopt) + if err != nil { + return nil, err + } + + r := &pb.ResolveSourceMetaResponse{ + Source: resp.Op, + } + + if resp.Image != nil { + r.Image = &pb.ResolveSourceImageResponse{ + Digest: resp.Image.Digest, + Config: resp.Image.Config, + } + } + return r, nil +} + func (lbf *llbBridgeForwarder) ResolveImageConfig(ctx context.Context, req *pb.ResolveImageConfigRequest) (*pb.ResolveImageConfigResponse, error) { ctx = tracing.ContextWithSpanFromContext(ctx, lbf.callCtx) var platform *ocispecs.Platform @@ -566,17 +612,27 @@ func (lbf *llbBridgeForwarder) ResolveImageConfig(ctx context.Context, req *pb.R OSFeatures: p.OSFeatures, } } - ref, dgst, dt, err := lbf.llbBridge.ResolveImageConfig(ctx, req.Ref, llb.ResolveImageConfigOpt{ - ResolverType: llb.ResolverType(req.ResolverType), - Platform: platform, - ResolveMode: req.ResolveMode, - LogName: req.LogName, - Store: llb.ResolveImageConfigOptStore{ - SessionID: req.SessionID, - StoreID: req.StoreID, - }, + log.Printf("bridge.ResolveImageConfig: %v", req.Ref) + imr := sourceresolver.NewImageMetaResolver(lbf.llbBridge) + resolveopt := sourceresolver.Opt{ + LogName: req.LogName, SourcePolicies: req.SourcePolicies, - }) + Platform: platform, + } + if sourceresolver.ResolverType(req.ResolverType) == sourceresolver.ResolverTypeRegistry { + resolveopt.ImageOpt = &sourceresolver.ResolveImageOpt{ + ResolveMode: req.ResolveMode, + } + } else if sourceresolver.ResolverType(req.ResolverType) == sourceresolver.ResolverTypeOCILayout { + resolveopt.OCILayoutOpt = &sourceresolver.ResolveOCILayoutOpt{ + Store: sourceresolver.ResolveImageConfigOptStore{ + SessionID: req.SessionID, + StoreID: req.StoreID, + }, + } + } + + ref, dgst, dt, err := imr.ResolveImageConfig(ctx, req.Ref, resolveopt) if err != nil { return nil, err } diff --git a/frontend/gateway/grpcclient/client.go b/frontend/gateway/grpcclient/client.go index 5013f9b42f1e..b07b9602eb88 100644 --- a/frontend/gateway/grpcclient/client.go +++ b/frontend/gateway/grpcclient/client.go @@ -12,10 +12,12 @@ import ( "syscall" "time" + distreference "github.com/distribution/reference" "github.com/gogo/googleapis/google/rpc" gogotypes "github.com/gogo/protobuf/types" "github.com/golang/protobuf/ptypes/any" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/frontend/gateway/client" pb "github.com/moby/buildkit/frontend/gateway/pb" "github.com/moby/buildkit/identity" @@ -23,6 +25,7 @@ import ( "github.com/moby/buildkit/util/apicaps" "github.com/moby/buildkit/util/bklog" "github.com/moby/buildkit/util/grpcerrors" + "github.com/moby/buildkit/util/imageutil" "github.com/moby/sys/signal" digest "github.com/opencontainers/go-digest" "github.com/pkg/errors" @@ -479,7 +482,11 @@ func (c *grpcClient) Solve(ctx context.Context, creq client.SolveRequest) (res * return res, nil } -func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) { +func (c *grpcClient) ResolveSourceMetadata(ctx context.Context, op *opspb.SourceOp, opt sourceresolver.Opt) (*sourceresolver.MetaResponse, error) { + if c.caps.Supports(pb.CapSourceMetaResolver) != nil { + return nil, errors.Errorf("fallback not implemented") + } + var p *opspb.Platform if platform := opt.Platform; platform != nil { p = &opspb.Platform{ @@ -491,16 +498,97 @@ func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb } } - resp, err := c.client.ResolveImageConfig(ctx, &pb.ResolveImageConfigRequest{ - ResolverType: int32(opt.ResolverType), - Ref: ref, + req := &pb.ResolveSourceMetaRequest{ + Source: op, Platform: p, - ResolveMode: opt.ResolveMode, LogName: opt.LogName, - SessionID: opt.Store.SessionID, - StoreID: opt.Store.StoreID, SourcePolicies: opt.SourcePolicies, - }) + } + resp, err := c.client.ResolveSourceMeta(ctx, req) + if err != nil { + return nil, err + } + + r := &sourceresolver.MetaResponse{ + Op: resp.Source, + } + if resp.Image != nil { + r.Image = &sourceresolver.ResolveImageResponse{ + Digest: resp.Image.Digest, + Config: resp.Image.Config, + } + } + return r, nil +} + +func (c *grpcClient) resolveImageConfigViaSourceMetadata(ctx context.Context, ref string, opt sourceresolver.Opt, p *opspb.Platform) (string, digest.Digest, []byte, error) { + op := &opspb.SourceOp{ + Identifier: "docker-image://" + ref, + } + if opt.OCILayoutOpt != nil { + named, err := distreference.ParseNormalizedNamed(ref) + if err != nil { + return "", "", nil, err + } + op.Identifier = "oci-layout://" + named.String() + op.Attrs = map[string]string{ + opspb.AttrOCILayoutSessionID: opt.OCILayoutOpt.Store.SessionID, + opspb.AttrOCILayoutStoreID: opt.OCILayoutOpt.Store.StoreID, + } + } + + req := &pb.ResolveSourceMetaRequest{ + Source: op, + Platform: p, + LogName: opt.LogName, + SourcePolicies: opt.SourcePolicies, + } + resp, err := c.client.ResolveSourceMeta(ctx, req) + if err != nil { + return "", "", nil, err + } + if resp.Image == nil { + return "", "", nil, &imageutil.ResolveToNonImageError{Ref: ref, Updated: resp.Source.Identifier} + } + ref = strings.TrimPrefix(resp.Source.Identifier, "docker-image://") + ref = strings.TrimPrefix(ref, "oci-layout://") + return ref, resp.Image.Digest, resp.Image.Config, nil +} + +func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt) (string, digest.Digest, []byte, error) { + var p *opspb.Platform + if platform := opt.Platform; platform != nil { + p = &opspb.Platform{ + OS: platform.OS, + Architecture: platform.Architecture, + Variant: platform.Variant, + OSVersion: platform.OSVersion, + OSFeatures: platform.OSFeatures, + } + } + + if c.caps.Supports(pb.CapSourceMetaResolver) == nil { + return c.resolveImageConfigViaSourceMetadata(ctx, ref, opt, p) + } + + req := &pb.ResolveImageConfigRequest{ + Ref: ref, + LogName: opt.LogName, + SourcePolicies: opt.SourcePolicies, + Platform: p, + } + if iopt := opt.ImageOpt; iopt != nil { + req.ResolveMode = iopt.ResolveMode + req.ResolverType = int32(sourceresolver.ResolverTypeRegistry) + } + + if iopt := opt.OCILayoutOpt; iopt != nil { + req.ResolverType = int32(sourceresolver.ResolverTypeOCILayout) + req.StoreID = iopt.Store.StoreID + req.SessionID = iopt.Store.SessionID + } + + resp, err := c.client.ResolveImageConfig(ctx, req) if err != nil { return "", "", nil, err } diff --git a/frontend/gateway/pb/caps.go b/frontend/gateway/pb/caps.go index 14c6c71ab0f3..006aeee2ec24 100644 --- a/frontend/gateway/pb/caps.go +++ b/frontend/gateway/pb/caps.go @@ -68,6 +68,10 @@ const ( // CapAttestations is the capability to indicate that attestation // references will be attached to results CapAttestations apicaps.CapID = "reference.attestations" + + // CapSourceMetaResolver is the capability to indicates support for ResolveSourceMetadata + // function in gateway API + CapSourceMetaResolver apicaps.CapID = "source.metaresolver" ) func init() { @@ -231,4 +235,11 @@ func init() { Enabled: true, Status: apicaps.CapStatusExperimental, }) + + Caps.Init(apicaps.Cap{ + ID: CapSourceMetaResolver, + Name: "source meta resolver", + Enabled: true, + Status: apicaps.CapStatusExperimental, + }) } diff --git a/frontend/gateway/pb/gateway.pb.go b/frontend/gateway/pb/gateway.pb.go index 6aedaadab930..7e759b019aca 100644 --- a/frontend/gateway/pb/gateway.pb.go +++ b/frontend/gateway/pb/gateway.pb.go @@ -894,6 +894,188 @@ func (m *ResolveImageConfigResponse) GetRef() string { return "" } +type ResolveSourceMetaRequest struct { + Source *pb.SourceOp `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` + Platform *pb.Platform `protobuf:"bytes,2,opt,name=Platform,proto3" json:"Platform,omitempty"` + LogName string `protobuf:"bytes,3,opt,name=LogName,proto3" json:"LogName,omitempty"` + ResolveMode string `protobuf:"bytes,4,opt,name=ResolveMode,proto3" json:"ResolveMode,omitempty"` + SourcePolicies []*pb1.Policy `protobuf:"bytes,8,rep,name=SourcePolicies,proto3" json:"SourcePolicies,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResolveSourceMetaRequest) Reset() { *m = ResolveSourceMetaRequest{} } +func (m *ResolveSourceMetaRequest) String() string { return proto.CompactTextString(m) } +func (*ResolveSourceMetaRequest) ProtoMessage() {} +func (*ResolveSourceMetaRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{13} +} +func (m *ResolveSourceMetaRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResolveSourceMetaRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResolveSourceMetaRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResolveSourceMetaRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResolveSourceMetaRequest.Merge(m, src) +} +func (m *ResolveSourceMetaRequest) XXX_Size() int { + return m.Size() +} +func (m *ResolveSourceMetaRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ResolveSourceMetaRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ResolveSourceMetaRequest proto.InternalMessageInfo + +func (m *ResolveSourceMetaRequest) GetSource() *pb.SourceOp { + if m != nil { + return m.Source + } + return nil +} + +func (m *ResolveSourceMetaRequest) GetPlatform() *pb.Platform { + if m != nil { + return m.Platform + } + return nil +} + +func (m *ResolveSourceMetaRequest) GetLogName() string { + if m != nil { + return m.LogName + } + return "" +} + +func (m *ResolveSourceMetaRequest) GetResolveMode() string { + if m != nil { + return m.ResolveMode + } + return "" +} + +func (m *ResolveSourceMetaRequest) GetSourcePolicies() []*pb1.Policy { + if m != nil { + return m.SourcePolicies + } + return nil +} + +type ResolveSourceMetaResponse struct { + Source *pb.SourceOp `protobuf:"bytes,1,opt,name=Source,proto3" json:"Source,omitempty"` + Image *ResolveSourceImageResponse `protobuf:"bytes,2,opt,name=Image,proto3" json:"Image,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResolveSourceMetaResponse) Reset() { *m = ResolveSourceMetaResponse{} } +func (m *ResolveSourceMetaResponse) String() string { return proto.CompactTextString(m) } +func (*ResolveSourceMetaResponse) ProtoMessage() {} +func (*ResolveSourceMetaResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{14} +} +func (m *ResolveSourceMetaResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResolveSourceMetaResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResolveSourceMetaResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResolveSourceMetaResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResolveSourceMetaResponse.Merge(m, src) +} +func (m *ResolveSourceMetaResponse) XXX_Size() int { + return m.Size() +} +func (m *ResolveSourceMetaResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ResolveSourceMetaResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ResolveSourceMetaResponse proto.InternalMessageInfo + +func (m *ResolveSourceMetaResponse) GetSource() *pb.SourceOp { + if m != nil { + return m.Source + } + return nil +} + +func (m *ResolveSourceMetaResponse) GetImage() *ResolveSourceImageResponse { + if m != nil { + return m.Image + } + return nil +} + +type ResolveSourceImageResponse struct { + Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=Digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"Digest"` + Config []byte `protobuf:"bytes,2,opt,name=Config,proto3" json:"Config,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResolveSourceImageResponse) Reset() { *m = ResolveSourceImageResponse{} } +func (m *ResolveSourceImageResponse) String() string { return proto.CompactTextString(m) } +func (*ResolveSourceImageResponse) ProtoMessage() {} +func (*ResolveSourceImageResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_f1a937782ebbded5, []int{15} +} +func (m *ResolveSourceImageResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResolveSourceImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResolveSourceImageResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResolveSourceImageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResolveSourceImageResponse.Merge(m, src) +} +func (m *ResolveSourceImageResponse) XXX_Size() int { + return m.Size() +} +func (m *ResolveSourceImageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ResolveSourceImageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ResolveSourceImageResponse proto.InternalMessageInfo + +func (m *ResolveSourceImageResponse) GetConfig() []byte { + if m != nil { + return m.Config + } + return nil +} + type SolveRequest struct { Definition *pb.Definition `protobuf:"bytes,1,opt,name=Definition,proto3" json:"Definition,omitempty"` Frontend string `protobuf:"bytes,2,opt,name=Frontend,proto3" json:"Frontend,omitempty"` @@ -920,7 +1102,7 @@ func (m *SolveRequest) Reset() { *m = SolveRequest{} } func (m *SolveRequest) String() string { return proto.CompactTextString(m) } func (*SolveRequest) ProtoMessage() {} func (*SolveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{13} + return fileDescriptor_f1a937782ebbded5, []int{16} } func (m *SolveRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1039,7 +1221,7 @@ func (m *CacheOptionsEntry) Reset() { *m = CacheOptionsEntry{} } func (m *CacheOptionsEntry) String() string { return proto.CompactTextString(m) } func (*CacheOptionsEntry) ProtoMessage() {} func (*CacheOptionsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{14} + return fileDescriptor_f1a937782ebbded5, []int{17} } func (m *CacheOptionsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1096,7 +1278,7 @@ func (m *SolveResponse) Reset() { *m = SolveResponse{} } func (m *SolveResponse) String() string { return proto.CompactTextString(m) } func (*SolveResponse) ProtoMessage() {} func (*SolveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{15} + return fileDescriptor_f1a937782ebbded5, []int{18} } func (m *SolveResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1152,7 +1334,7 @@ func (m *ReadFileRequest) Reset() { *m = ReadFileRequest{} } func (m *ReadFileRequest) String() string { return proto.CompactTextString(m) } func (*ReadFileRequest) ProtoMessage() {} func (*ReadFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{16} + return fileDescriptor_f1a937782ebbded5, []int{19} } func (m *ReadFileRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1214,7 +1396,7 @@ func (m *FileRange) Reset() { *m = FileRange{} } func (m *FileRange) String() string { return proto.CompactTextString(m) } func (*FileRange) ProtoMessage() {} func (*FileRange) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{17} + return fileDescriptor_f1a937782ebbded5, []int{20} } func (m *FileRange) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1268,7 +1450,7 @@ func (m *ReadFileResponse) Reset() { *m = ReadFileResponse{} } func (m *ReadFileResponse) String() string { return proto.CompactTextString(m) } func (*ReadFileResponse) ProtoMessage() {} func (*ReadFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{18} + return fileDescriptor_f1a937782ebbded5, []int{21} } func (m *ReadFileResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1317,7 +1499,7 @@ func (m *ReadDirRequest) Reset() { *m = ReadDirRequest{} } func (m *ReadDirRequest) String() string { return proto.CompactTextString(m) } func (*ReadDirRequest) ProtoMessage() {} func (*ReadDirRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{19} + return fileDescriptor_f1a937782ebbded5, []int{22} } func (m *ReadDirRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1378,7 +1560,7 @@ func (m *ReadDirResponse) Reset() { *m = ReadDirResponse{} } func (m *ReadDirResponse) String() string { return proto.CompactTextString(m) } func (*ReadDirResponse) ProtoMessage() {} func (*ReadDirResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{20} + return fileDescriptor_f1a937782ebbded5, []int{23} } func (m *ReadDirResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1426,7 +1608,7 @@ func (m *StatFileRequest) Reset() { *m = StatFileRequest{} } func (m *StatFileRequest) String() string { return proto.CompactTextString(m) } func (*StatFileRequest) ProtoMessage() {} func (*StatFileRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{21} + return fileDescriptor_f1a937782ebbded5, []int{24} } func (m *StatFileRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1480,7 +1662,7 @@ func (m *StatFileResponse) Reset() { *m = StatFileResponse{} } func (m *StatFileResponse) String() string { return proto.CompactTextString(m) } func (*StatFileResponse) ProtoMessage() {} func (*StatFileResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{22} + return fileDescriptor_f1a937782ebbded5, []int{25} } func (m *StatFileResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1527,7 +1709,7 @@ func (m *EvaluateRequest) Reset() { *m = EvaluateRequest{} } func (m *EvaluateRequest) String() string { return proto.CompactTextString(m) } func (*EvaluateRequest) ProtoMessage() {} func (*EvaluateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{23} + return fileDescriptor_f1a937782ebbded5, []int{26} } func (m *EvaluateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1573,7 +1755,7 @@ func (m *EvaluateResponse) Reset() { *m = EvaluateResponse{} } func (m *EvaluateResponse) String() string { return proto.CompactTextString(m) } func (*EvaluateResponse) ProtoMessage() {} func (*EvaluateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{24} + return fileDescriptor_f1a937782ebbded5, []int{27} } func (m *EvaluateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1612,7 +1794,7 @@ func (m *PingRequest) Reset() { *m = PingRequest{} } func (m *PingRequest) String() string { return proto.CompactTextString(m) } func (*PingRequest) ProtoMessage() {} func (*PingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{25} + return fileDescriptor_f1a937782ebbded5, []int{28} } func (m *PingRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1654,7 +1836,7 @@ func (m *PongResponse) Reset() { *m = PongResponse{} } func (m *PongResponse) String() string { return proto.CompactTextString(m) } func (*PongResponse) ProtoMessage() {} func (*PongResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{26} + return fileDescriptor_f1a937782ebbded5, []int{29} } func (m *PongResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1721,7 +1903,7 @@ func (m *WarnRequest) Reset() { *m = WarnRequest{} } func (m *WarnRequest) String() string { return proto.CompactTextString(m) } func (*WarnRequest) ProtoMessage() {} func (*WarnRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{27} + return fileDescriptor_f1a937782ebbded5, []int{30} } func (m *WarnRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1802,7 +1984,7 @@ func (m *WarnResponse) Reset() { *m = WarnResponse{} } func (m *WarnResponse) String() string { return proto.CompactTextString(m) } func (*WarnResponse) ProtoMessage() {} func (*WarnResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{28} + return fileDescriptor_f1a937782ebbded5, []int{31} } func (m *WarnResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1849,7 +2031,7 @@ func (m *NewContainerRequest) Reset() { *m = NewContainerRequest{} } func (m *NewContainerRequest) String() string { return proto.CompactTextString(m) } func (*NewContainerRequest) ProtoMessage() {} func (*NewContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{29} + return fileDescriptor_f1a937782ebbded5, []int{32} } func (m *NewContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1937,7 +2119,7 @@ func (m *NewContainerResponse) Reset() { *m = NewContainerResponse{} } func (m *NewContainerResponse) String() string { return proto.CompactTextString(m) } func (*NewContainerResponse) ProtoMessage() {} func (*NewContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{30} + return fileDescriptor_f1a937782ebbded5, []int{33} } func (m *NewContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1977,7 +2159,7 @@ func (m *ReleaseContainerRequest) Reset() { *m = ReleaseContainerRequest func (m *ReleaseContainerRequest) String() string { return proto.CompactTextString(m) } func (*ReleaseContainerRequest) ProtoMessage() {} func (*ReleaseContainerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{31} + return fileDescriptor_f1a937782ebbded5, []int{34} } func (m *ReleaseContainerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2023,7 +2205,7 @@ func (m *ReleaseContainerResponse) Reset() { *m = ReleaseContainerRespon func (m *ReleaseContainerResponse) String() string { return proto.CompactTextString(m) } func (*ReleaseContainerResponse) ProtoMessage() {} func (*ReleaseContainerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{32} + return fileDescriptor_f1a937782ebbded5, []int{35} } func (m *ReleaseContainerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2073,7 +2255,7 @@ func (m *ExecMessage) Reset() { *m = ExecMessage{} } func (m *ExecMessage) String() string { return proto.CompactTextString(m) } func (*ExecMessage) ProtoMessage() {} func (*ExecMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{33} + return fileDescriptor_f1a937782ebbded5, []int{36} } func (m *ExecMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2230,7 +2412,7 @@ func (m *InitMessage) Reset() { *m = InitMessage{} } func (m *InitMessage) String() string { return proto.CompactTextString(m) } func (*InitMessage) ProtoMessage() {} func (*InitMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{34} + return fileDescriptor_f1a937782ebbded5, []int{37} } func (m *InitMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2313,7 +2495,7 @@ func (m *ExitMessage) Reset() { *m = ExitMessage{} } func (m *ExitMessage) String() string { return proto.CompactTextString(m) } func (*ExitMessage) ProtoMessage() {} func (*ExitMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{35} + return fileDescriptor_f1a937782ebbded5, []int{38} } func (m *ExitMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2366,7 +2548,7 @@ func (m *StartedMessage) Reset() { *m = StartedMessage{} } func (m *StartedMessage) String() string { return proto.CompactTextString(m) } func (*StartedMessage) ProtoMessage() {} func (*StartedMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{36} + return fileDescriptor_f1a937782ebbded5, []int{39} } func (m *StartedMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2405,7 +2587,7 @@ func (m *DoneMessage) Reset() { *m = DoneMessage{} } func (m *DoneMessage) String() string { return proto.CompactTextString(m) } func (*DoneMessage) ProtoMessage() {} func (*DoneMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{37} + return fileDescriptor_f1a937782ebbded5, []int{40} } func (m *DoneMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2447,7 +2629,7 @@ func (m *FdMessage) Reset() { *m = FdMessage{} } func (m *FdMessage) String() string { return proto.CompactTextString(m) } func (*FdMessage) ProtoMessage() {} func (*FdMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{38} + return fileDescriptor_f1a937782ebbded5, []int{41} } func (m *FdMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2509,7 +2691,7 @@ func (m *ResizeMessage) Reset() { *m = ResizeMessage{} } func (m *ResizeMessage) String() string { return proto.CompactTextString(m) } func (*ResizeMessage) ProtoMessage() {} func (*ResizeMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{39} + return fileDescriptor_f1a937782ebbded5, []int{42} } func (m *ResizeMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2565,7 +2747,7 @@ func (m *SignalMessage) Reset() { *m = SignalMessage{} } func (m *SignalMessage) String() string { return proto.CompactTextString(m) } func (*SignalMessage) ProtoMessage() {} func (*SignalMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_f1a937782ebbded5, []int{40} + return fileDescriptor_f1a937782ebbded5, []int{43} } func (m *SignalMessage) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2623,6 +2805,9 @@ func init() { proto.RegisterMapType((map[string]*pb.Definition)(nil), "moby.buildkit.v1.frontend.InputsResponse.DefinitionsEntry") proto.RegisterType((*ResolveImageConfigRequest)(nil), "moby.buildkit.v1.frontend.ResolveImageConfigRequest") proto.RegisterType((*ResolveImageConfigResponse)(nil), "moby.buildkit.v1.frontend.ResolveImageConfigResponse") + proto.RegisterType((*ResolveSourceMetaRequest)(nil), "moby.buildkit.v1.frontend.ResolveSourceMetaRequest") + proto.RegisterType((*ResolveSourceMetaResponse)(nil), "moby.buildkit.v1.frontend.ResolveSourceMetaResponse") + proto.RegisterType((*ResolveSourceImageResponse)(nil), "moby.buildkit.v1.frontend.ResolveSourceImageResponse") proto.RegisterType((*SolveRequest)(nil), "moby.buildkit.v1.frontend.SolveRequest") proto.RegisterMapType((map[string]*pb.Definition)(nil), "moby.buildkit.v1.frontend.SolveRequest.FrontendInputsEntry") proto.RegisterMapType((map[string]string)(nil), "moby.buildkit.v1.frontend.SolveRequest.FrontendOptEntry") @@ -2659,163 +2844,170 @@ func init() { func init() { proto.RegisterFile("gateway.proto", fileDescriptor_f1a937782ebbded5) } var fileDescriptor_f1a937782ebbded5 = []byte{ - // 2496 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x59, 0xcf, 0x6f, 0x1b, 0xc7, - 0xf5, 0xd7, 0x8a, 0x14, 0x45, 0x3e, 0xfe, 0x10, 0x3d, 0x71, 0xf2, 0xa5, 0x17, 0x81, 0x23, 0xaf, - 0x63, 0x45, 0x96, 0x1d, 0xd2, 0x5f, 0xd9, 0x86, 0x5c, 0xbb, 0x75, 0x62, 0xfd, 0x82, 0x14, 0x4b, - 0x36, 0x3b, 0x72, 0xe1, 0x22, 0x48, 0x81, 0xae, 0xb8, 0x43, 0x6a, 0xeb, 0xd5, 0xee, 0x76, 0x77, - 0x28, 0x59, 0xc9, 0xa9, 0x87, 0x02, 0x45, 0x8e, 0x3d, 0xf4, 0x96, 0x4b, 0x0b, 0xf4, 0xd4, 0x43, - 0xfb, 0x07, 0x34, 0xe7, 0x00, 0xed, 0xa1, 0xe7, 0x1e, 0x82, 0xc2, 0x7f, 0x44, 0x81, 0xde, 0x8a, - 0x37, 0x33, 0x4b, 0x0e, 0x7f, 0x68, 0x45, 0xd6, 0x27, 0xce, 0xbc, 0x79, 0x3f, 0xe6, 0xbd, 0x37, - 0xef, 0xcd, 0x67, 0x96, 0x50, 0xee, 0xd8, 0x9c, 0x9d, 0xda, 0x67, 0xf5, 0x30, 0x0a, 0x78, 0x40, - 0xae, 0x1c, 0x07, 0x87, 0x67, 0xf5, 0xc3, 0xae, 0xeb, 0x39, 0xaf, 0x5c, 0x5e, 0x3f, 0xf9, 0xff, - 0x7a, 0x3b, 0x0a, 0x7c, 0xce, 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ea, 0xad, 0xfa, 0xb9, 0x39, - 0xac, 0x53, 0xd6, 0xde, 0xb7, 0xc3, 0xbe, 0xc8, 0xce, 0x0c, 0x1d, 0x52, 0x42, 0x56, 0x21, 0x13, - 0xb1, 0x76, 0x2d, 0x23, 0x74, 0x5d, 0x4d, 0xd7, 0xb5, 0x33, 0x43, 0x91, 0x99, 0xac, 0x41, 0x16, - 0xb5, 0xd4, 0xb2, 0x42, 0xe8, 0xda, 0x85, 0x1b, 0xd8, 0x99, 0xa1, 0x42, 0x80, 0x3c, 0x85, 0xfc, - 0x31, 0xe3, 0xb6, 0x63, 0x73, 0xbb, 0x06, 0x8b, 0x99, 0xe5, 0xe2, 0x6a, 0x23, 0x55, 0x18, 0x03, - 0x54, 0xdf, 0x57, 0x12, 0x5b, 0x3e, 0x8f, 0xce, 0x68, 0x4f, 0x01, 0x79, 0x09, 0x25, 0x9b, 0x73, - 0x86, 0x51, 0x75, 0x03, 0x3f, 0xae, 0x95, 0x84, 0xc2, 0xbb, 0x17, 0x2b, 0x7c, 0xa2, 0x49, 0x49, - 0xa5, 0x03, 0x8a, 0xcc, 0x47, 0x50, 0x1e, 0xb0, 0x49, 0xaa, 0x90, 0x79, 0xc5, 0xce, 0x64, 0x62, - 0x28, 0x0e, 0xc9, 0x65, 0x98, 0x3b, 0xb1, 0xbd, 0x2e, 0x13, 0x39, 0x28, 0x51, 0x39, 0x79, 0x38, - 0xfb, 0xc0, 0x30, 0x8f, 0xe0, 0xd2, 0x88, 0xfe, 0x31, 0x0a, 0x7e, 0xa4, 0x2b, 0x28, 0xae, 0x7e, - 0x94, 0xb2, 0x6b, 0x5d, 0x9d, 0x66, 0x69, 0x3d, 0x0f, 0xb9, 0x48, 0x38, 0x64, 0xfd, 0xce, 0x80, - 0xea, 0x70, 0xaa, 0xc9, 0xae, 0x4a, 0x92, 0x21, 0xc2, 0x72, 0x7f, 0x8a, 0x53, 0x82, 0x04, 0x15, - 0x18, 0xa1, 0xc2, 0x5c, 0x83, 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 0x1f, 0x05, 0x91, 0x2c, - 0xeb, 0x12, 0x95, 0x13, 0x2c, 0x08, 0x87, 0x71, 0xdb, 0xf5, 0x6a, 0xd9, 0xc5, 0x0c, 0xde, 0xfa, - 0x72, 0x86, 0x99, 0xeb, 0x46, 0x9e, 0x7a, 0x78, 0xe0, 0x90, 0x58, 0x90, 0x75, 0xfd, 0x76, 0x20, - 0xee, 0x3f, 0xd5, 0x16, 0x65, 0x8b, 0xde, 0xf5, 0xdb, 0x01, 0x15, 0x6b, 0xe4, 0x1a, 0xe4, 0x22, - 0xac, 0xbf, 0xb8, 0x36, 0x2f, 0x82, 0x52, 0x40, 0x2e, 0x59, 0xa5, 0x6a, 0xc1, 0xaa, 0x40, 0x49, - 0xfa, 0xad, 0x92, 0xff, 0xa7, 0x59, 0x78, 0xe7, 0x19, 0x3b, 0xdd, 0x48, 0xfc, 0x4a, 0x02, 0xb2, - 0x08, 0xc5, 0x1e, 0x6d, 0x77, 0x53, 0x1d, 0x21, 0x9d, 0x84, 0xc6, 0xf6, 0x83, 0xae, 0xcf, 0x93, - 0x1c, 0x0a, 0x63, 0x82, 0x42, 0xd5, 0x02, 0xb9, 0x01, 0xf3, 0xcf, 0x18, 0x3f, 0x0d, 0xa2, 0x57, - 0xc2, 0xeb, 0xca, 0x6a, 0x11, 0x79, 0x9e, 0x31, 0x8e, 0x08, 0x91, 0x26, 0x6b, 0x08, 0x3b, 0xc3, - 0x04, 0x76, 0x66, 0xc7, 0xc1, 0xce, 0x64, 0x95, 0xac, 0x41, 0xb1, 0x15, 0xf8, 0x31, 0x8f, 0x6c, - 0x17, 0x0d, 0xcf, 0x09, 0xe6, 0x77, 0x91, 0x59, 0x26, 0x76, 0xa3, 0xbf, 0x48, 0x75, 0x4e, 0xb2, - 0x02, 0xc0, 0x5e, 0xf3, 0xc8, 0xde, 0x09, 0xe2, 0xde, 0x13, 0x0d, 0x50, 0x0e, 0x09, 0xbb, 0x4d, - 0xaa, 0xad, 0x62, 0x87, 0x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6, 0xaf, 0xe4, 0x25, 0x64, 0x11, 0xbf, - 0x92, 0xb4, 0x5e, 0xad, 0x01, 0x5c, 0x33, 0xed, 0x4c, 0x0c, 0x00, 0xdf, 0x9f, 0xe1, 0x9d, 0x26, - 0xbe, 0x45, 0xa4, 0xdf, 0x66, 0xda, 0xb7, 0x4b, 0xf3, 0xe6, 0x04, 0x9c, 0x7d, 0xf5, 0xea, 0x1d, - 0xbf, 0x3c, 0xc1, 0x07, 0xc4, 0x8b, 0xd5, 0x0f, 0x7d, 0xaa, 0x0c, 0xa0, 0xa4, 0x43, 0x15, 0x52, - 0x4f, 0x11, 0x1d, 0x83, 0x00, 0xcd, 0xc6, 0xc4, 0xfc, 0xca, 0xe0, 0x57, 0xf8, 0x88, 0x1b, 0x84, - 0x31, 0x64, 0x35, 0x35, 0x1c, 0x63, 0x01, 0x93, 0x79, 0x77, 0x2a, 0x19, 0x65, 0xdc, 0x96, 0x30, - 0x49, 0x41, 0x21, 0x92, 0x7e, 0xeb, 0xf7, 0xe0, 0x94, 0x39, 0x21, 0xdf, 0xb2, 0x71, 0xc7, 0xc0, - 0x73, 0x86, 0xd0, 0x39, 0x55, 0xb7, 0xf6, 0xa6, 0x48, 0x3d, 0x67, 0x3a, 0x06, 0x5f, 0x2f, 0x7d, - 0xf7, 0xe6, 0xaa, 0xf1, 0x8f, 0x37, 0x57, 0x8d, 0x7f, 0xbd, 0xb9, 0x6a, 0x1c, 0xe6, 0xc4, 0x3f, - 0xb2, 0x77, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x83, 0xe1, 0x34, 0x1a, 0x1a, 0x1f, 0x00, 0x00, + // 2607 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x5a, 0xcf, 0x6f, 0x1b, 0xc7, + 0xf5, 0xd7, 0x8a, 0x3f, 0x44, 0x3e, 0xfe, 0x10, 0x3d, 0x71, 0xf2, 0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e, 0x31, 0xfe, 0xfe, 0xf2, 0x8a, 0x71, 0x94, 0x15, 0xff, 0x0e, 0xb8, + 0xf5, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x24, 0x02, 0x46, 0xa6, 0x21, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2832,6 +3024,8 @@ const _ = grpc.SupportPackageIsVersion4 type LLBBridgeClient interface { // apicaps:CapResolveImage ResolveImageConfig(ctx context.Context, in *ResolveImageConfigRequest, opts ...grpc.CallOption) (*ResolveImageConfigResponse, error) + // apicaps:CapSourceMetaResolver + ResolveSourceMeta(ctx context.Context, in *ResolveSourceMetaRequest, opts ...grpc.CallOption) (*ResolveSourceMetaResponse, error) // apicaps:CapSolveBase Solve(ctx context.Context, in *SolveRequest, opts ...grpc.CallOption) (*SolveResponse, error) // apicaps:CapReadFile @@ -2870,6 +3064,15 @@ func (c *lLBBridgeClient) ResolveImageConfig(ctx context.Context, in *ResolveIma return out, nil } +func (c *lLBBridgeClient) ResolveSourceMeta(ctx context.Context, in *ResolveSourceMetaRequest, opts ...grpc.CallOption) (*ResolveSourceMetaResponse, error) { + out := new(ResolveSourceMetaResponse) + err := c.cc.Invoke(ctx, "/moby.buildkit.v1.frontend.LLBBridge/ResolveSourceMeta", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *lLBBridgeClient) Solve(ctx context.Context, in *SolveRequest, opts ...grpc.CallOption) (*SolveResponse, error) { out := new(SolveResponse) err := c.cc.Invoke(ctx, "/moby.buildkit.v1.frontend.LLBBridge/Solve", in, out, opts...) @@ -3004,6 +3207,8 @@ func (c *lLBBridgeClient) Warn(ctx context.Context, in *WarnRequest, opts ...grp type LLBBridgeServer interface { // apicaps:CapResolveImage ResolveImageConfig(context.Context, *ResolveImageConfigRequest) (*ResolveImageConfigResponse, error) + // apicaps:CapSourceMetaResolver + ResolveSourceMeta(context.Context, *ResolveSourceMetaRequest) (*ResolveSourceMetaResponse, error) // apicaps:CapSolveBase Solve(context.Context, *SolveRequest) (*SolveResponse, error) // apicaps:CapReadFile @@ -3032,6 +3237,9 @@ type UnimplementedLLBBridgeServer struct { func (*UnimplementedLLBBridgeServer) ResolveImageConfig(ctx context.Context, req *ResolveImageConfigRequest) (*ResolveImageConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ResolveImageConfig not implemented") } +func (*UnimplementedLLBBridgeServer) ResolveSourceMeta(ctx context.Context, req *ResolveSourceMetaRequest) (*ResolveSourceMetaResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResolveSourceMeta not implemented") +} func (*UnimplementedLLBBridgeServer) Solve(ctx context.Context, req *SolveRequest) (*SolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Solve not implemented") } @@ -3091,6 +3299,24 @@ func _LLBBridge_ResolveImageConfig_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _LLBBridge_ResolveSourceMeta_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResolveSourceMetaRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(LLBBridgeServer).ResolveSourceMeta(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/moby.buildkit.v1.frontend.LLBBridge/ResolveSourceMeta", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(LLBBridgeServer).ResolveSourceMeta(ctx, req.(*ResolveSourceMetaRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _LLBBridge_Solve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SolveRequest) if err := dec(in); err != nil { @@ -3323,6 +3549,10 @@ var _LLBBridge_serviceDesc = grpc.ServiceDesc{ MethodName: "ResolveImageConfig", Handler: _LLBBridge_ResolveImageConfig_Handler, }, + { + MethodName: "ResolveSourceMeta", + Handler: _LLBBridge_ResolveSourceMeta_Handler, + }, { MethodName: "Solve", Handler: _LLBBridge_Solve_Handler, @@ -4165,7 +4395,7 @@ func (m *ResolveImageConfigResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *SolveRequest) Marshal() (dAtA []byte, err error) { +func (m *ResolveSourceMetaRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4175,12 +4405,12 @@ func (m *SolveRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *SolveRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *ResolveSourceMetaRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ResolveSourceMetaRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -4200,50 +4430,221 @@ func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGateway(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x7a + dAtA[i] = 0x42 } } - if m.Evaluate { + if len(m.ResolveMode) > 0 { + i -= len(m.ResolveMode) + copy(dAtA[i:], m.ResolveMode) + i = encodeVarintGateway(dAtA, i, uint64(len(m.ResolveMode))) i-- - if m.Evaluate { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x22 + } + if len(m.LogName) > 0 { + i -= len(m.LogName) + copy(dAtA[i:], m.LogName) + i = encodeVarintGateway(dAtA, i, uint64(len(m.LogName))) i-- - dAtA[i] = 0x70 + dAtA[i] = 0x1a } - if len(m.FrontendInputs) > 0 { - for k := range m.FrontendInputs { - v := m.FrontendInputs[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGateway(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if m.Platform != nil { + { + size, err := m.Platform.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintGateway(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintGateway(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x6a + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 } - if len(m.CacheImports) > 0 { - for iNdEx := len(m.CacheImports) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.CacheImports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResolveSourceMetaResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResolveSourceMetaResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResolveSourceMetaResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Image != nil { + { + size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Source != nil { + { + size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ResolveSourceImageResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResolveSourceImageResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResolveSourceImageResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Config) > 0 { + i -= len(m.Config) + copy(dAtA[i:], m.Config) + i = encodeVarintGateway(dAtA, i, uint64(len(m.Config))) + i-- + dAtA[i] = 0x12 + } + if len(m.Digest) > 0 { + i -= len(m.Digest) + copy(dAtA[i:], m.Digest) + i = encodeVarintGateway(dAtA, i, uint64(len(m.Digest))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SolveRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SolveRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.SourcePolicies) > 0 { + for iNdEx := len(m.SourcePolicies) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SourcePolicies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } + } + if m.Evaluate { + i-- + if m.Evaluate { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if len(m.FrontendInputs) > 0 { + for k := range m.FrontendInputs { + v := m.FrontendInputs[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGateway(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGateway(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGateway(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x6a + } + } + if len(m.CacheImports) > 0 { + for iNdEx := len(m.CacheImports) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.CacheImports[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { return 0, err } i -= size @@ -5425,20 +5826,20 @@ func (m *InitMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x20 } if len(m.Fds) > 0 { - dAtA28 := make([]byte, len(m.Fds)*10) - var j27 int + dAtA32 := make([]byte, len(m.Fds)*10) + var j31 int for _, num := range m.Fds { for num >= 1<<7 { - dAtA28[j27] = uint8(uint64(num)&0x7f | 0x80) + dAtA32[j31] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j27++ + j31++ } - dAtA28[j27] = uint8(num) - j27++ + dAtA32[j31] = uint8(num) + j31++ } - i -= j27 - copy(dAtA[i:], dAtA28[:j27]) - i = encodeVarintGateway(dAtA, i, uint64(j27)) + i -= j31 + copy(dAtA[i:], dAtA32[:j31]) + i = encodeVarintGateway(dAtA, i, uint64(j31)) i-- dAtA[i] = 0x1a } @@ -6070,6 +6471,80 @@ func (m *ResolveImageConfigResponse) Size() (n int) { return n } +func (m *ResolveSourceMetaRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovGateway(uint64(l)) + } + if m.Platform != nil { + l = m.Platform.Size() + n += 1 + l + sovGateway(uint64(l)) + } + l = len(m.LogName) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + l = len(m.ResolveMode) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + if len(m.SourcePolicies) > 0 { + for _, e := range m.SourcePolicies { + l = e.Size() + n += 1 + l + sovGateway(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ResolveSourceMetaResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Source != nil { + l = m.Source.Size() + n += 1 + l + sovGateway(uint64(l)) + } + if m.Image != nil { + l = m.Image.Size() + n += 1 + l + sovGateway(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ResolveSourceImageResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Digest) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + l = len(m.Config) + if l > 0 { + n += 1 + l + sovGateway(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *SolveRequest) Size() (n int) { if m == nil { return 0 @@ -9101,6 +9576,467 @@ func (m *ResolveImageConfigResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *ResolveSourceMetaRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResolveSourceMetaRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResolveSourceMetaRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &pb.SourceOp{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Platform == nil { + m.Platform = &pb.Platform{} + } + if err := m.Platform.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResolveMode", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResolveMode = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourcePolicies", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourcePolicies = append(m.SourcePolicies, &pb1.Policy{}) + if err := m.SourcePolicies[len(m.SourcePolicies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResolveSourceMetaResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResolveSourceMetaResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResolveSourceMetaResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &pb.SourceOp{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &ResolveSourceImageResponse{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResolveSourceImageResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResolveSourceImageResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResolveSourceImageResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Digest = github_com_opencontainers_go_digest.Digest(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGateway + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGateway + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGateway + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Config = append(m.Config[:0], dAtA[iNdEx:postIndex]...) + if m.Config == nil { + m.Config = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGateway(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGateway + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *SolveRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/frontend/gateway/pb/gateway.proto b/frontend/gateway/pb/gateway.proto index 9705ec6f340f..f34d8c6c9c73 100644 --- a/frontend/gateway/pb/gateway.proto +++ b/frontend/gateway/pb/gateway.proto @@ -17,6 +17,8 @@ option (gogoproto.unmarshaler_all) = true; service LLBBridge { // apicaps:CapResolveImage rpc ResolveImageConfig(ResolveImageConfigRequest) returns (ResolveImageConfigResponse); + // apicaps:CapSourceMetaResolver + rpc ResolveSourceMeta(ResolveSourceMetaRequest) returns (ResolveSourceMetaResponse); // apicaps:CapSolveBase rpc Solve(SolveRequest) returns (SolveResponse); // apicaps:CapReadFile @@ -132,6 +134,24 @@ message ResolveImageConfigResponse { string Ref = 3; } +message ResolveSourceMetaRequest { + pb.SourceOp Source = 1; + pb.Platform Platform = 2; + string LogName = 3; + string ResolveMode = 4; + repeated moby.buildkit.v1.sourcepolicy.Policy SourcePolicies = 8; +} + +message ResolveSourceMetaResponse { + pb.SourceOp Source = 1; + ResolveSourceImageResponse Image = 2; +} + +message ResolveSourceImageResponse { + string Digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false]; + bytes Config = 2; +} + message SolveRequest { pb.Definition Definition = 1; string Frontend = 2; diff --git a/solver/llbsolver/bridge.go b/solver/llbsolver/bridge.go index 5fd66c9fb68e..5f1c83bb122c 100644 --- a/solver/llbsolver/bridge.go +++ b/solver/llbsolver/bridge.go @@ -10,7 +10,7 @@ import ( "github.com/mitchellh/hashstructure/v2" "github.com/moby/buildkit/cache/remotecache" "github.com/moby/buildkit/client" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor" resourcestypes "github.com/moby/buildkit/executor/resources/types" "github.com/moby/buildkit/frontend" @@ -351,32 +351,44 @@ func (rp *resultProxy) Result(ctx context.Context) (res solver.CachedResult, err }) } -func (b *llbBridge) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (resolvedRef string, dgst digest.Digest, config []byte, err error) { +func (b *llbBridge) ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt sourceresolver.Opt) (resp *sourceresolver.MetaResponse, err error) { w, err := b.resolveWorker() if err != nil { - return "", "", nil, err + return nil, err } if opt.LogName == "" { - opt.LogName = fmt.Sprintf("resolve image config for %s", ref) + // TODO: better name + opt.LogName = fmt.Sprintf("resolve image config for %s", op.Identifier) } - id := ref // make a deterministic ID for avoiding duplicates - if platform := opt.Platform; platform == nil { - id += platforms.Format(platforms.DefaultSpec()) + id := op.Identifier + if opt.Platform != nil { + id += platforms.Format(*opt.Platform) } else { - id += platforms.Format(*platform) + id += platforms.Format(platforms.DefaultSpec()) } pol, err := loadSourcePolicy(b.builder) if err != nil { - return "", "", nil, err + return nil, err } if pol != nil { opt.SourcePolicies = append(opt.SourcePolicies, pol) } + + if _, err := sourcepolicy.NewEngine(opt.SourcePolicies).Evaluate(ctx, op); err != nil { + return nil, errors.Wrap(err, "could not resolve image due to policy") + } + + // policy is evaluated, so we can remove it from the options + opt.SourcePolicies = nil + err = inBuilderContext(ctx, b.builder, opt.LogName, id, func(ctx context.Context, g session.Group) error { - resolvedRef, dgst, config, err = w.ResolveImageConfig(ctx, ref, opt, b.sm, g) + resp, err = w.ResolveSourceMetadata(ctx, op, opt, b.sm, g) return err }) - return resolvedRef, dgst, config, err + if err != nil { + return nil, err + } + return resp, nil } type lazyCacheManager struct { diff --git a/solver/llbsolver/proc/sbom.go b/solver/llbsolver/proc/sbom.go index 20cdc71dae33..49996d6a9ecf 100644 --- a/solver/llbsolver/proc/sbom.go +++ b/solver/llbsolver/proc/sbom.go @@ -4,6 +4,7 @@ import ( "context" "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor/resources" "github.com/moby/buildkit/exporter/containerimage/exptypes" "github.com/moby/buildkit/frontend" @@ -26,8 +27,10 @@ func SBOMProcessor(scannerRef string, useCache bool, resolveMode string) llbsolv return nil, err } - scanner, err := sbom.CreateSBOMScanner(ctx, s.Bridge(j), scannerRef, llb.ResolveImageConfigOpt{ - ResolveMode: resolveMode, + scanner, err := sbom.CreateSBOMScanner(ctx, s.Bridge(j), scannerRef, sourceresolver.Opt{ + ImageOpt: &sourceresolver.ResolveImageOpt{ + ResolveMode: resolveMode, + }, }) if err != nil { return nil, err diff --git a/solver/llbsolver/provenance.go b/solver/llbsolver/provenance.go index 889b1abf7f03..f5d17b5d8942 100644 --- a/solver/llbsolver/provenance.go +++ b/solver/llbsolver/provenance.go @@ -3,6 +3,7 @@ package llbsolver import ( "context" "fmt" + "log" "strconv" "strings" "sync" @@ -11,7 +12,7 @@ import ( "github.com/containerd/containerd/platforms" "github.com/moby/buildkit/cache" "github.com/moby/buildkit/cache/config" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor/resources" "github.com/moby/buildkit/exporter/containerimage" "github.com/moby/buildkit/exporter/containerimage/exptypes" @@ -133,21 +134,26 @@ func (b *provenanceBridge) findByResult(rp solver.ResultProxy) (*resultWithBridg return nil, false } -func (b *provenanceBridge) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (resolvedRef string, dgst digest.Digest, config []byte, err error) { - ref, dgst, config, err = b.llbBridge.ResolveImageConfig(ctx, ref, opt) +func (b *provenanceBridge) ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt sourceresolver.Opt) (*sourceresolver.MetaResponse, error) { + log.Printf("prov.ResolveSourceMetadata: %#v %#v", op, opt) + resp, err := b.llbBridge.ResolveSourceMetadata(ctx, op, opt) if err != nil { - return "", "", nil, err + return nil, err } - - b.mu.Lock() - b.images = append(b.images, provenance.ImageSource{ - Ref: ref, - Platform: opt.Platform, - Digest: dgst, - Local: opt.ResolverType == llb.ResolverTypeOCILayout, - }) - b.mu.Unlock() - return ref, dgst, config, nil + if img := resp.Image; img != nil { + local := !strings.HasPrefix(resp.Op.Identifier, "docker-image://") + ref := strings.TrimPrefix(resp.Op.Identifier, "docker-image://") + ref = strings.TrimPrefix(ref, "oci-layout://") + b.mu.Lock() + b.images = append(b.images, provenance.ImageSource{ + Ref: ref, + Platform: opt.Platform, + Digest: img.Digest, + Local: local, + }) + b.mu.Unlock() + } + return resp, nil } func (b *provenanceBridge) Solve(ctx context.Context, req frontend.SolveRequest, sid string) (res *frontend.Result, err error) { diff --git a/solver/llbsolver/sourcepolicy.go b/solver/llbsolver/sourcepolicy.go index 11a49616b301..ac61bb547aac 100644 --- a/solver/llbsolver/sourcepolicy.go +++ b/solver/llbsolver/sourcepolicy.go @@ -7,5 +7,5 @@ import ( ) type SourcePolicyEvaluator interface { - Evaluate(ctx context.Context, op *pb.Op) (bool, error) + Evaluate(ctx context.Context, op *pb.SourceOp) (bool, error) } diff --git a/solver/llbsolver/vertex.go b/solver/llbsolver/vertex.go index d34e2a21188c..c58eb135e7d7 100644 --- a/solver/llbsolver/vertex.go +++ b/solver/llbsolver/vertex.go @@ -253,7 +253,7 @@ func loadLLB(ctx context.Context, def *pb.Definition, polEngine SourcePolicyEval } dgst := digest.FromBytes(dt) if polEngine != nil { - mutated, err := polEngine.Evaluate(ctx, &op) + mutated, err := polEngine.Evaluate(ctx, op.GetSource()) if err != nil { return solver.Edge{}, errors.Wrap(err, "error evaluating the source policy") } diff --git a/source/containerimage/ocilayout.go b/source/containerimage/ocilayout.go index 2cc75f6defd0..7ade6af55788 100644 --- a/source/containerimage/ocilayout.go +++ b/source/containerimage/ocilayout.go @@ -8,7 +8,7 @@ import ( "github.com/containerd/containerd/content" "github.com/containerd/containerd/reference" "github.com/containerd/containerd/remotes" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/session" sessioncontent "github.com/moby/buildkit/session/content" "github.com/moby/buildkit/util/imageutil" @@ -21,7 +21,7 @@ const ( ) // getOCILayoutResolver gets a resolver to an OCI layout for a specified store from the client using the given session. -func getOCILayoutResolver(store llb.ResolveImageConfigOptStore, sm *session.Manager, g session.Group) *ociLayoutResolver { +func getOCILayoutResolver(store sourceresolver.ResolveImageConfigOptStore, sm *session.Manager, g session.Group) *ociLayoutResolver { r := &ociLayoutResolver{ store: store, sm: sm, @@ -32,7 +32,7 @@ func getOCILayoutResolver(store llb.ResolveImageConfigOptStore, sm *session.Mana type ociLayoutResolver struct { remotes.Resolver - store llb.ResolveImageConfigOptStore + store sourceresolver.ResolveImageConfigOptStore sm *session.Manager g session.Group } diff --git a/source/containerimage/pull.go b/source/containerimage/pull.go index 8c0d7a252ef1..d1b72b840178 100644 --- a/source/containerimage/pull.go +++ b/source/containerimage/pull.go @@ -15,7 +15,7 @@ import ( "github.com/containerd/containerd/snapshots" "github.com/moby/buildkit/cache" "github.com/moby/buildkit/client" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/session" "github.com/moby/buildkit/solver" "github.com/moby/buildkit/solver/errdefs" @@ -45,7 +45,7 @@ type puller struct { layerLimit *int vtx solver.Vertex ResolverType - store llb.ResolveImageConfigOptStore + store sourceresolver.ResolveImageConfigOptStore g flightcontrol.Group[struct{}] cacheKeyErr error diff --git a/source/containerimage/source.go b/source/containerimage/source.go index 914cb0be8f7c..ff313315ec27 100644 --- a/source/containerimage/source.go +++ b/source/containerimage/source.go @@ -14,7 +14,7 @@ import ( "github.com/containerd/containerd/remotes/docker" "github.com/moby/buildkit/cache" "github.com/moby/buildkit/client" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/session" "github.com/moby/buildkit/snapshot" "github.com/moby/buildkit/solver" @@ -89,7 +89,7 @@ func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session mode resolver.ResolveMode recordType client.UsageRecordType ref reference.Spec - store llb.ResolveImageConfigOptStore + store sourceresolver.ResolveImageConfigOptStore layerLimit *int ) switch is.ResolverType { @@ -116,7 +116,7 @@ func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session platform = *ociIdentifier.Platform } mode = resolver.ResolveModeForcePull // with OCI layout, we always just "pull" - store = llb.ResolveImageConfigOptStore{ + store = sourceresolver.ResolveImageConfigOptStore{ SessionID: ociIdentifier.SessionID, StoreID: ociIdentifier.StoreID, } @@ -148,44 +148,51 @@ func (is *Source) Resolve(ctx context.Context, id source.Identifier, sm *session return p, nil } -func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (string, digest.Digest, []byte, error) { +func (is *Source) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt, sm *session.Manager, g session.Group) (digest.Digest, []byte, error) { key := ref - if platform := opt.Platform; platform != nil { - key += platforms.Format(*platform) - } var ( rm resolver.ResolveMode rslvr remotes.Resolver err error ) + if platform := opt.Platform; platform != nil { + key += platforms.Format(*platform) + } switch is.ResolverType { case ResolverTypeRegistry: - rm, err = resolver.ParseImageResolveMode(opt.ResolveMode) + iopt := opt.ImageOpt + if iopt == nil { + return "", nil, errors.Errorf("missing imageopt for resolve") + } + rm, err = resolver.ParseImageResolveMode(iopt.ResolveMode) if err != nil { - return "", "", nil, err + return "", nil, err } rslvr = resolver.DefaultPool.GetResolver(is.RegistryHosts, ref, "pull", sm, g).WithImageStore(is.ImageStore, rm) case ResolverTypeOCILayout: + iopt := opt.OCILayoutOpt + if iopt == nil { + return "", nil, errors.Errorf("missing ocilayoutopt for resolve") + } rm = resolver.ResolveModeForcePull - rslvr = getOCILayoutResolver(opt.Store, sm, g) + rslvr = getOCILayoutResolver(iopt.Store, sm, g) } key += rm.String() res, err := is.g.Do(ctx, key, func(ctx context.Context) (*resolveImageResult, error) { - newRef, dgst, dt, err := imageutil.Config(ctx, ref, rslvr, is.ContentStore, is.LeaseManager, opt.Platform, opt.SourcePolicies) + dgst, dt, err := imageutil.Config(ctx, ref, rslvr, is.ContentStore, is.LeaseManager, opt.Platform) if err != nil { return nil, err } - return &resolveImageResult{dgst: dgst, dt: dt, ref: newRef}, nil + return &resolveImageResult{dgst: dgst, dt: dt}, nil }) if err != nil { - return "", "", nil, err + return "", nil, err } - return res.ref, res.dgst, res.dt, nil + return res.dgst, res.dt, nil } type resolveImageResult struct { - ref string dgst digest.Digest dt []byte } diff --git a/sourcepolicy/engine.go b/sourcepolicy/engine.go index 8515b276a416..3b7cbddfdb30 100644 --- a/sourcepolicy/engine.go +++ b/sourcepolicy/engine.go @@ -61,8 +61,8 @@ func (e *Engine) selectorCache(src *spb.Selector) *selectorCache { // This function may error out even if the op was mutated, in which case `true` will be returned along with the error. // // An error is returned when the source is denied by the policy. -func (e *Engine) Evaluate(ctx context.Context, op *pb.Op) (bool, error) { - if len(e.pol) == 0 { +func (e *Engine) Evaluate(ctx context.Context, op *pb.SourceOp) (bool, error) { + if len(e.pol) == 0 || op == nil { return false, nil } @@ -74,15 +74,13 @@ func (e *Engine) Evaluate(ctx context.Context, op *pb.Op) (bool, error) { return mutated, errors.Wrapf(ErrTooManyOps, "too many mutations on a single source") } - srcOp := op.GetSource() - if srcOp == nil { - return false, nil - } if i == 0 { - ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("orig", *srcOp).WithField("updated", op.GetSource())) + ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("orig", *op)) + } else { + ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("updated", *op)) } - mut, err := e.evaluatePolicies(ctx, srcOp) + mut, err := e.evaluatePolicies(ctx, op) if mut { mutated = true } diff --git a/sourcepolicy/engine_test.go b/sourcepolicy/engine_test.go index 512a26efc94a..61875141668d 100644 --- a/sourcepolicy/engine_test.go +++ b/sourcepolicy/engine_test.go @@ -53,12 +53,8 @@ func testLastRuleWins(t *testing.T) { } e := NewEngine(pol) - mut, err := e.Evaluate(context.Background(), &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/busybox:latest", - }, - }, + mut, err := e.Evaluate(context.Background(), &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/busybox:latest", }) require.NoError(t, err) require.False(t, mut) @@ -89,12 +85,8 @@ func testMultiplePolicies(t *testing.T) { } e := NewEngine(pol) - mut, err := e.Evaluate(context.Background(), &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/busybox:latest", - }, - }, + mut, err := e.Evaluate(context.Background(), &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/busybox:latest", }) require.ErrorIs(t, err, ErrSourceDenied) require.False(t, mut) @@ -135,12 +127,8 @@ func testConvertMultiple(t *testing.T) { }, } - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/busybox:latest", - }, - }, + op := &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/busybox:latest", } ctx := context.Background() @@ -169,12 +157,8 @@ func testConvertWildcard(t *testing.T) { }, } - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/golang:1.19", - }, - }, + op := &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/golang:1.19", } ctx := context.Background() @@ -183,7 +167,7 @@ func testConvertWildcard(t *testing.T) { mutated, err := e.Evaluate(ctx, op) require.True(t, mutated) require.NoError(t, err) - require.Equal(t, "docker-image://fakereg.io/library/golang:1.19", op.GetSource().Identifier) + require.Equal(t, "docker-image://fakereg.io/library/golang:1.19", op.Identifier) } func testConvertRegex(t *testing.T) { @@ -202,12 +186,8 @@ func testConvertRegex(t *testing.T) { }, } - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/golang:1.19", - }, - }, + op := &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/golang:1.19", } ctx := context.Background() @@ -216,7 +196,7 @@ func testConvertRegex(t *testing.T) { mutated, err := e.Evaluate(ctx, op) require.True(t, mutated) require.NoError(t, err) - require.Equal(t, "docker-image://fakereg.io/library/golang:1.19", op.GetSource().Identifier) + require.Equal(t, "docker-image://fakereg.io/library/golang:1.19", op.Identifier) } func testConvertHTTP(t *testing.T) { @@ -234,12 +214,8 @@ func testConvertHTTP(t *testing.T) { }, } - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "https://example.com/foo", - }, - }, + op := &pb.SourceOp{ + Identifier: "https://example.com/foo", } ctx := context.Background() @@ -248,7 +224,7 @@ func testConvertHTTP(t *testing.T) { mutated, err := e.Evaluate(ctx, op) require.True(t, mutated) require.NoError(t, err) - require.Equal(t, "https://example.com/foo", op.GetSource().Identifier) + require.Equal(t, "https://example.com/foo", op.Identifier) } func testConvertLoop(t *testing.T) { @@ -275,12 +251,8 @@ func testConvertLoop(t *testing.T) { }, } - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/busybox:latest", - }, - }, + op := &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/busybox:latest", } ctx := context.Background() @@ -324,12 +296,8 @@ func testAllowConvertDeny(t *testing.T) { }, } - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/busybox:latest", - }, - }, + op := &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/busybox:latest", } ctx := context.Background() @@ -338,7 +306,7 @@ func testAllowConvertDeny(t *testing.T) { mutated, err := e.Evaluate(ctx, op) require.True(t, mutated) require.ErrorIs(t, err, ErrSourceDenied) - require.Equal(t, op.GetSource().Identifier, "docker-image://docker.io/library/alpine:latest") + require.Equal(t, op.Identifier, "docker-image://docker.io/library/alpine:latest") } func testConvertDeny(t *testing.T) { @@ -362,12 +330,8 @@ func testConvertDeny(t *testing.T) { }, } - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/busybox:latest", - }, - }, + op := &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/busybox:latest", } ctx := context.Background() @@ -376,7 +340,7 @@ func testConvertDeny(t *testing.T) { mutated, err := e.Evaluate(ctx, op) require.True(t, mutated) require.ErrorIs(t, err, ErrSourceDenied) - require.Equal(t, op.GetSource().Identifier, "docker-image://docker.io/library/alpine:latest") + require.Equal(t, op.Identifier, "docker-image://docker.io/library/alpine:latest") } func testConvert(t *testing.T) { @@ -388,12 +352,8 @@ func testConvert(t *testing.T) { for src, dst := range cases { t.Run(src+"=>"+dst, func(t *testing.T) { - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: src, - }, - }, + op := &pb.SourceOp{ + Identifier: src, } pol := &spb.Policy{ @@ -416,18 +376,14 @@ func testConvert(t *testing.T) { mutated, err := e.Evaluate(ctx, op) require.True(t, mutated) require.NoError(t, err) - require.Equal(t, dst, op.GetSource().Identifier) + require.Equal(t, dst, op.Identifier) }) } } func testAllowDeny(t *testing.T) { - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/alpine:latest", - }, - }, + op := &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/alpine:latest", } pol := &spb.Policy{ Rules: []*spb.Rule{ @@ -453,12 +409,8 @@ func testAllowDeny(t *testing.T) { require.False(t, mutated) require.ErrorIs(t, err, ErrSourceDenied) - op = &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: "docker-image://docker.io/library/busybox:latest", - }, - }, + op = &pb.SourceOp{ + Identifier: "docker-image://docker.io/library/busybox:latest", } mutated, err = e.Evaluate(ctx, op) @@ -489,12 +441,8 @@ func testDenyAll(t *testing.T) { e := NewEngine([]*spb.Policy{pol}) ctx := context.Background() - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: ref, - }, - }, + op := &pb.SourceOp{ + Identifier: ref, } mutated, err := e.Evaluate(ctx, op) diff --git a/util/imageutil/config.go b/util/imageutil/config.go index f7c4182efd6b..2202a5173eee 100644 --- a/util/imageutil/config.go +++ b/util/imageutil/config.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "fmt" - "strings" "sync" "time" @@ -16,10 +15,7 @@ import ( "github.com/containerd/containerd/remotes" "github.com/containerd/containerd/remotes/docker" intoto "github.com/in-toto/in-toto-golang/in_toto" - "github.com/moby/buildkit/solver/pb" srctypes "github.com/moby/buildkit/source/types" - "github.com/moby/buildkit/sourcepolicy" - spb "github.com/moby/buildkit/sourcepolicy/pb" "github.com/moby/buildkit/util/contentutil" "github.com/moby/buildkit/util/leaseutil" "github.com/moby/buildkit/util/resolver/limited" @@ -63,8 +59,7 @@ func (e ResolveToNonImageError) Error() string { return fmt.Sprintf("ref mutated by policy to non-image: %s://%s -> %s", srctypes.DockerImageScheme, e.Ref, e.Updated) } -func Config(ctx context.Context, str string, resolver remotes.Resolver, cache ContentCache, leaseManager leases.Manager, p *ocispecs.Platform, spls []*spb.Policy) (string, digest.Digest, []byte, error) { - // TODO: fix buildkit to take interface instead of struct +func Config(ctx context.Context, str string, resolver remotes.Resolver, cache ContentCache, leaseManager leases.Manager, p *ocispecs.Platform) (digest.Digest, []byte, error) { var platform platforms.MatchComparer if p != nil { platform = platforms.Only(*p) @@ -73,44 +68,13 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co } ref, err := reference.Parse(str) if err != nil { - return "", "", nil, errors.WithStack(err) - } - - op := &pb.Op{ - Op: &pb.Op_Source{ - Source: &pb.SourceOp{ - Identifier: srctypes.DockerImageScheme + "://" + ref.String(), - }, - }, - } - - mut, err := sourcepolicy.NewEngine(spls).Evaluate(ctx, op) - if err != nil { - return "", "", nil, errors.Wrap(err, "could not resolve image due to policy") - } - - if mut { - var ( - t string - ok bool - ) - t, newRef, ok := strings.Cut(op.GetSource().GetIdentifier(), "://") - if !ok { - return "", "", nil, errors.Errorf("could not parse ref: %s", op.GetSource().GetIdentifier()) - } - if ok && t != srctypes.DockerImageScheme { - return "", "", nil, &ResolveToNonImageError{Ref: str, Updated: newRef} - } - ref, err = reference.Parse(newRef) - if err != nil { - return "", "", nil, errors.WithStack(err) - } + return "", nil, errors.WithStack(err) } if leaseManager != nil { ctx2, done, err := leaseutil.WithLease(ctx, leaseManager, leases.WithExpiration(5*time.Minute), leaseutil.MakeTemporary) if err != nil { - return "", "", nil, errors.WithStack(err) + return "", nil, errors.WithStack(err) } ctx = ctx2 defer func() { @@ -141,18 +105,18 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co if desc.MediaType == "" { _, desc, err = resolver.Resolve(ctx, ref.String()) if err != nil { - return "", "", nil, err + return "", nil, err } } fetcher, err := resolver.Fetcher(ctx, ref.String()) if err != nil { - return "", "", nil, err + return "", nil, err } if desc.MediaType == images.MediaTypeDockerSchema1Manifest { dgst, dt, err := readSchema1Config(ctx, ref.String(), desc, fetcher, cache) - return ref.String(), dgst, dt, err + return dgst, dt, err } children := childrenConfigHandler(cache, platform) @@ -160,7 +124,7 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co dslHandler, err := docker.AppendDistributionSourceLabel(cache, ref.String()) if err != nil { - return "", "", nil, err + return "", nil, err } handlers := []images.Handler{ @@ -169,19 +133,19 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co children, } if err := images.Dispatch(ctx, images.Handlers(handlers...), nil, desc); err != nil { - return "", "", nil, err + return "", nil, err } config, err := images.Config(ctx, cache, desc, platform) if err != nil { - return "", "", nil, err + return "", nil, err } dt, err := content.ReadBlob(ctx, cache, config) if err != nil { - return "", "", nil, err + return "", nil, err } - return ref.String(), desc.Digest, dt, nil + return desc.Digest, dt, nil } func childrenConfigHandler(provider content.Provider, platform platforms.MatchComparer) images.HandlerFunc { diff --git a/util/imageutil/config_test.go b/util/imageutil/config_test.go index c63359f9c8f9..9e7201fcec6e 100644 --- a/util/imageutil/config_test.go +++ b/util/imageutil/config_test.go @@ -57,7 +57,7 @@ func TestConfigMultiplatform(t *testing.T) { // Now we should be able to get the amd64 config without fetching anything from the remote // If it tries to fetch from the remote this will error out. const ref = "example.com/test:latest" - _, _, dt, err := Config(ctx, ref, r, cc, nil, &pAmd64, nil) + _, dt, err := Config(ctx, ref, r, cc, nil, &pAmd64) require.NoError(t, err) var cfg ocispecs.Image @@ -67,7 +67,7 @@ func TestConfigMultiplatform(t *testing.T) { // Make sure it doesn't select a non-matching platform pArmv7 := platforms.MustParse("linux/arm/v7") - _, _, _, err = Config(ctx, ref, r, cc, nil, &pArmv7, nil) + _, _, err = Config(ctx, ref, r, cc, nil, &pArmv7) require.ErrorIs(t, err, errdefs.ErrNotFound) } diff --git a/worker/base/worker.go b/worker/base/worker.go index dcea020cb1f8..8072abba21d1 100644 --- a/worker/base/worker.go +++ b/worker/base/worker.go @@ -18,7 +18,7 @@ import ( "github.com/moby/buildkit/cache" "github.com/moby/buildkit/cache/metadata" "github.com/moby/buildkit/client" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor" "github.com/moby/buildkit/executor/resources" "github.com/moby/buildkit/exporter" @@ -365,16 +365,65 @@ func (w *Worker) PruneCacheMounts(ctx context.Context, ids []string) error { return nil } -func (w *Worker) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (string, digest.Digest, []byte, error) { - // is this an registry source? Or an OCI layout source? - switch opt.ResolverType { - case llb.ResolverTypeOCILayout: - return w.OCILayoutSource.ResolveImageConfig(ctx, ref, opt, sm, g) - // we probably should put an explicit case llb.ResolverTypeRegistry and default here, - // but then go complains that we do not have a return statement, - // so we just add it after +func (w *Worker) ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt sourceresolver.Opt, sm *session.Manager, g session.Group) (*sourceresolver.MetaResponse, error) { + if opt.SourcePolicies != nil { + return nil, errors.New("source policies can not be set for worker") } - return w.ImageSource.ResolveImageConfig(ctx, ref, opt, sm, g) + + var platform *pb.Platform + if p := opt.Platform; p != nil { + platform = &pb.Platform{ + Architecture: p.Architecture, + OS: p.OS, + Variant: p.Variant, + OSVersion: p.OSVersion, + } + } + + id, err := w.SourceManager.Identifier(&pb.Op_Source{Source: op}, platform) + if err != nil { + return nil, err + } + + switch idt := id.(type) { + case *containerimage.ImageIdentifier: + if opt.ImageOpt == nil { + opt.ImageOpt = &sourceresolver.ResolveImageOpt{} + } + dgst, config, err := w.ImageSource.ResolveImageConfig(ctx, idt.Reference.String(), opt, sm, g) + if err != nil { + return nil, err + } + return &sourceresolver.MetaResponse{ + Op: op, + Image: &sourceresolver.ResolveImageResponse{ + Digest: dgst, + Config: config, + }, + }, nil + case *containerimage.OCIIdentifier: + opt.OCILayoutOpt = &sourceresolver.ResolveOCILayoutOpt{ + Store: sourceresolver.ResolveImageConfigOptStore{ + StoreID: idt.StoreID, + SessionID: idt.SessionID, + }, + } + dgst, config, err := w.OCILayoutSource.ResolveImageConfig(ctx, idt.Reference.String(), opt, sm, g) + if err != nil { + return nil, err + } + return &sourceresolver.MetaResponse{ + Op: op, + Image: &sourceresolver.ResolveImageResponse{ + Digest: dgst, + Config: config, + }, + }, nil + } + + return &sourceresolver.MetaResponse{ + Op: op, + }, nil } func (w *Worker) DiskUsage(ctx context.Context, opt client.DiskUsageInfo) ([]*client.UsageInfo, error) { diff --git a/worker/worker.go b/worker/worker.go index 8a12585ed9a9..dd336917a4c9 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -6,15 +6,15 @@ import ( "github.com/moby/buildkit/cache" "github.com/moby/buildkit/client" - "github.com/moby/buildkit/client/llb" + "github.com/moby/buildkit/client/llb/sourceresolver" "github.com/moby/buildkit/executor" "github.com/moby/buildkit/exporter" "github.com/moby/buildkit/frontend" "github.com/moby/buildkit/session" containerdsnapshot "github.com/moby/buildkit/snapshot/containerd" "github.com/moby/buildkit/solver" + "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/leaseutil" - digest "github.com/opencontainers/go-digest" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" ) @@ -30,7 +30,7 @@ type Worker interface { LoadRef(ctx context.Context, id string, hidden bool) (cache.ImmutableRef, error) // ResolveOp resolves Vertex.Sys() to Op implementation. ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge, sm *session.Manager) (solver.Op, error) - ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt, sm *session.Manager, g session.Group) (string, digest.Digest, []byte, error) + ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt sourceresolver.Opt, sm *session.Manager, g session.Group) (*sourceresolver.MetaResponse, error) DiskUsage(ctx context.Context, opt client.DiskUsageInfo) ([]*client.UsageInfo, error) Exporter(name string, sm *session.Manager) (exporter.Exporter, error) Prune(ctx context.Context, ch chan client.UsageInfo, opt ...client.PruneInfo) error