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

Accept any sidecar termination reason #1265

Merged
merged 2 commits into from Sep 3, 2019
Merged

Accept any sidecar termination reason #1265

merged 2 commits into from Sep 3, 2019

Conversation

ghost
Copy link

@ghost ghost commented Sep 3, 2019

Changes

Fixes #1253

When a sidecar is forcefully exited by the taskrun controller it may
error out. This happens because the sidecar is terminated by having its
image field rewritten to be tekton's nop container. The nop container is
bare bones and probably doesnt contain the entrypoint command configured
for the sidecar. When this occurs the container will exit with an error
of some kind. On GKE this error's Reason is "ContainerCannotRun" but on
MiniShift/OpenShift the error Reason is "Error".

The sidecar e2e test previously required a termination Reason of
ContainerCannotRun or Completed but this appears to be too rigid.
Instead the test now considers a sidecar that has been terminated for
any reason to be a success.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

Reviewer Notes

If API changes
are included, additive changes
must be approved by at least two OWNERS
and backwards incompatible changes
must be approved by more than 50% of the OWNERS,
and they must first be added
in a backwards compatible way.

@googlebot googlebot added the cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit label Sep 3, 2019
@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 3, 2019
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom, sbwsg

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

Fixes #1253

When a sidecar is forcefully exited by the taskrun controller it may
error out. This happens because the sidecar is terminated by having its
image field rewritten to be tekton's nop container. The nop container is
bare bones and probably doesnt contain the entrypoint command configured
for the sidecar. When this occurs the container will exit with an error
of some kind. On GKE this error's Reason is "ContainerCannotRun" but on
MiniShift/OpenShift the error Reason is "Error".

The sidecar e2e test previously required a termination Reason of
"ContainerCannotRun" or "Completed" but this appears to be too rigid.
Instead the test now considers a sidecar that has been terminated for
any reason to be a success.
Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2019
@tekton-robot tekton-robot merged commit e7df1fb into tektoncd:master Sep 3, 2019
@chmouel
Copy link
Member

chmouel commented Sep 4, 2019

@sbwsg FYI, I have tested this change on openshift and it was working! thanks

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. cla: yes Trying to make the CLA bot happy with ppl from different companies work on one commit lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

testSideCar is failing
4 participants