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
Pull image regardless of whether it exists locally if tag=latest
#9781
Conversation
6ab8bee
to
02ae480
Compare
... and pull policy is `missing` or `if_not_present` Signed-off-by: Laura Brehm <laurabrehm@hey.com>
02ae480
to
2357348
Compare
|
||
assert.Assert(t, strings.Contains(output, "simple Skipped - Image is already present locally")) | ||
// image with :latest tag gets pulled regardless if pull_policy: missing or if_not_present | ||
assert.Assert(t, strings.Contains(output, "latest Pulled")) |
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.
For ease of review, this was the change in the test, with the preceding comment and the accompanying change in the compose.yaml
used for the test
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
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
return false | ||
} | ||
_, ok = localImages[serviceImage] | ||
return ok && tagged.Tag() != "latest" |
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.
Does ParseDockerRef
normalize a missing tag to latest
?
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.
yup!
... and pull policy is
missing
orif_not_present
Signed-off-by: Laura Brehm laurabrehm@hey.com
What I did
Note: I also moved the
compose pull
related tests fromcompose_test.go
topull_test.go
.Related issue
(not mandatory) A picture of a cute animal, if possible in relation with what you did