-
Notifications
You must be signed in to change notification settings - Fork 202
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
libimage: enforce "latest" tag when looking up images #836
libimage: enforce "latest" tag when looking up images #836
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold Do not merge until containers/podman#12010 is green. |
@mtrmac @containers/podman-maintainers PTAL |
299ee14
to
9941e48
Compare
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.
AFAICS it used to be that all names, incl. those with domains, were looked up using the lax suffix matching; now it only looks up short names?
Am I misreading it? Arguably, the case of suffix-matching example.com/foo to example.com/example.com/foo is a non-obvious corner case, and I’m not at all saying that it makes any sense to do that; basically just that it’s very worth highlighting and making a conscious decision about whether we want to change that.
(And is there sufficient test coverage? Either I’m misreading what the change is, or it’s a bit surprising how little the tests needed to change for those changes. [OTOH I could see an argument that this weird legacy code path is not worth testing in detail — but then again that’s exactly the kind of code where we wouldn’t notice breakage without tests… Entirely up to you as owner of this project.])
@@ -389,15 +389,16 @@ func (r *Runtime) lookupImageInDigestsAndRepoTags(name string, options *LookupIm | |||
return nil, "", err |
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 limbo comment above might be worth moderating a bit.)
9941e48
to
196b5aa
Compare
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.
ACK, just non-blocking stylistic preferences.
Make sure to enforce the "latest" tag when looking up images in the local storage. Also make sure that digested short-names are subject to the extended digest lookups. Context: containers/podman/issues/11964 Signed-off-by: Valentin Rothberg <[email protected]>
196b5aa
to
1cfba15
Compare
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.
/lgtm |
/hold cancel |
Make sure to enforce the "latest" tag when looking up images in the
local storage. Also make sure that digested short-names are subject
to the extended digest lookups.
Context: containers/podman/issues/11964
Signed-off-by: Valentin Rothberg [email protected]