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

empty build-arg passthru is broken #514

Closed
nitzmahone opened this issue May 2, 2023 · 0 comments · Fixed by #517
Closed

empty build-arg passthru is broken #514

nitzmahone opened this issue May 2, 2023 · 0 comments · Fixed by #517
Labels
needs_triage New item that needs to be triaged

Comments

@nitzmahone
Copy link
Member

The custom --build-arg splitter logic in the builder CLI doesn't properly preserve args with an empty value; they are conflated with args without a value. eg:

ansible-builder build --build-arg PKGMGR_PRESERVE_CACHE=

should force an empty value, but since the trailing = is dropped by the splitter logic (BuildArgAction in cli.py), once passed to the underlying build CLI, it leaves the existing value (if any) or enables it to come from the environment.

Need to update the splitter logic to support preserving empty strings, as well as only splitting on the first =.

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label May 2, 2023
Akasurde added a commit to Akasurde/ansible-builder that referenced this issue May 3, 2023
* Split for first equal sign in build-args
* Honor empty values in build-args

Fixes: ansible#514

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to Akasurde/ansible-builder that referenced this issue May 4, 2023
* Split for first equal sign in build-args
* Honor empty values in build-args

Fixes: ansible#514

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Akasurde added a commit to Akasurde/ansible-builder that referenced this issue May 5, 2023
* Split for first equal sign in build-args
* Honor empty values in build-args

Fixes: ansible#514

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Shrews pushed a commit that referenced this issue May 5, 2023
* Parse build-args for empty values
* Split for first equal sign in build-args
* Honor empty values in build-args

Fixes: #514

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_triage New item that needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant