-
Notifications
You must be signed in to change notification settings - Fork 2.6k
kube play: fix pull policy #19805
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
kube play: fix pull policy #19805
Conversation
@edsantiago, PTAL at the tests. |
@vrothberg Afaics podman CI is blocked since some images on quay.io are missing. |
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.
Minor comment from first review pass; will wait for PR to stabilize before reviewing again.
Thank you for this!
test/system/700-play.bats
Outdated
$PODMAN --debug kube play $yaml_source 2>$stderr | ||
if [[ $status != 0 ]]; then | ||
cat $stderr | ||
die "kube play failed: $output" |
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.
There is no $output
from running $PODMAN
.
I understand your reluctance to "pollute logs", but please remember that the logs are invisible unless there's an error. If there's an error, wouldn't we want to see full logs? It seems safer to stick with run_podman
IMO.
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.
Ah, I wasn't aware. Will change, thanks!
Use the `newer` pull policy only for the "latest" tag and default to using `missing` otherwise. This speeds up `kube play` as it'll skip reaching out to the registry and also fixes other side-effects described in containers#19801. Fixes: containers#19801 Signed-off-by: Valentin Rothberg <[email protected]>
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, I think this makes perfect sense.
I cherry-picked this on my (unsubmitted) ExitCleanly()
work in play_kube_test.go
and am seeing far, far, far fewer failures. As in, a handful instead of dozens. Thank you!
_write_test_yaml command=true image=$local_image | ||
|
||
run_podman --debug kube play $yaml_source | ||
assert "$output" =~ "Pulling image $local_image \(policy\: newer\)" "pull policy is set to newhen pulling latest tag" |
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.
I could make a culturally insensitive remark here about wordstogethersmashing norms, but I won't. Oh, wait, I just did.
(Not worth re-pushing for. I kind of like it).
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, 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 |
@flouthoc PTAL |
@giuseppe PTAL |
/lgtm |
Use the
newer
pull policy only for the "latest" tag and default to usingmissing
otherwise. This speeds upkube play
as it'll skip reaching out to the registry and also fixes other side-effects described in #19801.Fixes: #19801
Does this PR introduce a user-facing change?