Skip to content

quadlet: handle generate environment params that inherit from host #26322

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NotSoFancyName
Copy link

Fixes: #26247

Does this PR introduce a user-facing change?

This fix allows the user to use Podman's default logic for propagating environment variables from the host to the container in the Quadlet generator

Copy link
Contributor

openshift-ci bot commented Jun 9, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: NotSoFancyName
Once this PR has been reviewed and has the lgtm label, please assign luap99 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

@baude
Copy link
Member

baude commented Jun 9, 2025

we ask for tests on most of our PRs; the CI is blocking because it did not find a test included. I think this is something you probably should add a test for to protect against regressions.

@ygalblum
Copy link
Contributor

ygalblum commented Jun 9, 2025

Thanks for the PR.
The problem with this change is that it works for --env and --label but does not work for others, e.g. --annotations which cannot be defined without a value.
Having said that, Quadlet does not validate inputs in other cases, so maybe it shouldn't do it here either. @Luap99 WDYT?

@Luap99
Copy link
Member

Luap99 commented Jun 10, 2025

Thanks for the PR. The problem with this change is that it works for --env and --label but does not work for others, e.g. --annotations which cannot be defined without a value. Having said that, Quadlet does not validate inputs in other cases, so maybe it shouldn't do it here either. @Luap99 WDYT?

Yeah right that is a good point. I think in general we should avoid input validation in quadlet as much as possible to avoid these kind of bugs so I am in favour of dropping these checks. If the input is invalid podman will still error.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Please squash the commits into one. As we want fixes and tests in the same commit.

code change itself LGTM

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

Successfully merging this pull request may close these issues.

Have quadlet generate environment params that inherit from host
4 participants