-
Notifications
You must be signed in to change notification settings - Fork 365
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
Update name/tag embedded into schema1 manifests #88
Conversation
3d64071
to
7e35eb2
Compare
OK, this seems to work. @runcom PTAL. For the most part, we just need to stop ignoring the tag in Anyway, updating the manifest as well now that it is easy. I still need to finish tests in skopeo, so this may turn out to be broken, but manual testing suggests this is fine. |
Apparently this will break various tests, fairly significantly. For the most part, it’s the tests that are broken, because they are using schema1 all over the place and assume that manifests won’t change, that broken signatures will be preserved, etc., but that still might be reason enough to defer this a bit. We strictly need working v2 support for some of that, and that seems not to be available. |
Eventually, this fixes #51, |
13566e5
to
d5ca90f
Compare
f679c9e
to
d1fc8eb
Compare
d1fc8eb
to
6141fe6
Compare
6141fe6
to
8f66398
Compare
1dc2a3b
to
15a1cc5
Compare
59adb71
to
843aca8
Compare
34030f0
to
6a8c5c7
Compare
42b8df2
to
01c6ac1
Compare
5afcc2b
to
7136b19
Compare
7136b19
to
753bd06
Compare
032e8f7
to
ce40ecc
Compare
Fixed this to only use the registry-relative path instead of the full hostname/ns/repo name. The changes as such are quite stand-alone, but converting tests is much easier when coupled with schema1/schema2 autodetection and schema2 support for @aweiteka @baude FYI. This should allow pushing to old schema1-only registries (including old OpenShift), possible user-visible impact is that copying a schema1 image to a different repository path now changes the manifest digest. |
The CI tests in this repo fail with current skopeo, see containers/skopeo#337 for the skopeo counterpart which fixes, and extends, them. |
6d5ff14
to
8282ebf
Compare
This allows us to detect whether we need to edit the reference before trying to (i.e. before uploading any of the layers). The method interface may be a bit surprising, it is designed to hide the complexity and schema1 specifics in manifestSchema1; see the comment in that implementation for more details. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Add EmbbeddedDockerReference to types.ManifestUpdateOptions, and use it in copy.Image if necessary. Pushing signed schema1 images to a different location is impossible (skopeo users can use --remove-signatures), but signing an unsigned schema1 image while pushing it does work. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
8282ebf
to
0cd00ea
Compare
FIXME: Actually handle the manifest-embedded tags in schema 1. Without that, this is a fairly broken implementation (though might be better than nothing I suppose).
EDIT When pushing a schema1 image, update the name/tag embedded in the manifest. Recent registry versions ignore the fields, but older ones require them to match the registry/tag used to upload the image.