This repository was archived by the owner on Mar 3, 2025. It is now read-only.
🐛 use spec's ref instead of canonical ref when copying catalog image#438
Merged
everettraven merged 1 commit intoOct 18, 2024
Merged
Conversation
When used in conjuction with a "tag-only" registries.conf mirror registry configuration, our containers/image unpacker fails. This is because we resolve a canonical ref from the tag, and then use the digest-based reference to actually copy the image, thus thwarting the tag-only configuration. This commit ensures that we always copy the image using the reference provided in the spec. Signed-off-by: Joe Lanford <joe.lanford@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #438 +/- ##
=======================================
Coverage 37.83% 37.83%
=======================================
Files 15 15
Lines 1208 1208
=======================================
Hits 457 457
Misses 701 701
Partials 50 50 ☔ View full report in Codecov by Sentry. |
everettraven
approved these changes
Oct 18, 2024
m1kola
reviewed
Oct 21, 2024
| // | ||
| ////////////////////////////////////////////////////// | ||
| dockerRef, err := docker.NewReference(canonicalRef) | ||
| dockerRef, err := docker.NewReference(imgRef) |
Member
There was a problem hiding this comment.
@joelanford I think it would be great to have the explanation from PR description somewhere in a comment here.
Does it make sense to unit test this scenario?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When used in conjuction with a "tag-only" registries.conf mirror registry configuration, our containers/image unpacker fails. This is because we resolve a canonical ref from the tag, and then use the digest-based reference to actually copy the image, thus thwarting the tag-only configuration.
This commit ensures that we always copy the image using the reference provided in the spec.