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

Terminate TaskRun when Pod fails due to ImagePullBackOff. #4921

Conversation

chitrangpatel
Copy link
Contributor

@chitrangpatel chitrangpatel commented May 31, 2022

Changes

Prior to this, if the Pod was in ImagePullBackOff state,
the TaskRun would remain Running with the message Pending until it eventually timed out.
This led to lots of delays. The expected behavior should have been to
terminate the TaskRun and set it to fail. This PR addresses issue
#4895.

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

Terminate TaskRun when Pod fails due to ImagePullBackOff.

@tekton-robot tekton-robot added 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. labels May 31, 2022
@chitrangpatel
Copy link
Contributor Author

/assign @dibyom

@chitrangpatel
Copy link
Contributor Author

/assign @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/reconciler/taskrun/taskrun.go 80.3% 80.6% 0.3

@chitrangpatel chitrangpatel force-pushed the ImagePullBackOff-set-taskrun-failure branch from d1bc601 to fff9b71 Compare May 31, 2022 18:09
@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/reconciler/taskrun/taskrun.go 80.3% 80.6% 0.3

@chitrangpatel chitrangpatel force-pushed the ImagePullBackOff-set-taskrun-failure branch from fff9b71 to 7c29a4c Compare May 31, 2022 18:15
@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/reconciler/taskrun/taskrun.go 80.3% 80.6% 0.3

@chitrangpatel
Copy link
Contributor Author

/retest

pkg/reconciler/taskrun/taskrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/taskrun/taskrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/taskrun/taskrun_test.go Outdated Show resolved Hide resolved
pkg/reconciler/taskrun/taskrun_test.go Outdated Show resolved Hide resolved
@chitrangpatel chitrangpatel force-pushed the ImagePullBackOff-set-taskrun-failure branch from 7c29a4c to 6fbbcde Compare May 31, 2022 19:48
@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/reconciler/taskrun/taskrun.go 80.3% 80.6% 0.3

pkg/reconciler/taskrun/taskrun.go Outdated Show resolved Hide resolved
@dibyom
Copy link
Member

dibyom commented Jun 7, 2022

Thanks @chitrangpatel This looks good to me. I think we can merge once you address Andrew's comment above!

@chitrangpatel chitrangpatel force-pushed the ImagePullBackOff-set-taskrun-failure branch from 6fbbcde to acacb88 Compare June 8, 2022 15:01
@chitrangpatel
Copy link
Contributor Author

Thanks @chitrangpatel This looks good to me. I think we can merge once you address Andrew's comment above!

Sounds good! Just made the change.

@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/reconciler/taskrun/taskrun.go 80.3% 80.8% 0.5

@abayer
Copy link
Contributor

abayer commented Jun 8, 2022

/lgtm

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

abayer commented Jun 8, 2022

/retest

@chitrangpatel
Copy link
Contributor Author

/test pull-tekton-pipeline-alpha-integration-tests

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

thanks @chitrangpatel!

pkg/reconciler/taskrun/taskrun.go Outdated Show resolved Hide resolved
Prior to this, if the Pod was in ImagePullBackOff state,
the TaskRun would remain `Running` with the message `Pending` until it eventually timed out.
This led to lots of delays. The expected behavior should have been to
terminate the TaskRun and set it to `fail`. This PR addresses issue
tektoncd#4895.
@chitrangpatel chitrangpatel force-pushed the ImagePullBackOff-set-taskrun-failure branch from acacb88 to 23329e6 Compare June 8, 2022 17:58
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2022
Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

🎉

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abayer, jerop

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 Jun 8, 2022
@jerop
Copy link
Member

jerop commented Jun 8, 2022

@imjasonh @abayer @dibyom please take another look

@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/reconciler/taskrun/taskrun.go 80.3% 80.8% 0.4

@abayer
Copy link
Contributor

abayer commented Jun 8, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 8, 2022
@jerop
Copy link
Member

jerop commented Jun 8, 2022

/test pull-tekton-pipeline-alpha-integration-tests

1 similar comment
@jerop
Copy link
Member

jerop commented Jun 8, 2022

/test pull-tekton-pipeline-alpha-integration-tests

@afrittoli
Copy link
Member

/kind bug

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.

7 participants