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

Resolve Entrypoint and Cmd if there is no command and no args #4832

Merged
merged 1 commit into from
May 4, 2022

Conversation

vdemeester
Copy link
Member

Changes

Prior to this change, if a Step specify neither command nor args,
the entrypoint resolver would only resolve the image Entrypoint and
thus, only executing that entrypoint. This is confusing to user as it
is not how a docker run without args produces.

This make the behavior very close to docker run. If there is no
command and no args specified, the entrypoint reslover will join the
image Entrypoint and Cmd.

Signed-off-by: Vincent Demeester vdemeest@redhat.com

/kind bug

Fixes #4794

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in
    (if there are no user facing changes, use release note "NONE")

Release Notes

The entrypoint resolve will now reslove `Entrypoint` and `Cmd` in case
the steps has no command and no args specified.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels May 4, 2022
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 4, 2022
@vdemeester
Copy link
Member Author

/cc @abayer @imjasonh

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/pod/entrypoint_lookup.go 85.7% 86.4% 0.6
pkg/pod/entrypoint_lookup_impl.go 74.2% 75.0% 0.8

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/pod/entrypoint_lookup.go 85.7% 86.4% 0.6
pkg/pod/entrypoint_lookup_impl.go 74.2% 75.0% 0.8

@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/pod/entrypoint_lookup.go 85.7% 86.4% 0.6
pkg/pod/entrypoint_lookup_impl.go 74.2% 75.0% 0.8

@abayer
Copy link
Contributor

abayer commented May 4, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2022
Prior to this change, if a Step specify neither `command` nor `args`,
the entrypoint resolver would only resolve the image `Entrypoint` and
thus, only executing that entrypoint. This is confusing to user as it
is not how a `docker run` without args produces.

This make the behavior very close to `docker run`. If there is no
command and no args specified, the entrypoint reslover will join the
image `Entrypoint` and `Cmd`.

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label May 4, 2022
@abayer
Copy link
Contributor

abayer commented May 4, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label May 4, 2022
@abayer
Copy link
Contributor

abayer commented May 4, 2022

/retest

@imjasonh
Copy link
Member

imjasonh commented May 4, 2022

/test pull-tekton-pipeline-go-coverage

@imjasonh
Copy link
Member

imjasonh commented May 4, 2022

/approve

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: imjasonh

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 4, 2022
@abayer
Copy link
Contributor

abayer commented May 4, 2022

/retest

@tekton-robot tekton-robot merged commit 50d89bb into tektoncd:main May 4, 2022
@tekton-robot
Copy link
Collaborator

@vdemeester: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-tekton-pipeline-go-coverage f7a6c03 link /test pull-tekton-pipeline-go-coverage

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@vdemeester vdemeester deleted the 4794-entrypoint-lookup branch May 4, 2022 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task does not run the CMD of the Dockerfile
4 participants