Skip to content
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

Change podman build --pull=true to PullIfMissing #8301

Merged
merged 1 commit into from
Nov 13, 2020
Merged

Change podman build --pull=true to PullIfMissing #8301

merged 1 commit into from
Nov 13, 2020

Conversation

TomSweeneyRedHat
Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat commented Nov 11, 2020

One last tweak to the man page for 'build --pull' and after
further testing against Docker, one slight change to the
pull policy. First I changed --pull=false from PullNever
to PullIfMissing. This matches Docker and will pull the
image if it's not present rather than erroring. We've
the --pull-never option if someone wants the pull to
not do an actual pull and to error if the image isn't
local.

Then for the man page, I'd a much bigger change, in the
initial PR, I've backed most of that out and just
added a tweak.
Hopefully, this puts this portion of the pull work behind
us for a while.

Signed-off-by: TomSweeneyRedHat [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: TomSweeneyRedHat

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 11, 2020
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

image from the registry only if the image is not present locally. Raise an
error if the image is not found in the registries.

If the option is not specified, pull the image from the registry if it is not
present locally or if there is a newer version on the registry. Raise an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is technically incorrect. It pulls if the registry version is different, not necessarily newer.

Image I create a container image and push it to a registry as :latest, later I find there is a big bug in my version, and remove it, causing the previous version to be :latest. Now if someone had pulled in my buggy image, and later pulls again they will revert back to the older image, even though they were PullIfNewer.

Container/Image has no way to determine whether or not one image is "NEWER" then another image, it can only check if the digest is different. We recently received a bug on this misunderstanding from a user, so we should not be documenting it incorrectly in the man pages and other docs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vrothberg I thought you had recently changed the check to pull only if the image had a newer date stamp, not that it had changed. Am I misremembering?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know, but as @mtrmac pointed out in a different issue/pr this is a bad idea, since it will not remove a bad image unless someone pushes a "new" version. As opposed to removing the old "new" image.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vrothberg I thought you had recently changed the check to pull only if the image had a newer date stamp, not that it had changed. Am I misremembering?

An earlier version of the shortnames PR for Buildah had that but I reverted that part based on the feedback. A digest check is really the way forward. Some images claim to be have been born before me which I doubt :^)

@umohnani8
Copy link
Member

LGTM

One last tweak to the man page for 'build --pull' and after
further testing against Docker, one slight change to the
pull policy.  First I changed `--pull=false` from PullNever
to PullIfMissing.  This matches Docker and will pull the
image if it's not present rather than erroring.  We've
the `--pull-never` option if someone wants the pull to
not do an actual pull and to error if the image isn't
local.

Then for the man page, I'd a much bigger change, in the
initial PR, I've backed most of that out and just
added a tweak.

Hopefully this puts this portion of the pull work behind
us for a while.

Signed-off-by: TomSweeneyRedHat <[email protected]>
@TomSweeneyRedHat TomSweeneyRedHat changed the title [CI:DOCS] One last build --pull man page change Change podman build --pull=true to PullIfMissing Nov 12, 2020
@TomSweeneyRedHat
Copy link
Member Author

Please re-review from the start. Much smaller change, plus I've added a Wiki page to explain the pull policies if you're interested in more depth.

@rhatdan
Copy link
Member

rhatdan commented Nov 13, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 13, 2020
@openshift-merge-robot openshift-merge-robot merged commit 42a5b0f into containers:master Nov 13, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants