Disable manifest v2 schema 1 push#41295
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
distribution/push_v2.go
Outdated
There was a problem hiding this comment.
The env should contain _UNSUPPORTED or _DONOTUSE
distribution/push_v2.go
Outdated
There was a problem hiding this comment.
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 <[email protected]>
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.
Why oh why would it fail with such a misleading error message 😞
There was a problem hiding this comment.
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_DONOTUSEenvironment 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)