-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Disable manifest v2 schema 1 push #41295
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
Conversation
Opening as draft; this should currently fail as I'm not setting the environment variable yet in CI |
Great; it's working;
|
7b3dade
to
6f62564
Compare
distribution/push_v2.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support for pushing
distribution/push_v2.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The env should contain _UNSUPPORTED
or _DONOTUSE
distribution/push_v2.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should return the original error. Can wrap it with removal message.
edit: Test how it looks like for example when pushing to invalid ref. Doesn't make sense to get deprecation warning about schema1 if I'm just not getting a connection to registry at all. Possibly error happens on specific way when schema2 is not supported.
6f62564
to
39812b9
Compare
@tonistiigi updated, PTAL |
Failure is unrelated (I'll kick CI once more), but the change in this PR does show more details about what failed;
|
For CI, a temporary `DOCKER_ALLOW_SCHEMA1_PUSH_DONOTUSE` environment variable was added while we work out a solution for testing schema 1 pulls (which currently require pushing them to a local registry first for testing). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
39812b9
to
6302dbb
Compare
Could we run |
we were discussing to either have a registry image with the v1 images "baked in", or to load the images directly in the registry storage, or perhaps an image with just the data store for a registry. Actually pushing images wouldn't strictly be needed in that approach (but well have to try what works best) |
// manifest v2 schema 1 images to test-registries used for testing *pulling* | ||
// these images. | ||
if os.Getenv("DOCKER_ALLOW_SCHEMA1_PUSH_DONOTUSE") == "" { | ||
if err.Error() == "tag invalid" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why oh why would it fail with such a misleading error message 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea 😞 this is what the test returned as error, so it's a "best effort"
temporary alternative for
For CI, a temporary
DOCKER_ALLOW_SCHEMA1_PUSH_DONOTUSE
environment variable was added while we work out a solution for testing schema 1 pulls (which currently require pushing them to a local registry first for testing).- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)