-
Notifications
You must be signed in to change notification settings - Fork 788
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
Properly handle build --pull=false #5354
Conversation
f87aa31
to
6db9d40
Compare
pkg/parse/parse.go
Outdated
pullPolicy = define.PullNever | ||
} | ||
} | ||
|
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.
Maybe make this another value that the block that currently checks for "never" accepts?
tests/bud.bats
Outdated
@@ -4473,15 +4475,15 @@ EOM | |||
_prefetch alpine | |||
_prefetch debian | |||
|
|||
run_buildah build --build-arg base=alpine --build-arg toolchainname=busybox --build-arg destinationpath=/tmp --pull=false $WITH_POLICY_JSON -f $BUDFILES/from-with-arg/Containerfile . | |||
run_buildah build --build-arg base=alpine --build-arg toolchainname=busybox --build-arg destinationpath=/tmp --pull=ifmissing $WITH_POLICY_JSON -f $BUDFILES/from-with-arg/Containerfile . |
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.
This one shouldn't need changing - the only referenced images are prefetched. Does it start to fail without this change?
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.
It pulls busybox I believe.
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.
Well-spotted. If it's not using the "debian" image, might as well change it to prefetch busybox instead.
tests/bud.bats
Outdated
expect_output --substring "FROM alpine" | ||
expect_output --substring 'STEP 4/4: COPY --from=\$\{toolchainname\} \/ \$\{destinationpath\}' | ||
run_buildah rm -a | ||
} | ||
|
||
@test "bud preserve rootfs for --mount=type=bind,from=" { | ||
_prefetch alpine | ||
run_buildah build --build-arg NONCE="$(date)" --layers --pull=false $WITH_POLICY_JSON -f Dockerfile.3 $BUDFILES/cache-stages | ||
run_buildah build --build-arg NONCE="$(date)" --layers --pull=ifmissing $WITH_POLICY_JSON -f Dockerfile.3 $BUDFILES/cache-stages |
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.
This one shouldn't need changing - the only base image is prefetched. Does it start to fail without this change?
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.
Got a little carried away.
tests/run.bats
Outdated
@@ -574,7 +574,7 @@ function configure_and_check_user() { | |||
skip_if_no_runtime | |||
|
|||
_prefetch alpine | |||
run_buildah from --quiet --pull=false $WITH_POLICY_JSON alpine | |||
run_buildah from --quiet --pull=ifmissing $WITH_POLICY_JSON alpine |
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.
This one shouldn't need changing - the named image is prefetched. Does it start to fail without this change?
tests/run.bats
Outdated
@@ -583,7 +583,7 @@ function configure_and_check_user() { | |||
skip_if_no_runtime | |||
|
|||
_prefetch alpine | |||
run_buildah from --quiet --pull=false $WITH_POLICY_JSON alpine | |||
run_buildah from --quiet --pull=ifmissing $WITH_POLICY_JSON alpine |
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.
This one shouldn't need changing - the named image is prefetched. Does it start to fail without this change?
tests/run.bats
Outdated
@@ -838,7 +838,7 @@ $output" | |||
skip_if_no_runtime | |||
|
|||
_prefetch alpine | |||
run_buildah from --quiet --pull=false $WITH_POLICY_JSON alpine | |||
run_buildah from --quiet --pull=ifmissing $WITH_POLICY_JSON alpine |
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.
This one shouldn't need changing - the named image is prefetched. Does it start to fail without this change?
746d96f
to
9132a62
Compare
buildah build --pull=false is documented to never pull the image, but it is currently ignored. Fixes: containers/podman#21783 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
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
Restarted CI |
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
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc, rhatdan, 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 |
/unhold |
buildah build --pull=false is documented to never pull the image, but it is currently ignored.
Fixes: containers/podman#21783
What type of PR is this?
What this PR does / why we need it:
How to verify it
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?