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

Upgrade to containerd 2 #5507

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

slonopotamus
Copy link
Contributor

@slonopotamus slonopotamus commented Nov 10, 2024

This PR depends on

Non-import changes:

  1. stargz-snapshotter dependency was bumped to unreleased commit because of containerd api changes
  2. fuse-overlayfs-snapshotter dependency was bumped to v2.0.0
  3. ExpiresIn was changed to ExpiresInSeconds in authprovider.go
  4. Workaround for archive: use 1970-01-01 as the whiteout timestamp containerd/containerd#8764 was removed in overlay_linux.go
  5. Minor code cleanup in main_containerd_worker_windows.go
  6. Adjust expected string in testUndeclaredArg in dockerfile_lint_test.go
  7. I dropped testSchema1Image test. It is very nontrivial to push CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1 env variable from a single place to both rootful and rootless tests (if you know such place, tell me!). Schema v1 is going away in containerd 2.1 anyway. buildkit still supports in currently. If this change is unacceptable... Well, need more time to find where exactly to put CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1 in buildkit test framework.

Closes #4630
Closes #5514

@github-actions github-actions bot added the area/hack building buildkit itself label Nov 12, 2024
@slonopotamus slonopotamus force-pushed the containerd-2 branch 4 times, most recently from 14b9621 to ae13fa9 Compare November 12, 2024 09:08
@github-actions github-actions bot removed the area/hack building buildkit itself label Nov 12, 2024
@slonopotamus slonopotamus force-pushed the containerd-2 branch 2 times, most recently from f20a6d7 to 6aef995 Compare November 12, 2024 09:37
@github-actions github-actions bot added the area/hack building buildkit itself label Nov 12, 2024
@slonopotamus
Copy link
Contributor Author

slonopotamus commented Nov 12, 2024

Current status:

  1. TestExportedImageLabels fails on both Windows and Linux when containerd is used:
=== RUN   TestIntegration/TestExportedImageLabels/worker=containerd
    client_test.go:489: 
        	Error Trace:	D:/a/buildkit/buildkit/client/client_test.go:489
        	            				D:/a/buildkit/buildkit/util/testutil/integration/run.go:97
        	            				D:/a/buildkit/buildkit/util/testutil/integration/run.go:211
        	Error:      	Should be true
        	Test:       	TestIntegration/TestExportedImageLabels/worker=containerd
  1. TestSchema1Image fails in rootless configurations:
client_test.go:6914: 
        	Error Trace:	/src/client/client_test.go:6914
        	            				/src/util/testutil/integration/run.go:97
        	            				/src/util/testutil/integration/run.go:211
        	Error:      	Received unexpected error:
        	            	failed to load cache key: Pulling Schema 1 images have been deprecated and disabled by default since containerd v2.0. As a workaround you may set an environment variable `CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1`, but this will be completely removed in containerd v2.1.

I'm currently trying to understand where I need to pass CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1 env variable in rootless setup and why my change to hack/test doesn't apply to it (though it works for rootful)

  1. And... that's all, other things seem to be green.

@github-actions github-actions bot removed the area/hack building buildkit itself label Nov 12, 2024
@slonopotamus slonopotamus force-pushed the containerd-2 branch 3 times, most recently from a1417b2 to 3714e61 Compare November 12, 2024 10:51
@github-actions github-actions bot added the area/hack building buildkit itself label Nov 12, 2024
@thompson-shaun thompson-shaun mentioned this pull request Nov 12, 2024
5 tasks
client/client_test.go Outdated Show resolved Hide resolved
@dmcgowan
Copy link
Member

We should figure out why the test is failing but I also think its time to roadmap removal of the schema1 support. Especially for build use cases, there shouldn't be a need to build from such old images as a base. If so, explicit conversion may not be so bad if some users still require.

@slonopotamus
Copy link
Contributor Author

slonopotamus commented Nov 12, 2024

One last failing test is related to the way how rootless tests are set up. See #4630 (comment) for discussion.

@slonopotamus slonopotamus force-pushed the containerd-2 branch 2 times, most recently from a6e0281 to 0905473 Compare November 13, 2024 07:33
@github-actions github-actions bot removed the area/hack building buildkit itself label Nov 13, 2024
Signed-off-by: Marat Radchenko <[email protected]>
Schema v1 support will be removed in containerd-2.1.

While we continue to support it when containerd is launches with CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1 env variable, the effort to keep the test working isn't worth it.

Signed-off-by: Marat Radchenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to containerd 2.0
3 participants