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

kube play: complete container spec #17107

Merged
merged 1 commit into from
Jan 14, 2023

Conversation

vrothberg
Copy link
Member

Make sure that the specs of containers generated by kube play are correctly completed. They have not before which surfaced in default environment variables not being set.

Fixes: #17016
Signed-off-by: Valentin Rothberg [email protected]

Does this PR introduce a user-facing change?

Fix a bug in `kube play` where default environments variables have not been applied to containers.

Make sure that the specs of containers generated by `kube play` are
correctly completed.  They have not before which surfaced in default
environment variables not being set.

Fixes: containers#17016
Signed-off-by: Valentin Rothberg <[email protected]>
@vrothberg vrothberg marked this pull request as ready for review January 13, 2023 14:19
@vrothberg
Copy link
Member Author

@Luap99 @rhatdan @umohnani8 PTAL

@openshift-ci openshift-ci bot added release-note do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jan 13, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 13, 2023
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.

LGTM, comment is not a blocker because this is an existing issue with that code.

Comment on lines +741 to +743
for _, w := range warn {
fmt.Fprintf(os.Stderr, "%s\n", w)
}
Copy link
Member

Choose a reason for hiding this comment

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

I see the other callers do the same but shouldn't we use logrus.Warn() for this? It feels very ugly to just print somewhere in the backend where the callers have no control over it. I would argue that podman --log-level=error should not show such messages if they are just warnings.

Copy link
Member Author

Choose a reason for hiding this comment

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

I also don't like printing to stderr. But as you mentioned, it's consistent with other call sites, so I didn't change it.

I am supportive of changing those to logrus.Warn*. There's probably more such cases across the code base.

@mheon
Copy link
Member

mheon commented Jan 13, 2023

LGTM once the comment on logging is addressed (personally, don't have a preference, good to merge with either)

@vrothberg
Copy link
Member Author

vrothberg commented Jan 13, 2023 via email

@TomSweeneyRedHat
Copy link
Member

LGTM

@TomSweeneyRedHat
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 13, 2023
@vrothberg
Copy link
Member Author

/hold cancel

@rhatdan rhatdan removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 14, 2023
@openshift-merge-robot openshift-merge-robot merged commit cdcd2ed into containers:main Jan 14, 2023
@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 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 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. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: container inconsistancy between play-kube and manual run
6 participants