-
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: pull: do not enforce pull if local image matches #1287
libimage: pull: do not enforce pull if local image matches #1287
Conversation
I verified that the test fails without the code changes. Fixes: podman/issues/17063 Signed-off-by: Valentin Rothberg <[email protected]>
[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 |
LGTM |
// correct image. | ||
// | ||
// NOTE that this is will even override --pull={false,never}. | ||
pullPolicy = config.PullPolicyNewer | ||
logrus.Debugf("Enforcing pull policy to %q to pull custom platform (arch: %q, os: %q, variant: %q) - local image may mistakenly specify wrong platform", pullPolicy, options.Architecture, options.OS, options.Variant) | ||
localImageMatches := false |
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.
Is the comment at line 507 correct? Just to be sure, --pull=never
, should NEVER be overridden. If it is specified, we should not pull an image, we should only use the local image. It does look like we don't get in here on pull=never, and I'm hoping the comment is just off....
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 comment is off. The condition above includes pullPolicy != config.PullPolicyNever
.
I plan on massaging/simplifying this code in the future where I can cleanup comments as well.
Merge me |
/lgtm |
I verified that the test fails without the code changes.
Fixes: github.com/containers/podman/issues/17063
Signed-off-by: Valentin Rothberg [email protected]
@rhatdan PTAL