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

fix: Don't override entrypoint if it's nil #6817

Conversation

maybe-sybr
Copy link
Contributor

This change ensures that we only override a container's entrypoint if
it is set to something other than nil.

Fixes #6565

@openshift-ci-robot
Copy link
Collaborator

Hi @maybe-sybr. Thanks for your PR.

I'm waiting for a containers member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 30, 2020
This change ensures that we only override a container's entrypoint if it
is set to something other than `nil`.

Signed-off-by: Matt Brindley <[email protected]>
@maybe-sybr maybe-sybr force-pushed the maybe/entrypoint-nil-means-inherit branch from 1c9b5b6 to aa69e68 Compare June 30, 2020 01:25
@maybe-sybr
Copy link
Contributor Author

maybe-sybr commented Jun 30, 2020

I'm hoping this won't affect any other callers, because it might have been considered valid to set the entrypoint to nil to remove it elsewhere in the codebase. I see the following examples which suggest that Entrypoint == nil means we shouldn't consider it:

https://github.com/containers/libpod/blob/b163ec35d0d42423c274019cb41013d558d6f822/cmd/podman/common/specgen.go#L391-L399
https://github.com/containers/libpod/blob/b163ec35d0d42423c274019cb41013d558d6f822/libpod/container_commit.go#L171-L173

So hopefully this is legit

@mheon
Copy link
Member

mheon commented Jun 30, 2020

LGTM.

@mheon
Copy link
Member

mheon commented Jun 30, 2020

I wouldn't worry about other callers. pkg/spec is legacy at this point. I'm really hoping we can remove it entirely soon in favor of using pkg/specgen for the compat create endpoint, and entirely removing Varlink (the only other caller)

@rhatdan
Copy link
Member

rhatdan commented Jun 30, 2020

/lgtm
/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2020
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2020
@rhatdan
Copy link
Member

rhatdan commented Jun 30, 2020

/approve
Thanks @maybe-sybr

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maybe-sybr, rhatdan

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 Jun 30, 2020
@TomSweeneyRedHat
Copy link
Member

LGTM
There was an error in the pause/unpause testing that I did not expect, I restarted it.

@rhatdan
Copy link
Member

rhatdan commented Jun 30, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2020
@rhatdan
Copy link
Member

rhatdan commented Jun 30, 2020

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 30, 2020
@openshift-merge-robot openshift-merge-robot merged commit 1dab8d1 into containers:master Jun 30, 2020
@maybe-sybr maybe-sybr deleted the maybe/entrypoint-nil-means-inherit branch July 3, 2020 00:53
@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. ok-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST API overrides container entrypoint to empty string when not provided to the create endpoint
6 participants