Skip to content
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 into
operator-framework:mainfrom
joelanford:fix-pull-reference
Oct 18, 2024
Merged

🐛 use spec's ref instead of canonical ref when copying catalog image#438
everettraven merged 1 commit into
operator-framework:mainfrom
joelanford:fix-pull-reference

Conversation

@joelanford

Copy link
Copy Markdown
Member

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.

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>
@joelanford joelanford requested a review from a team as a code owner October 18, 2024 20:17
@codecov

codecov Bot commented Oct 18, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.83%. Comparing base (d70f01f) to head (58b8eba).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@everettraven everettraven added this pull request to the merge queue Oct 18, 2024
Merged via the queue into operator-framework:main with commit 67d3a34 Oct 18, 2024
//
//////////////////////////////////////////////////////
dockerRef, err := docker.NewReference(canonicalRef)
dockerRef, err := docker.NewReference(imgRef)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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?

@joelanford joelanford deleted the fix-pull-reference branch October 22, 2024 13:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants