Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various lazy blob errors involving dedupe by chainID #5560

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 240 additions & 0 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@
testLayerLimitOnMounts,
testFrontendVerifyPlatforms,
testRunValidExitCodes,
testSameChainIDWithLazyBlobsCacheExport,
testSameChainIDWithLazyBlobsCacheMountBase,
}

func TestIntegration(t *testing.T) {
Expand Down Expand Up @@ -4816,7 +4818,7 @@
},
},
}, nil)
require.NoError(t, err)

Check failure on line 4821 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./fronte...

Failed: client/TestIntegration/TestStargzLazyRegistryCacheImportExport/worker=containerd-snapshotter-stargz

=== RUN TestIntegration/TestStargzLazyRegistryCacheImportExport/worker=containerd-snapshotter-stargz === PAUSE TestIntegration/TestStargzLazyRegistryCacheImportExport/worker=containerd-snapshotter-stargz === CONT TestIntegration/TestStargzLazyRegistryCacheImportExport/worker=containerd-snapshotter-stargz client_test.go:4821: Error Trace: /src/client/client_test.go:4821 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:36ea1c80af150b3a3066f0cc5ed2edcc86dda493ce7c088e08b7a8d6f7f9df81 sha256:51d2d8bd60757918ba85b62a1b87d7a61a6483a7d71f9a122e71223d06582379] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestStargzLazyRegistryCacheImportExport/worker=containerd-snapshotter-stargz sandbox.go:135: stdout: /usr/bin/containerd-stargz-grpc --log-level debug --address /tmp/bktest_containerd_stargz_grpc3046768407/containerd-stargz-grpc.sock --root /tmp/bktest_containerd_stargz_grpc3046768407/root sandbox.go:135: stderr: /usr/bin/containerd-stargz-grpc --log-level debug --address /tmp/bktest_containerd_stargz_grpc3046768407/containerd-stargz-grpc.sock --root /tmp/bktest_containerd_stargz_grpc3046768407/root sandbox.go:138: > StartCmd 2024-12-02 19:55:41.36060878 +0000 UTC m=+25.372178129 /usr/bin/containerd-stargz-grpc --log-level debug --address /tmp/bktest_containerd_stargz_grpc3046768407/containerd-stargz-grpc.sock --root /tmp/bktest_containerd_stargz_grpc3046768407/root sandbox.go:138: {"key":"buildkit/1/tmp-wtmvhoucsz5seh7lyyyaciypg sha256:78a822fe2a2d2c84f3de4a403188c45f623017d6a4521d23047c9fbb0801794c","level":"info","msg":"preparing filesystem mount at mountpoint=/tmp/bktest_containerd_stargz_grpc3046768407/root/snapshotter/snapshots/1/fs","parent":"","time":"2024-12-02T19:55:41.711059110Z"} sandbox.go:138: {"key":"buildkit/1/tmp-wtmvhoucsz5seh7lyyyaciypg sha256:78a822fe2a2d2c84f3de4a403188c45f623017d6a4521d23047c9fbb0801794c","level":"debug","mountpoint":"/tmp/bktest_containerd_stargz_grpc3046768407/root/snapshotter/snapshots/1/fs","msg":"resolving","parent":"","src":"docker.io/library/alpine:latest/sha256:31e352740f534f9ad170f75378a84fe453d6156e40700b882d737a8f4a6988a3","time":"2024-12-02T19:55:41.711337418Z"} sandbox.go:138: {"digest":"sha256:31e352740f534f9ad170f75378a84fe453d6156e40700b882d737a8f4a6988a3","error":null,"key":"buildkit/1/tmp-wtmvhoucsz5seh7lyyyaciypg sha256:78a822fe2a2d2c84f3de4a403188c45f623017d6a4521d23047c9

dgst, ok := resp.ExporterResponse[exptypes.ExporterImageDigestKey]
require.Equal(t, true, ok)
Expand Down Expand Up @@ -5012,7 +5014,7 @@
},
},
}, nil)
require.NoError(t, err)

Check failure on line 5017 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./fronte...

Failed: client/TestIntegration/TestStargzLazyInlineCacheImportExport/worker=containerd-snapshotter-stargz

=== RUN TestIntegration/TestStargzLazyInlineCacheImportExport/worker=containerd-snapshotter-stargz === PAUSE TestIntegration/TestStargzLazyInlineCacheImportExport/worker=containerd-snapshotter-stargz === CONT TestIntegration/TestStargzLazyInlineCacheImportExport/worker=containerd-snapshotter-stargz client_test.go:5017: Error Trace: /src/client/client_test.go:5017 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:d0cb096e38a223fb6b27ffc2766590261f9347515e24e9ecfc7f7e5f27e6762d sha256:51d2d8bd60757918ba85b62a1b87d7a61a6483a7d71f9a122e71223d06582379] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestStargzLazyInlineCacheImportExport/worker=containerd-snapshotter-stargz sandbox.go:135: stdout: /usr/bin/containerd --config /tmp/bktest_containerd3599472687/config.toml sandbox.go:135: stderr: /usr/bin/containerd --config /tmp/bktest_containerd3599472687/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:55:51.052099971 +0000 UTC m=+35.063669320 /usr/bin/containerd --config /tmp/bktest_containerd3599472687/config.toml sandbox.go:138: time="2024-12-02T19:55:51.080688143Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:55:51.092490633Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.677µs" sandbox.go:138: time="2024-12-02T19:55:51.092602250Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:55:51.092688742Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:55:51.092938758Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:55:51.092981948Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:55:51.093076364Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:51.093369981Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138

img, err := imageService.Get(ctx, target)
require.NoError(t, err)
Expand Down Expand Up @@ -7392,15 +7394,15 @@
}

func testMergeOpCacheInline(t *testing.T, sb integration.Sandbox) {
testMergeOpCache(t, sb, "inline")

Check failure on line 7397 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheInline/worker=containerd

=== RUN TestIntegration/TestMergeOpCacheInline/worker=containerd === PAUSE TestIntegration/TestMergeOpCacheInline/worker=containerd === CONT TestIntegration/TestMergeOpCacheInline/worker=containerd client_test.go:7397: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7397 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:dc20330a5ef3b83f489d17acb32fa8834c0b87e674fee175fc4d510c2fea75e0] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheInline/worker=containerd sandbox.go:135: stdout: /usr/bin/containerd --config /tmp/bktest_containerd2260497947/config.toml sandbox.go:135: stderr: /usr/bin/containerd --config /tmp/bktest_containerd2260497947/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:55:44.466958425 +0000 UTC m=+28.385338589 /usr/bin/containerd --config /tmp/bktest_containerd2260497947/config.toml sandbox.go:138: time="2024-12-02T19:55:44.489512113Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:55:44.498426016Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.537µs" sandbox.go:138: time="2024-12-02T19:55:44.498460300Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:55:44.498483283Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:55:44.498521804Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:55:44.498560606Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:55:44.498645864Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:44.498771817Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:44.498812292Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.devmapper type=io.containerd.snapshotter.v1

Check failure on line 7397 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integr...

Failed: client/TestIntegration/TestMergeOpCacheInline/worker=containerd-rootless

=== RUN TestIntegration/TestMergeOpCacheInline/worker=containerd-rootless === PAUSE TestIntegration/TestMergeOpCacheInline/worker=containerd-rootless === CONT TestIntegration/TestMergeOpCacheInline/worker=containerd-rootless client_test.go:7397: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7397 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:8ca902ee52a75f55618b708d001b2758c06ef80bf279781fe4414108ff999cbb] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheInline/worker=containerd-rootless sandbox.go:135: stdout: /usr/bin/sudo -u #1000 -i CONTAINERD_ROOTLESS_ROOTLESSKIT_STATE_DIR=/tmp/bktest_containerd3747704317/rootlesskit-containerd CONTAINERD_ROOTLESS_ROOTLESSKIT_NET=host CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=none CONTAINERD_ROOTLESS_ROOTLESSKIT_FLAGS=--mtu=0 containerd-rootless.sh -c /tmp/bktest_containerd3747704317/config.toml sandbox.go:135: stderr: /usr/bin/sudo -u #1000 -i CONTAINERD_ROOTLESS_ROOTLESSKIT_STATE_DIR=/tmp/bktest_containerd3747704317/rootlesskit-containerd CONTAINERD_ROOTLESS_ROOTLESSKIT_NET=host CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=none CONTAINERD_ROOTLESS_ROOTLESSKIT_FLAGS=--mtu=0 containerd-rootless.sh -c /tmp/bktest_containerd3747704317/config.toml sandbox.go:138: > StartCmd 2024-12-02 20:01:03.499226779 +0000 UTC m=+339.004592471 /usr/bin/sudo -u #1000 -i CONTAINERD_ROOTLESS_ROOTLESSKIT_STATE_DIR=/tmp/bktest_containerd3747704317/rootlesskit-containerd CONTAINERD_ROOTLESS_ROOTLESSKIT_NET=host CONTAINERD_ROOTLESS_ROOTLESSKIT_PORT_DRIVER=none CONTAINERD_ROOTLESS_ROOTLESSKIT_FLAGS=--mtu=0 containerd-rootless.sh -c /tmp/bktest_containerd3747704317/config.toml sandbox.go:138: time="2024-12-02T20:01:03.594623267Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T20:01:03.612983499Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.887µs" sandbox.go:138: time="2024-12-02T20:01:03.613022381Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T20:01:03.613045785Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T20:01:03.613095247Z" leve

Check failure on line 7397 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheInline/worker=containerd-1.6

=== RUN TestIntegration/TestMergeOpCacheInline/worker=containerd-1.6 === PAUSE TestIntegration/TestMergeOpCacheInline/worker=containerd-1.6 === CONT TestIntegration/TestMergeOpCacheInline/worker=containerd-1.6 client_test.go:7397: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7397 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:026b0127159bc277a0f76178b5b5acb20221cb33084c8cce5f83ecc009eba133] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheInline/worker=containerd-1.6 sandbox.go:135: stderr: /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd2115278591/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config2760896142/buildkitd.toml --root /tmp/bktest_buildkitd3794778677 --addr unix:///tmp/bktest_buildkitd3794778677/buildkitd.sock --debug sandbox.go:138: > StartCmd 2024-12-02 19:55:40.30092236 +0000 UTC m=+26.819404105 /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd2115278591/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config2760896142/buildkitd.toml --root /tmp/bktest_buildkitd3794778677 --addr unix:///tmp/bktest_buildkitd3794778677/buildkitd.sock --debug sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="could not read \"/tmp/bktest_buildkitd3794778677/net/cni\" for cleanup: open /tmp/bktest_buildkitd3794778677/net/cni: no such file or directory" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="creating new network namespace fsn6pfkggl5278juj9ngn2pln" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="finished creating network namespace fsn6pfkggl5278juj9ngn2pln" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="finished setting up network namespace fsn6pfkggl5278juj9ngn2pln" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="remote introspection plugin filters" filters="[type==io.containerd.runtime.v1 type==io.containerd.runtime.v2]" sandbox.go:138: time="2024-12-02T19:55:40Z" level=info msg="found worker \"m9nbr3rbmb0zsi8ux82v1dwua\", labels=map[org.mobyproject.buildkit.worker.containerd.namespac

Check failure on line 7397 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.7, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheInline/worker=containerd-1.7

=== RUN TestIntegration/TestMergeOpCacheInline/worker=containerd-1.7 === PAUSE TestIntegration/TestMergeOpCacheInline/worker=containerd-1.7 === CONT TestIntegration/TestMergeOpCacheInline/worker=containerd-1.7 client_test.go:7397: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7397 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:69c6c8326a591e0cdb8275eabd269b4283e48baeb99b58c14c74556f41c822dd] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheInline/worker=containerd-1.7 sandbox.go:135: stdout: /opt/containerd-alt-17/bin/containerd --config /tmp/bktest_containerd1371020812/config.toml sandbox.go:135: stderr: /opt/containerd-alt-17/bin/containerd --config /tmp/bktest_containerd1371020812/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:56:21.06004683 +0000 UTC m=+49.940202181 /opt/containerd-alt-17/bin/containerd --config /tmp/bktest_containerd1371020812/config.toml sandbox.go:138: time="2024-12-02T19:56:21.093187091Z" level=info msg="starting containerd" revision=57f17b0a6295a39009d861b89e3b3b87b005ca27 version=v1.7.23 sandbox.go:138: time="2024-12-02T19:56:21.122250184Z" level=info msg="loading plugin \"io.containerd.event.v1.exchange\"..." type=io.containerd.event.v1 sandbox.go:138: time="2024-12-02T19:56:21.122289057Z" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:56:21.122337126Z" level=info msg="loading plugin \"io.containerd.warning.v1.deprecations\"..." type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:56:21.122354208Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.blockfile\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:56:21.122427826Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.blockfile\"..." error="no scratch file generator: skip plugin" type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:56:21.122447131Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:56:21.122457281Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." error="devmapper not configured: skip plugin" type=io.containerd.snapshotter.v1 san

Check failure on line 7397 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./fronte...

Failed: client/TestIntegration/TestMergeOpCacheInline/worker=containerd-snapshotter-stargz

=== RUN TestIntegration/TestMergeOpCacheInline/worker=containerd-snapshotter-stargz === PAUSE TestIntegration/TestMergeOpCacheInline/worker=containerd-snapshotter-stargz === CONT TestIntegration/TestMergeOpCacheInline/worker=containerd-snapshotter-stargz client_test.go:7397: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7397 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:e2b6aa06ff6895cdd509144c6b7f7d475885386261d268f819458126d7993863] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheInline/worker=containerd-snapshotter-stargz sandbox.go:135: stdout: /usr/bin/containerd --config /tmp/bktest_containerd2972247902/config.toml sandbox.go:135: stderr: /usr/bin/containerd --config /tmp/bktest_containerd2972247902/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:55:45.899219789 +0000 UTC m=+29.910789168 /usr/bin/containerd --config /tmp/bktest_containerd2972247902/config.toml sandbox.go:138: time="2024-12-02T19:55:45.921261012Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:55:45.932812250Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.045µs" sandbox.go:138: time="2024-12-02T19:55:45.932883482Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:55:45.932922214Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:55:45.933004488Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:55:45.933082944Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:55:45.933180445Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:45.933358207Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:45.933486997Z" level=info msg="loading plugin" id=

Check failure on line 7397 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (./client, containerd, nydus, integration)

Failed: client/TestIntegration/TestMergeOpCacheInline/worker=containerd

=== RUN TestIntegration/TestMergeOpCacheInline/worker=containerd === PAUSE TestIntegration/TestMergeOpCacheInline/worker=containerd === CONT TestIntegration/TestMergeOpCacheInline/worker=containerd client_test.go:7397: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7397 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:480cd0664093ec269880b5b0285a778c2e727dfe50ff8ed4e989a5588c79cc91] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheInline/worker=containerd sandbox.go:135: stdout: /usr/bin/containerd --config /tmp/bktest_containerd4177735672/config.toml sandbox.go:135: stderr: /usr/bin/containerd --config /tmp/bktest_containerd4177735672/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:58:36.902862965 +0000 UTC m=+210.943980485 /usr/bin/containerd --config /tmp/bktest_containerd4177735672/config.toml sandbox.go:138: time="2024-12-02T19:58:36.924998813Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:58:36.936095102Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.116µs" sandbox.go:138: time="2024-12-02T19:58:36.936130307Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:58:36.936159051Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:58:36.936211057Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:58:36.936239049Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:58:36.936324842Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:58:36.936558345Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:58:36.936603889Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.devmapper type=io.containerd.snapshotter.v1
}

func testMergeOpCacheMin(t *testing.T, sb integration.Sandbox) {
testMergeOpCache(t, sb, "min")

Check failure on line 7401 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheMin/worker=containerd

=== RUN TestIntegration/TestMergeOpCacheMin/worker=containerd === PAUSE TestIntegration/TestMergeOpCacheMin/worker=containerd === CONT TestIntegration/TestMergeOpCacheMin/worker=containerd client_test.go:7401: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7401 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:d8d5725cff1a960236a264b850117e53013c88fe20e916b12bb30c100b87d91b] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMin/worker=containerd sandbox.go:135: stdout: /usr/bin/containerd --config /tmp/bktest_containerd709017974/config.toml sandbox.go:135: stderr: /usr/bin/containerd --config /tmp/bktest_containerd709017974/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:55:43.745240973 +0000 UTC m=+27.663621117 /usr/bin/containerd --config /tmp/bktest_containerd709017974/config.toml sandbox.go:138: time="2024-12-02T19:55:43.776432789Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:55:43.788345878Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.777µs" sandbox.go:138: time="2024-12-02T19:55:43.788377276Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:55:43.788408735Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:55:43.788466662Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:55:43.788482501Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:55:43.788522866Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:43.788619836Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:43.788635415Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.devmapper type=io.containerd.snapshotter.v1 sandbox.go:138

Check failure on line 7401 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integr...

Failed: client/TestIntegration/TestMergeOpCacheMin/worker=containerd-rootless

=== RUN TestIntegration/TestMergeOpCacheMin/worker=containerd-rootless === PAUSE TestIntegration/TestMergeOpCacheMin/worker=containerd-rootless === CONT TestIntegration/TestMergeOpCacheMin/worker=containerd-rootless client_test.go:7401: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7401 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:0bc7bda89c351cbd139c5c2d9e7bf026d098dcc7b780239a2bde38944b4bdcc2] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMin/worker=containerd-rootless sandbox.go:135: stderr: /usr/bin/sudo -u #1000 -i -- exec nsenter -U --preserve-credentials -m -t 54276 buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd212859113/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --containerd-worker-snapshotter=native --containerd-worker-snapshotter=native --config=/tmp/bktest_config1498601741/buildkitd.toml --root /tmp/bktest_buildkitd867753509 --addr unix:///tmp/bktest_buildkitd867753509/buildkitd.sock --debug sandbox.go:138: > StartCmd 2024-12-02 20:01:01.896830858 +0000 UTC m=+337.402196559 /usr/bin/sudo -u #1000 -i -- exec nsenter -U --preserve-credentials -m -t 54276 buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd212859113/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --containerd-worker-snapshotter=native --containerd-worker-snapshotter=native --config=/tmp/bktest_config1498601741/buildkitd.toml --root /tmp/bktest_buildkitd867753509 --addr unix:///tmp/bktest_buildkitd867753509/buildkitd.sock --debug sandbox.go:138: warning: GOCOVERDIR not set, no coverage data emitted sandbox.go:138: time="2024-12-02T20:01:01Z" level=debug msg="running in rootless mode" sandbox.go:138: time="2024-12-02T20:01:01Z" level=debug msg="remote introspection plugin filters" filters="[type==io.containerd.runtime.v1 type==io.containerd.runtime.v2]" sandbox.go:138: time="2024-12-02T20:01:01Z" level=info msg="found worker \"yhao35a311mcc7d73p4emg1hw\", labels=map[org.mobyproject.buildkit.worker.containerd.namespace:buildkit org.mobyproject.buildkit.worker.containerd.uuid:2707ddc1-ba62-455e-8446-8fc8d6e9fc12 org.mobyproject.buildkit.wor

Check failure on line 7401 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheMin/worker=containerd-1.6

=== RUN TestIntegration/TestMergeOpCacheMin/worker=containerd-1.6 === PAUSE TestIntegration/TestMergeOpCacheMin/worker=containerd-1.6 === CONT TestIntegration/TestMergeOpCacheMin/worker=containerd-1.6 client_test.go:7401: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7401 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:4a3e4b009bbaa25cc70e3bc0493ed41ba3991494bd0252623e5ce8f32bec36ab] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMin/worker=containerd-1.6 sandbox.go:135: stderr: /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd3110431523/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config786943523/buildkitd.toml --root /tmp/bktest_buildkitd2104496290 --addr unix:///tmp/bktest_buildkitd2104496290/buildkitd.sock --debug sandbox.go:138: > StartCmd 2024-12-02 19:55:40.113556871 +0000 UTC m=+26.632038626 /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd3110431523/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config786943523/buildkitd.toml --root /tmp/bktest_buildkitd2104496290 --addr unix:///tmp/bktest_buildkitd2104496290/buildkitd.sock --debug sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="could not read \"/tmp/bktest_buildkitd2104496290/net/cni\" for cleanup: open /tmp/bktest_buildkitd2104496290/net/cni: no such file or directory" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="creating new network namespace jqvaw2ynr394lkwblm128yk3h" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="finished creating network namespace jqvaw2ynr394lkwblm128yk3h" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="finished setting up network namespace jqvaw2ynr394lkwblm128yk3h" sandbox.go:138: time="2024-12-02T19:55:40Z" level=debug msg="remote introspection plugin filters" filters="[type==io.containerd.runtime.v1 type==io.containerd.runtime.v2]" sandbox.go:138: time="2024-12-02T19:55:40Z" level=info msg="found worker \"z24g17wd642j8qp8vddg56uy9\", labels=map[org.mobyproject.buildkit.worker.containerd.namespace:buildkit or

Check failure on line 7401 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.7, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheMin/worker=containerd-1.7

=== RUN TestIntegration/TestMergeOpCacheMin/worker=containerd-1.7 === PAUSE TestIntegration/TestMergeOpCacheMin/worker=containerd-1.7 === CONT TestIntegration/TestMergeOpCacheMin/worker=containerd-1.7 client_test.go:7401: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7401 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:3ecf1dcdc9cddd8736c66146bbe81c806533d1057d01d8ff942d833c010349fb] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMin/worker=containerd-1.7 sandbox.go:135: stdout: /opt/containerd-alt-17/bin/containerd --config /tmp/bktest_containerd2947246134/config.toml sandbox.go:135: stderr: /opt/containerd-alt-17/bin/containerd --config /tmp/bktest_containerd2947246134/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:56:21.031101499 +0000 UTC m=+49.911256830 /opt/containerd-alt-17/bin/containerd --config /tmp/bktest_containerd2947246134/config.toml sandbox.go:138: time="2024-12-02T19:56:21.058987924Z" level=info msg="starting containerd" revision=57f17b0a6295a39009d861b89e3b3b87b005ca27 version=v1.7.23 sandbox.go:138: time="2024-12-02T19:56:21.095468405Z" level=info msg="loading plugin \"io.containerd.event.v1.exchange\"..." type=io.containerd.event.v1 sandbox.go:138: time="2024-12-02T19:56:21.095501487Z" level=info msg="loading plugin \"io.containerd.internal.v1.opt\"..." type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:56:21.095540420Z" level=info msg="loading plugin \"io.containerd.warning.v1.deprecations\"..." type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:56:21.095603658Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.blockfile\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:56:21.095729593Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.blockfile\"..." error="no scratch file generator: skip plugin" type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:56:21.095779426Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:56:21.095835540Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." error="devmapper not configured: skip plugin" type=io.containerd.snapshotter.v1 sandbox.go:138

Check failure on line 7401 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./fronte...

Failed: client/TestIntegration/TestMergeOpCacheMin/worker=containerd-snapshotter-stargz

=== RUN TestIntegration/TestMergeOpCacheMin/worker=containerd-snapshotter-stargz === PAUSE TestIntegration/TestMergeOpCacheMin/worker=containerd-snapshotter-stargz === CONT TestIntegration/TestMergeOpCacheMin/worker=containerd-snapshotter-stargz client_test.go:7401: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7401 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:be49deb0e1d4b9501cc8edb81875fe448e77920a2367658c7a5a846a7b6b5b6d] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMin/worker=containerd-snapshotter-stargz sandbox.go:135: stdout: /usr/bin/containerd-stargz-grpc --log-level debug --address /tmp/bktest_containerd_stargz_grpc3538213144/containerd-stargz-grpc.sock --root /tmp/bktest_containerd_stargz_grpc3538213144/root sandbox.go:135: stderr: /usr/bin/containerd-stargz-grpc --log-level debug --address /tmp/bktest_containerd_stargz_grpc3538213144/containerd-stargz-grpc.sock --root /tmp/bktest_containerd_stargz_grpc3538213144/root sandbox.go:138: > StartCmd 2024-12-02 19:55:45.435526576 +0000 UTC m=+29.447095956 /usr/bin/containerd-stargz-grpc --log-level debug --address /tmp/bktest_containerd_stargz_grpc3538213144/containerd-stargz-grpc.sock --root /tmp/bktest_containerd_stargz_grpc3538213144/root sandbox.go:138: {"key":"buildkit/1/bicl9kmopjwzazo4ezolrqfvg","level":"debug","msg":"checking layer availability","time":"2024-12-02T19:55:45.925145512Z"} sandbox.go:138: {"key":"buildkit/1/bicl9kmopjwzazo4ezolrqfvg","level":"debug","mount-point":"/tmp/bktest_containerd_stargz_grpc3538213144/root/snapshotter/snapshots/1/fs","msg":"layer is normal snapshot(overlayfs)","time":"2024-12-02T19:55:45.925281896Z"} sandbox.go:138: {"key":"buildkit/2/yac870m92l5w34l6xxrrzgaca","level":"debug","msg":"checking layer availability","time":"2024-12-02T19:55:45.954633608Z"} sandbox.go:138: {"key":"buildkit/2/yac870m92l5w34l6xxrrzgaca","level":"debug","mount-point":"/tmp/bktest_containerd_stargz_grpc3538213144/root/snapshotter/snapshots/1/fs","msg":"layer is normal snapshot(overlayfs)","time":"2024-12-02T19:55:45.954682880Z"} sandbox.go:138: {"key":"buildkit/4/tmp-9l5f546faeaz9o9ence4gmgrc sha256:78a822fe2a2d2c84f3de4a403188c45f623017d6a4521d23047c9fbb0801794c","level":"info","msg":"preparing filesystem mount at mountpoint=/tmp/bktest_containerd_stargz_grpc3538213144/

Check failure on line 7401 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (./client, containerd, nydus, integration)

Failed: client/TestIntegration/TestMergeOpCacheMin/worker=containerd

=== RUN TestIntegration/TestMergeOpCacheMin/worker=containerd === PAUSE TestIntegration/TestMergeOpCacheMin/worker=containerd === CONT TestIntegration/TestMergeOpCacheMin/worker=containerd client_test.go:7401: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7401 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:3d363aaa70067e11d88c1eb647b87e9f0b78f94e8fa61ad7791cda774d612eee] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMin/worker=containerd sandbox.go:135: stderr: /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd2517428303/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config4084097537/buildkitd.toml --root /tmp/bktest_buildkitd363304295 --addr unix:///tmp/bktest_buildkitd363304295/buildkitd.sock --debug sandbox.go:138: > StartCmd 2024-12-02 19:58:36.736922767 +0000 UTC m=+210.778040267 /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd2517428303/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config4084097537/buildkitd.toml --root /tmp/bktest_buildkitd363304295 --addr unix:///tmp/bktest_buildkitd363304295/buildkitd.sock --debug sandbox.go:138: time="2024-12-02T19:58:36Z" level=debug msg="could not read \"/tmp/bktest_buildkitd363304295/net/cni\" for cleanup: open /tmp/bktest_buildkitd363304295/net/cni: no such file or directory" sandbox.go:138: time="2024-12-02T19:58:36Z" level=debug msg="creating new network namespace g9t7s3rwf5izmxlti1xkqj2ue" sandbox.go:138: time="2024-12-02T19:58:36Z" level=debug msg="finished creating network namespace g9t7s3rwf5izmxlti1xkqj2ue" sandbox.go:138: time="2024-12-02T19:58:36Z" level=debug msg="finished setting up network namespace g9t7s3rwf5izmxlti1xkqj2ue" sandbox.go:138: time="2024-12-02T19:58:36Z" level=debug msg="remote introspection plugin filters" filters="[type==io.containerd.runtime.v1 type==io.containerd.runtime.v2]" sandbox.go:138: time="2024-12-02T19:58:36Z" level=info msg="found worker \"q6i6z8kc06n99oep2dckovxn8\", labels=map[org.mobyproject.buildkit.worker.containerd.namespace:buildkit org.mobyproject.build
}

func testMergeOpCacheMax(t *testing.T, sb integration.Sandbox) {
testMergeOpCache(t, sb, "max")

Check failure on line 7405 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheMax/worker=containerd

=== RUN TestIntegration/TestMergeOpCacheMax/worker=containerd === PAUSE TestIntegration/TestMergeOpCacheMax/worker=containerd === CONT TestIntegration/TestMergeOpCacheMax/worker=containerd client_test.go:7405: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7405 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:befb9eb1f5459678983c9405b398b62a99d080e1fcca2c88f7d08c99fe294eec] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMax/worker=containerd sandbox.go:135: stderr: /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd205673003/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config3760574038/buildkitd.toml --root /tmp/bktest_buildkitd3424238517 --addr unix:///tmp/bktest_buildkitd3424238517/buildkitd.sock --debug sandbox.go:138: > StartCmd 2024-12-02 19:55:43.677988608 +0000 UTC m=+27.596368762 /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd205673003/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config3760574038/buildkitd.toml --root /tmp/bktest_buildkitd3424238517 --addr unix:///tmp/bktest_buildkitd3424238517/buildkitd.sock --debug sandbox.go:138: time="2024-12-02T19:55:43Z" level=debug msg="could not read \"/tmp/bktest_buildkitd3424238517/net/cni\" for cleanup: open /tmp/bktest_buildkitd3424238517/net/cni: no such file or directory" sandbox.go:138: time="2024-12-02T19:55:43Z" level=debug msg="creating new network namespace 5suw36wyegso07db0ba99ss3j" sandbox.go:138: time="2024-12-02T19:55:43Z" level=debug msg="finished creating network namespace 5suw36wyegso07db0ba99ss3j" sandbox.go:138: time="2024-12-02T19:55:43Z" level=debug msg="finished setting up network namespace 5suw36wyegso07db0ba99ss3j" sandbox.go:138: time="2024-12-02T19:55:43Z" level=debug msg="remote introspection plugin filters" filters="[type==io.containerd.runtime.v1 type==io.containerd.runtime.v2]" sandbox.go:138: time="2024-12-02T19:55:43Z" level=info msg="found worker \"x4kiwc30ilyqfuzi801gjbpwt\", labels=map[org.mobyproject.buildkit.worker.containerd.namespace:buildkit org.mobyproject.bu

Check failure on line 7405 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-rootless, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integr...

Failed: client/TestIntegration/TestMergeOpCacheMax/worker=containerd-rootless

=== RUN TestIntegration/TestMergeOpCacheMax/worker=containerd-rootless === PAUSE TestIntegration/TestMergeOpCacheMax/worker=containerd-rootless === CONT TestIntegration/TestMergeOpCacheMax/worker=containerd-rootless client_test.go:7405: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7405 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:a649d5b52225a2732d6031de25e59cbb793e2db33d12b3e75a58aa8133b45b4a] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMax/worker=containerd-rootless sandbox.go:135: stdout: /usr/bin/sudo -u #1000 -i -- exec nsenter -U --preserve-credentials -m -t 54086 buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd2317954322/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --containerd-worker-snapshotter=native --containerd-worker-snapshotter=native --config=/tmp/bktest_config4101197387/buildkitd.toml --root /tmp/bktest_buildkitd1919445523 --addr unix:///tmp/bktest_buildkitd1919445523/buildkitd.sock --debug sandbox.go:135: stderr: /usr/bin/sudo -u #1000 -i -- exec nsenter -U --preserve-credentials -m -t 54086 buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd2317954322/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --containerd-worker-snapshotter=native --containerd-worker-snapshotter=native --config=/tmp/bktest_config4101197387/buildkitd.toml --root /tmp/bktest_buildkitd1919445523 --addr unix:///tmp/bktest_buildkitd1919445523/buildkitd.sock --debug sandbox.go:138: > StartCmd 2024-12-02 20:01:01.695590106 +0000 UTC m=+337.200955817 /usr/bin/sudo -u #1000 -i -- exec nsenter -U --preserve-credentials -m -t 54086 buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd2317954322/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --containerd-worker-snapshotter=native --containerd-worker-snapshotter=native --config=/tmp/bktest_config4101197387/buildkitd.toml --root /tmp/bktest_buildkitd1919445523 --addr unix:///tmp/bktest_buildkitd1919445523/buildkitd.sock --debug sandbox.go:138: warning: GOCOVERDIR not set, no c

Check failure on line 7405 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.6, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheMax/worker=containerd-1.6

=== RUN TestIntegration/TestMergeOpCacheMax/worker=containerd-1.6 === PAUSE TestIntegration/TestMergeOpCacheMax/worker=containerd-1.6 === CONT TestIntegration/TestMergeOpCacheMax/worker=containerd-1.6 client_test.go:7405: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7405 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:72ebc8692ed04b4623a5617b76d368926ff590e74221146e17cbef7a33ee1c2f] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMax/worker=containerd-1.6 sandbox.go:135: stdout: /opt/containerd-alt-16/bin/containerd --config /tmp/bktest_containerd2775818139/config.toml sandbox.go:135: stderr: /opt/containerd-alt-16/bin/containerd --config /tmp/bktest_containerd2775818139/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:55:39.429820247 +0000 UTC m=+25.948301972 /opt/containerd-alt-16/bin/containerd --config /tmp/bktest_containerd2775818139/config.toml sandbox.go:138: time="2024-12-02T19:55:39.461462177Z" level=info msg="starting containerd" revision=88c3d9bc5b5a193f40b7c14fa996d23532d6f956 version=v1.6.36 sandbox.go:138: time="2024-12-02T19:55:39.491455643Z" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:55:39.491589773Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.devmapper\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:39.491624188Z" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.devmapper" error="devmapper not configured" sandbox.go:138: time="2024-12-02T19:55:39.491650226Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.native\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:39.492409501Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.overlayfs\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:39.494296572Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:39.496264162Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: can't change directory to '/lib/modules': No such file or direc

Check failure on line 7405 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-1.7, ./client ./cmd/buildctl ./worker/containerd ./solver ./frontend, integration)

Failed: client/TestIntegration/TestMergeOpCacheMax/worker=containerd-1.7

=== RUN TestIntegration/TestMergeOpCacheMax/worker=containerd-1.7 === PAUSE TestIntegration/TestMergeOpCacheMax/worker=containerd-1.7 === CONT TestIntegration/TestMergeOpCacheMax/worker=containerd-1.7 client_test.go:7405: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7405 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:55a159321b01a7053aab5dedb643053246651cc265b6cbda71813877845d95f6] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMax/worker=containerd-1.7 sandbox.go:135: stderr: /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd855054817/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config136261786/buildkitd.toml --root /tmp/bktest_buildkitd486067608 --addr unix:///tmp/bktest_buildkitd486067608/buildkitd.sock --debug sandbox.go:138: > StartCmd 2024-12-02 19:56:20.477045382 +0000 UTC m=+49.357200743 /usr/bin/buildkitd --containerd-worker-gc=false --containerd-worker=true --containerd-worker-addr /tmp/bktest_containerd855054817/containerd.sock --containerd-worker-labels=org.mobyproject.buildkit.worker.sandbox=true --oci-worker=false --config=/tmp/bktest_config136261786/buildkitd.toml --root /tmp/bktest_buildkitd486067608 --addr unix:///tmp/bktest_buildkitd486067608/buildkitd.sock --debug sandbox.go:138: time="2024-12-02T19:56:20Z" level=debug msg="could not read \"/tmp/bktest_buildkitd486067608/net/cni\" for cleanup: open /tmp/bktest_buildkitd486067608/net/cni: no such file or directory" sandbox.go:138: time="2024-12-02T19:56:20Z" level=debug msg="creating new network namespace egts5wkx1cvabuu80nh87ecf7" sandbox.go:138: time="2024-12-02T19:56:20Z" level=debug msg="finished creating network namespace egts5wkx1cvabuu80nh87ecf7" sandbox.go:138: time="2024-12-02T19:56:20Z" level=debug msg="finished setting up network namespace egts5wkx1cvabuu80nh87ecf7" sandbox.go:138: time="2024-12-02T19:56:20Z" level=debug msg="remote introspection plugin filters" filters="[type==io.containerd.runtime.v1 type==io.containerd.runtime.v2]" sandbox.go:138: time="2024-12-02T19:56:20Z" level=info msg="found worker \"kzz2z8vhleby75d8rj75ibmse\", labels=map[org.mobyproject.buildkit.worker.containerd.namespace:buildkit org.mobypr

Check failure on line 7405 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (containerd-snapshotter-stargz, ./client ./cmd/buildctl ./worker/containerd ./solver ./fronte...

Failed: client/TestIntegration/TestMergeOpCacheMax/worker=containerd-snapshotter-stargz

=== RUN TestIntegration/TestMergeOpCacheMax/worker=containerd-snapshotter-stargz === PAUSE TestIntegration/TestMergeOpCacheMax/worker=containerd-snapshotter-stargz === CONT TestIntegration/TestMergeOpCacheMax/worker=containerd-snapshotter-stargz client_test.go:7405: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7405 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:6c5767023efb66514038305e1d46f8997d1bfc6b72218cd84cfe38d55fcd897c] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMax/worker=containerd-snapshotter-stargz sandbox.go:135: stdout: /usr/bin/containerd --config /tmp/bktest_containerd2694445402/config.toml sandbox.go:135: stderr: /usr/bin/containerd --config /tmp/bktest_containerd2694445402/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:55:45.227747389 +0000 UTC m=+29.239316768 /usr/bin/containerd --config /tmp/bktest_containerd2694445402/config.toml sandbox.go:138: time="2024-12-02T19:55:45.247407477Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:55:45.261406636Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.246µs" sandbox.go:138: time="2024-12-02T19:55:45.261461338Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:55:45.261495061Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:55:45.261543151Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:55:45.261572455Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:55:45.261612700Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:45.261874087Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:55:45.261907359Z" level=info msg="loading plugin" id=io.container

Check failure on line 7405 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test / run (./client, containerd, nydus, integration)

Failed: client/TestIntegration/TestMergeOpCacheMax/worker=containerd

=== RUN TestIntegration/TestMergeOpCacheMax/worker=containerd === PAUSE TestIntegration/TestMergeOpCacheMax/worker=containerd === CONT TestIntegration/TestMergeOpCacheMax/worker=containerd client_test.go:7405: Error Trace: /src/client/client_test.go:7650 /src/client/client_test.go:7405 /src/util/testutil/integration/run.go:97 /src/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load ref: missing descriptor handlers for lazy blobs [sha256:38c3e7fe6c03a96eebbb290600c5dafb58386556866a0add4e9e1af15eff0112] github.com/moby/buildkit/util/stack.Enable /src/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC /src/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor /src/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke /src/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve /src/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 /src/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 /src/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit /usr/local/go/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestMergeOpCacheMax/worker=containerd sandbox.go:135: stdout: /usr/bin/containerd --config /tmp/bktest_containerd3140090729/config.toml sandbox.go:135: stderr: /usr/bin/containerd --config /tmp/bktest_containerd3140090729/config.toml sandbox.go:138: > StartCmd 2024-12-02 19:58:36.509656689 +0000 UTC m=+210.550774219 /usr/bin/containerd --config /tmp/bktest_containerd3140090729/config.toml sandbox.go:138: time="2024-12-02T19:58:36.541675846Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:58:36.553392583Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="3.948µs" sandbox.go:138: time="2024-12-02T19:58:36.553419574Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:58:36.553440563Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:58:36.553479214Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:58:36.553494002Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:58:36.553530820Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:58:36.553620546Z" level=info msg="skip loading plugin" error="no scratch file generator: skip plugin" id=io.containerd.snapshotter.v1.blockfile type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:58:36.553636546Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.devmapper type=io.containerd.snapshotter.v1 sandbox.go
}

func testMergeOpCache(t *testing.T, sb integration.Sandbox, mode string) {
Expand Down Expand Up @@ -10895,3 +10897,241 @@
require.Error(t, err)
require.ErrorContains(t, err, "exit code: 0")
}

func testSameChainIDWithLazyBlobsCacheExport(t *testing.T, sb integration.Sandbox) {
workers.CheckFeatureCompat(t, sb,
workers.FeatureCacheExport,
workers.FeatureCacheImport,
workers.FeatureCacheBackendRegistry,
)

c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

// push the base busybox image, ensuring it uses gzip

def, err := llb.Image("busybox:latest").
Marshal(sb.Context())
require.NoError(t, err)
busyboxGzipRef := registry + "/buildkit/busyboxgzip:latest"
_, err = c.Solve(sb.Context(), def, SolveOpt{
Exports: []ExportEntry{
{
Type: ExporterImage,
Attrs: map[string]string{
"name": busyboxGzipRef,
"push": "true",
"compression": "gzip",
"force-compression": "true",
},
},
},
}, nil)
require.NoError(t, err)

Check failure on line 10937 in client/client_test.go

View workflow job for this annotation

GitHub Actions / test-windows-amd64 (containerd, ./client)

Failed: client/TestIntegration/TestSameChainIDWithLazyBlobsCacheExport/worker=containerd

=== RUN TestIntegration/TestSameChainIDWithLazyBlobsCacheExport/worker=containerd client_test.go:10937: Error Trace: D:/a/buildkit/buildkit/client/client_test.go:10937 D:/a/buildkit/buildkit/util/testutil/integration/run.go:97 D:/a/buildkit/buildkit/util/testutil/integration/run.go:211 Error: Received unexpected error: failed to load cache key: no match for platform in manifest: not found github.com/moby/buildkit/util/stack.Enable D:/a/buildkit/buildkit/util/stack/stack.go:82 github.com/moby/buildkit/util/grpcerrors.FromGRPC D:/a/buildkit/buildkit/util/grpcerrors/grpcerrors.go:204 github.com/moby/buildkit/util/grpcerrors.UnaryClientInterceptor D:/a/buildkit/buildkit/util/grpcerrors/intercept.go:41 google.golang.org/grpc.(*ClientConn).Invoke D:/a/buildkit/buildkit/vendor/google.golang.org/grpc/call.go:35 github.com/moby/buildkit/api/services/control.(*controlClient).Solve D:/a/buildkit/buildkit/api/services/control/control_grpc.pb.go:88 github.com/moby/buildkit/client.(*Client).solve.func2 D:/a/buildkit/buildkit/client/solve.go:269 golang.org/x/sync/errgroup.(*Group).Go.func1 D:/a/buildkit/buildkit/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit C:/hostedtoolcache/windows/go/1.23.3/x64/src/runtime/asm_amd64.s:1700 failed to solve github.com/moby/buildkit/client.(*Client).solve.func2 D:/a/buildkit/buildkit/client/solve.go:285 golang.org/x/sync/errgroup.(*Group).Go.func1 D:/a/buildkit/buildkit/vendor/golang.org/x/sync/errgroup/errgroup.go:78 runtime.goexit C:/hostedtoolcache/windows/go/1.23.3/x64/src/runtime/asm_amd64.s:1700 Test: TestIntegration/TestSameChainIDWithLazyBlobsCacheExport/worker=containerd sandbox.go:135: stdout: D:\a\buildkit\buildkit\bin\containerd.exe --config C:\Users\RUNNER~1\AppData\Local\Temp\bktest_containerd1289084452\config.toml sandbox.go:135: stderr: D:\a\buildkit\buildkit\bin\containerd.exe --config C:\Users\RUNNER~1\AppData\Local\Temp\bktest_containerd1289084452\config.toml sandbox.go:138: > StartCmd 2024-12-02 19:54:10.8919557 +0000 UTC m=+97.873084701 D:\a\buildkit\buildkit\bin\containerd.exe --config C:\Users\RUNNER~1\AppData\Local\Temp\bktest_containerd1289084452\config.toml sandbox.go:138: time="2024-12-02T19:54:10.913006400Z" level=debug msg="Stackdump - waiting signal at Global\\stackdump-2756" sandbox.go:138: time="2024-12-02T19:54:10.913006400Z" level=info msg="starting containerd" revision= version=2.0.0+unknown sandbox.go:138: time="2024-12-02T19:54:10.937763600Z" level=info msg="loading plugin" id=io.containerd.internal.v1.opt type=io.containerd.internal.v1 sandbox.go:138: time="2024-12-02T19:54:10.943440100Z" level=info msg="loading plugin" id=io.containerd.content.v1.content type=io.containerd.content.v1 sandbox.go:138: time="2024-12-02T19:54:10.943440100Z" level=info msg="loading plugin" id=io.containerd.image-verifier.v1.bindir type=io.containerd.image-verifier.v1 sandbox.go:138: time="2024-12-02T19:54:10.943440100Z" level=info msg="loading plugin" id=io.containerd.warning.v1.deprecations type=io.containerd.warning.v1 sandbox.go:138: time="2024-12-02T19:54:10.943440100Z" level=info msg="loading plugin" id=io.containerd.event.v1.exchange type=io.containerd.event.v1 sandbox.go:138: time="2024-12-02T19:54:10.943440100Z" level=info msg="loading plugin" id=io.containerd.snapshotter.v1.windows-lcow type=io.containerd.snapshotter.v1 sandbox.go:138: time="2024-12-02T19:54:10.944192200Z" level=info msg=

// push the base busybox image plus an extra layer, ensuring it uses zstd
// the extra layer allows us to avoid edge-merge/cache-load later
def, err = llb.Image("busybox:latest").
Run(llb.Shlex(`touch /foo`)).Root().
Marshal(sb.Context())
require.NoError(t, err)
busyboxZstdRef := registry + "/buildkit/busyboxzstd:latest"
_, err = c.Solve(sb.Context(), def, SolveOpt{
Exports: []ExportEntry{
{
Type: ExporterImage,
Attrs: map[string]string{
"name": busyboxZstdRef,
"push": "true",
"compression": "zstd",
"force-compression": "true",
},
},
},
}, nil)
require.NoError(t, err)

ensurePruneAll(t, c, sb)

// create non-lazy cache refs for the zstd image
def, err = llb.Image(busyboxZstdRef).
Run(llb.Shlex(`true`)).Root().
Marshal(sb.Context())
require.NoError(t, err)
_, err = c.Solve(sb.Context(), def, SolveOpt{}, nil)
require.NoError(t, err)

// Create lazy cache refs for the gzip layers that will be deduped by chainID with
// the zstd layers made in the previous solve.
// Put a random file in the rootfs, run a cache invalidation step and then copy
// the random file to a r/w mnt.
def, err = llb.Image(busyboxGzipRef).
Run(llb.Shlex(`sh -c "cat /dev/urandom | head -c 100 > /rand"`)).Root().
Run(llb.Shlex(`echo `+identity.NewID())).Root().
Run(llb.Shlex(`cp /rand /mnt/rand`)).AddMount("/mnt", llb.Scratch()).
Marshal(sb.Context())
require.NoError(t, err)

outDir := t.TempDir()
_, err = c.Solve(sb.Context(), def, SolveOpt{
Exports: []ExportEntry{
{
Type: ExporterLocal,
OutputDir: outDir,
},
},
CacheExports: []CacheOptionsEntry{
{
Type: "registry",
Attrs: map[string]string{
"ref": registry + "/buildkit/idc:latest",
"mode": "max",
},
},
},
}, nil)
require.NoError(t, err)

rand1, err := os.ReadFile(filepath.Join(outDir, "rand"))
require.NoError(t, err)

ensurePruneAll(t, c, sb)

// Run the same steps as before but with a different cache invalidation step in the middle
// The random file should still be cached from earlier and thus the output should be the same
def, err = llb.Image(busyboxGzipRef).
Run(llb.Shlex(`sh -c "cat /dev/urandom | head -c 100 > /rand"`)).Root().
Run(llb.Shlex(`echo `+identity.NewID())).Root().
Run(llb.Shlex(`cp /rand /mnt/rand`)).AddMount("/mnt", llb.Scratch()).
Marshal(sb.Context())
require.NoError(t, err)

outDir = t.TempDir()
_, err = c.Solve(sb.Context(), def, SolveOpt{
Exports: []ExportEntry{
{
Type: ExporterLocal,
OutputDir: outDir,
},
},
CacheImports: []CacheOptionsEntry{
{
Type: "registry",
Attrs: map[string]string{
"ref": registry + "/buildkit/idc:latest",
"mode": "max",
},
},
},
}, nil)
require.NoError(t, err)

rand2, err := os.ReadFile(filepath.Join(outDir, "rand"))
require.NoError(t, err)

require.Equal(t, string(rand1), string(rand2))
}

func testSameChainIDWithLazyBlobsCacheMountBase(t *testing.T, sb integration.Sandbox) {
workers.CheckFeatureCompat(t, sb,
workers.FeatureCacheExport,
workers.FeatureCacheImport,
workers.FeatureCacheBackendRegistry,
)

c, err := New(sb.Context(), sb.Address())
require.NoError(t, err)
defer c.Close()

registry, err := sb.NewRegistry()
if errors.Is(err, integration.ErrRequirements) {
t.Skip(err.Error())
}
require.NoError(t, err)

// push the base busybox image, ensuring it uses gzip

def, err := llb.Image("busybox:latest").
Marshal(sb.Context())
require.NoError(t, err)
busyboxGzipRef := registry + "/buildkit/busyboxgzip:latest"
_, err = c.Solve(sb.Context(), def, SolveOpt{
Exports: []ExportEntry{
{
Type: ExporterImage,
Attrs: map[string]string{
"name": busyboxGzipRef,
"push": "true",
"compression": "gzip",
"force-compression": "true",
},
},
},
}, nil)
require.NoError(t, err)

// push the base busybox image plus an extra layer, ensuring it uses zstd
// the extra layer allows us to avoid edge-merge/cache-load later
def, err = llb.Image("busybox:latest").
Run(llb.Shlex(`touch /foo`)).Root().
Marshal(sb.Context())
require.NoError(t, err)
busyboxZstdRef := registry + "/buildkit/busyboxzstd:latest"
_, err = c.Solve(sb.Context(), def, SolveOpt{
Exports: []ExportEntry{
{
Type: ExporterImage,
Attrs: map[string]string{
"name": busyboxZstdRef,
"push": "true",
"compression": "zstd",
"force-compression": "true",
},
},
},
}, nil)
require.NoError(t, err)

ensurePruneAll(t, c, sb)

// create non-lazy cache refs for the zstd image
def, err = llb.Image(busyboxZstdRef).
Run(llb.Shlex(`true`)).Root().
Marshal(sb.Context())
require.NoError(t, err)
_, err = c.Solve(sb.Context(), def, SolveOpt{}, nil)
require.NoError(t, err)

// use the gzip image as a cache mount base, the cache ref will be deduped by
// chainID with the zstd layers made in the previous solve
def, err = llb.Image(busyboxZstdRef).Run(
llb.Shlex(`touch /mnt/bar`),
llb.AddMount("/mnt",
llb.Image(busyboxGzipRef),
llb.AsPersistentCacheDir("idc", llb.CacheMountShared),
),
).Root().Marshal(sb.Context())
require.NoError(t, err)
_, err = c.Solve(sb.Context(), def, SolveOpt{}, nil)
require.NoError(t, err)

// try to re-use the cache mount from before, ensure we successfully get
// the same one writen to in previous step
def, err = llb.Image(busyboxZstdRef).Run(
llb.Shlex(`stat /mnt/bar`),
llb.AddMount("/mnt",
llb.Image(busyboxGzipRef),
llb.AsPersistentCacheDir("idc", llb.CacheMountShared),
),
).Root().Marshal(sb.Context())
require.NoError(t, err)
_, err = c.Solve(sb.Context(), def, SolveOpt{}, nil)
require.NoError(t, err)
}
11 changes: 9 additions & 2 deletions solver/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ func (e *exporter) ExportTo(ctx context.Context, t CacheExporterTarget, opt Cach
return nil, err
}

if e.edge != nil {
op, ok := e.edge.op.(*sharedOp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking the source it seems activeOp interface is redundant and could be removed, removing the need for this cast.

if ok && op != nil && op.st != nil {
ctx = withAncestorCacheOpts(ctx, op.st)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to cache this per st?

}
}

remotes, err := cm.results.LoadRemotes(ctx, res, opt.CompressionOpt, opt.Session)
if err != nil {
return nil, err
Expand Down Expand Up @@ -172,7 +179,7 @@ func (e *exporter) ExportTo(ctx context.Context, t CacheExporterTarget, opt Cach
for _, dep := range deps {
recs, err := dep.CacheKey.Exporter.ExportTo(ctx, t, opt)
if err != nil {
return nil, nil
return nil, err
}
for _, r := range recs {
srcs[i] = append(srcs[i], expr{r: r, selector: dep.Selector})
Expand All @@ -184,7 +191,7 @@ func (e *exporter) ExportTo(ctx context.Context, t CacheExporterTarget, opt Cach
for _, de := range e.edge.secondaryExporters {
recs, err := de.cacheKey.CacheKey.Exporter.ExportTo(ctx, t, opt)
if err != nil {
return nil, nil
return nil, err
}
for _, r := range recs {
srcs[de.index] = append(srcs[de.index], expr{r: r, selector: de.cacheKey.Selector})
Expand Down
14 changes: 13 additions & 1 deletion solver/llbsolver/mounts/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/moby/buildkit/util/grpcerrors"
"github.com/moby/locker"
"github.com/moby/sys/userns"
digest "github.com/opencontainers/go-digest"
"github.com/pkg/errors"
"google.golang.org/grpc/codes"
)
Expand Down Expand Up @@ -123,7 +124,18 @@ func (g *cacheRefGetter) getRefCacheDirNoCache(ctx context.Context, key string,
}
locked := false
for _, si := range sis {
if mRef, err := g.cm.GetMutable(ctx, si.ID()); err == nil {
mRef, err := g.cm.GetMutable(ctx, si.ID())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused how this case is possible. Shouldn't making a mutable ref on top of lazy ref already unlazy it? What is the point of mutable ref it it is lazy? Afaics you can't "mutate" it if it is lazy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the relevant integ test case added here (it fails before the commits here). You can end up with cache refs that have lazy blobs but a valid working snapshot if they are deduped by chainID from another non-lazy ref.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm still confused. So lets say we have ref in this lazy state.

Are you saying I can call:

newref = cm.New(ctx, ref)
newref.Mount(ctx)
newid = newref.ID()
newref.Release(ctx)

And all that would work fine.

But after that I can't call.

cm.GetMutable(ctx, newid)

and would get an error unless I put something special in the context?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I guess I kind of understand that logic. The ref provided to this function has the descHandlers while cm.GetMutable(id).Parent() does not when it is loaded from bolt.

That si.ID() matches a mref that has ref as its parent is somewhat accidental (it is achieved by putting the actual ref.ID as a string into the mount key).

Still feels that something wrong in API design in here, but no specific ideas how to improve.

var needsRemoteProviders cache.NeedsRemoteProviderError
if errors.As(err, &needsRemoteProviders) && ref != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As calling descHandlers does not seem expensive I would add it always, instead of checking for error.

descHandlers := cache.DescHandlers(make(map[digest.Digest]*cache.DescHandler))
for _, dgst := range needsRemoteProviders {
if handler := ref.DescHandler(dgst); handler != nil {
descHandlers[dgst] = handler
}
}
mRef, err = g.cm.GetMutable(ctx, si.ID(), descHandlers)
}
if err == nil {
bklog.G(ctx).Debugf("reusing ref for cache dir %q: %s", id, mRef.ID())
return mRef, nil
} else if errors.Is(err, cache.ErrLocked) {
Expand Down
9 changes: 0 additions & 9 deletions solver/llbsolver/provenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -398,18 +398,9 @@ func NewProvenanceCreator(ctx context.Context, cp *provenance.Capture, res solve
return nil, err
}

wref, ok := r.Sys().(*worker.WorkerRef)
if !ok {
return nil, errors.Errorf("invalid worker ref %T", r.Sys())
}

addLayers = func() error {
e := newCacheExporter()

if wref.ImmutableRef != nil {
ctx = withDescHandlerCacheOpts(ctx, wref.ImmutableRef)
}

if _, err := r.CacheKeys()[0].Exporter.ExportTo(ctx, e, solver.CacheExportOpt{
ResolveRemotes: resolveRemotes,
Mode: solver.CacheExportModeRemoteOnly,
Expand Down
17 changes: 0 additions & 17 deletions solver/llbsolver/solver.go
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,6 @@ func runCacheExporters(ctx context.Context, exporters []RemoteCacheExporter, j *
err = inBuilderContext(ctx, j, exp.Exporter.Name(), id, func(ctx context.Context, _ session.Group) error {
prepareDone := progress.OneOff(ctx, "preparing build cache for export")
if err := result.EachRef(cached, inp, func(res solver.CachedResult, ref cache.ImmutableRef) error {
ctx = withDescHandlerCacheOpts(ctx, ref)

// Configure compression
compressionConfig := exp.Config().Compression

Expand Down Expand Up @@ -998,7 +996,6 @@ func inlineCache(ctx context.Context, ie inlineCacheExporter, res solver.CachedR
digests = append(digests, desc.Digest)
}

ctx = withDescHandlerCacheOpts(ctx, workerRef.ImmutableRef)
refCfg := cacheconfig.RefConfig{Compression: compressionopt}
if _, err := res.CacheKeys()[0].Exporter.ExportTo(ctx, ie, solver.CacheExportOpt{
ResolveRemotes: workerRefResolver(refCfg, true, g), // load as many compression blobs as possible
Expand All @@ -1011,20 +1008,6 @@ func inlineCache(ctx context.Context, ie inlineCacheExporter, res solver.CachedR
return ie.ExportForLayers(ctx, digests)
}

func withDescHandlerCacheOpts(ctx context.Context, ref cache.ImmutableRef) context.Context {
return solver.WithCacheOptGetter(ctx, func(includeAncestors bool, keys ...interface{}) map[interface{}]interface{} {
vals := make(map[interface{}]interface{})
for _, k := range keys {
if key, ok := k.(cache.DescHandlerKey); ok {
if handler := ref.DescHandler(digest.Digest(key)); handler != nil {
vals[k] = handler
}
}
}
return vals
})
}

func (s *Solver) Status(ctx context.Context, id string, statusChan chan *client.SolveStatus) error {
if err := s.history.Status(ctx, id, statusChan); err != nil {
if !errors.Is(err, os.ErrNotExist) {
Expand Down
Loading