-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Remove v2 schema1 push #39384
Remove v2 schema1 push #39384
Conversation
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.
Should we copy the functions from libtrust, and remove the dependency?
@thaJeztah I tried to do that, but distribution code also depends on libtrust. I believe the dependency can be completely removed with containerd integration. |
info, err := c.Info(context.Background()) | ||
assert.NilError(t, err) | ||
|
||
_, err = uuid.Parse(info.ID) |
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.
Wondering to what extent we need to check the actual format, given
Lines 3365 to 3370 in 18b2306
Unique identifier of the daemon. | |
<p><br /></p> | |
> **Note**: The format of the ID itself is not part of the API, and | |
> should not be considered stable. |
Orthogonal to this; we should look at what purpose this field now serves. In a multi-node setup (Swarm cluster), there's also Swarm.NodeID
, which is unique in the cluster, and is the ID that's used when running docker node ls
(was even considering to copy that value here, but of course it wouldn't be there if swarm-mode is not active)
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.
@thaJeztah I'm not sure what to do with the swarmkit NodeID. I'd like to unblock this PR though. I personally don't need a UUID check, so I could just check for the non-emptiness of the ID. cc @justincormack
713ee0c
to
19b3220
Compare
Codecov Report
@@ Coverage Diff @@
## master #39384 +/- ##
=========================================
Coverage ? 37.32%
=========================================
Files ? 609
Lines ? 45177
Branches ? 0
=========================================
Hits ? 16863
Misses ? 26032
Partials ? 2282 |
Updated |
Probably there are people who are still using an older version of Quay w/o support for schema2 |
ref: moby/buildkit#409 |
Hi @tiborvass, TL of Quay here If manifest V2_1 was deprecated in a PR only 24 days ago, why is the push code being removed so quickly afterwards? Ignoring the (long but interesting) reasons as to why Quay.io hasn't fully enabled support for V2_2 yet (which I'll be discussing in a talk publicly sometime), this fast of a removal seems counter to standard enterprise deprecation guidelines. Speaking only for myself, I think it would be better to keep V2_1 push for the time being and emit a warning message indicating that an older manifest version is being used and that it will be removed in a future release. In fact, this is what was done when Docker moved from protocol V1 to protocol V2, which allowed users to continue using older versions of registries, but with knowledge that they should upgrade soon. |
Hi @josephschorr! I believe we're on the same page. A bit of context though: the short-lived v2schema1 was deprecated 3+ years ago in favor of v2schema2 and although we did not have a timeline for complete removal, the intention was clear that v2schema2 deprecates v2schema1. If I'm not mistaken Quay was involved in discussions to migrate to v2schema2 for a long time, and I'm glad to see it happening in the beta program. When #37874 was merged, it not only removed dead code from v1 but also code from v2schema1 which is mainly used by Quay today and would have broken our users who rely on Quay. We caught that in time so we reverted the v2schema1 removal in #39365 to prevent breaking our users, while making sure this time we properly and officially deprecate v2schema1 despite the fact that all players know they should be using v2schema2. That PR does exactly what you describe, adding a warning that v2 schema1 will be removed in a future release: https://github.com/moby/moby/pull/39365/files#diff-8448734ad4bcad711a430d27d303ac16R161 We cherry-picked that into the next release of Docker as well. What may also cause confusion is that the master branch of moby went back and forth by removing v2schema1, reverting+warning, and this PR that's reverting the revert. I agree that doing the revert+warning in Docker's release branch would have been simpler. The end goal is for the next release to be the last release with v2schema1 support and have a deprecation warning, but the release after that will have v2schema1 removed. And because that will be based off of moby's current master branch, that is why it is being removed in this PR on moby master. I strongly hope that Quay's beta program that migrates to v2schema2 is a sign that the timelines for removing v2schema1 will align for both of us. |
Hi @tiborvass,
Definitely, although the lack of communication to end-users presented issues for them to understand why older registry versions no longer work, as the "manifest invalid" error is quite cryptic to those who don't know about the change. I'm glad this is being fixed now! :)
Yeah, this is definitely what confused me and I apologize if I came off as rude in my previous message as a result; I was under the (mistaken) impression that this PR was going to once again break users on older installations without warning.
So, the code is released to our on premises customers and they are using it without issue (AFAIK). Quay.io's delay in full release has, unfortunately, to do with an unrelated issue we've been addressing, but once that issue is fully addressed, we'll be completing the rollout to all our users. I'm hopeful this is no more than a few weeks away, but as we have to ensure performance and stability at all costs, its possible we find other blockers as we go along. On a personal note, I do highly appreciate this change - its making the delays on our side much less stressful, so thank you! :) |
Hi @tiborvass, We have customers that have pulled the code with this warning and are now seeing it when pulling manifest V2_1 images, which I believe is a mistake; it was my understanding that the V2_1 code being removed in the future was only for push, and that support would remain for pull to support older images that were pushed to registries years ago. Any ideas if we could get the message changed to only apply on push? |
@tiborvass Ping! Any updates on this? |
@josephschorr opened #39736 |
@tiborvass Thanks! |
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.
LGTM
@@ -80,10 +77,6 @@ func (s *DockerRegistrySuite) TestPullByTagDisplaysDigest(c *check.C) { | |||
testPullByTagDisplaysDigest(c) | |||
} | |||
|
|||
func (s *DockerSchema1RegistrySuite) TestPullByTagDisplaysDigest(c *check.C) { |
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 PR claims to be removing push, so why are these tests being removed?
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 whole schema1 test suite must be removed since that old version of the registry is no longer supported with Docker. If you can't push the image, you can't run the pull test. A new test which pulls an old version from the hub could be added, but that is fragile.
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.
These tests were added after a CVE fix so it seems weird to remove it without an alternative as the pull code is still remaining(probably for years) and needs to be validated.
947e194
to
5151efb
Compare
5151efb
to
4acd8a3
Compare
7ae4573
to
2e9a073
Compare
Did a quick rebase and fixed the gotest.tools import paths to use One more thing to fix looks like;
|
Partial revert of f23a51a. Only the schema1 push tests are removed but the schema1 pull tests are still desired. The UUID test is moved from integration-cli to integration. Signed-off-by: Tibor Vass <tibor@docker.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2e9a073
to
fc76598
Compare
Seeing a number of failures having
|
Also need to look at #41095 to see if we can remove that |
Looks like it's because we push to a v1 registry to verify that pulling still works;
|
Discussing what options we have with @tonistiigi - we could store the registry state in an image and pull that so that we don't have to push to those registries first (or perhaps prepare an image with the registry + data); need to think of options we have there, and what would work best |
closing this for now; a rebased version of this is in #42300, but closed for now; #42300 (comment)
|
Manifest v2 schema1 was deprecated in 4866f51 (#39365) and this PR
removes the push code for v2 schema1.
cc @cpuguy83 @dmcgowan @tonistiigi @thaJeztah @andrewhsu