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

Unqualified --pull was changed to a no-op #5723

Open
Blzut3 opened this issue Sep 6, 2024 · 1 comment
Open

Unqualified --pull was changed to a no-op #5723

Blzut3 opened this issue Sep 6, 2024 · 1 comment

Comments

@Blzut3
Copy link

Blzut3 commented Sep 6, 2024

Description

As of podman 5.2, the behavior of podman build --pull changed to a no-op. Per docker (and previous podman releases), when --pull is not specified images should only be pulled if missing, if it is specified then it should always pull. This can be worked around by qualifying --pull=always explicitly.

However, podman's behavior around this flag does not appear to have been changed but rather the inherited flag from buildah seems to be at fault. Specifically it looks like pull request #5583 was intended to be a documentation only change but accidentally functionally changed --pull from the docker compatible meaning of --pull=always to being a no-op with the default behavior. It seems there was a misunderstanding that --pull string[="true"] is trying to communicate that if the =true part isn't specified than true would be used not that it's the default when --pull isn't present (the value for which is at the end of the help text itself and is currently the correct value).

Reverting that change fixes the issue, but should probably read "always" instead of "true".

Of note, podman's code has had the DefValue property changed to "missing" to correct a similar documentation issue there. Not NoOptDefVal. I believe this got mirrored in buildah by the same author in changeset 5afd52f.

Steps to reproduce the issue:

  1. Create Containerfile with a FROM ... line.
  2. Run podman build -f Containerfile multiple times and note that it only pulls if missing.
  3. Add --pull to the command and note that the image is still only being pulled if missing instead of behaving like --pull=always.

Output of podman version if reporting a podman build issue:

Client:       Podman Engine
Version:      5.3.0-dev
API Version:  5.3.0-dev
Go Version:   go1.22.2
Git Commit:   a26a493f6b3eddcb30151473a8ca2f3ce7089bf3
Built:        Thu Sep  5 22:31:08 2024
OS/Arch:      linux/amd64

Output of cat /etc/*release:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo

Output of uname -a:

Linux AMD-1950X 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Copy link

github-actions bot commented Oct 7, 2024

A friendly reminder that this issue had no activity for 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant