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

Complete implementation of image pull failure handling #4952

Merged
merged 1 commit into from
Jun 13, 2022

Conversation

SaschaSchwarze0
Copy link
Contributor

@SaschaSchwarze0 SaschaSchwarze0 commented Jun 9, 2022

Signed-off-by: Sascha Schwarze [email protected]

Changes

I was a little confused by the code flow from #4921. A checkPodFailed function that then always set TaskRunReasonImagePullFailed in case of an error looked incorrect.

So, I am doing what I think @abayer referred to in #4921 (comment) = adding the reason to the return values of the function.

Also putting in what @imjasonh asked for in #4921 (comment) = the step name and the image into the message.

Finally, I am adding the missing sidecar handling.

/kind feature

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 TaskRunImagePullFailed logic now covers sidecars, and the error message includes the step name and the image

@tekton-robot tekton-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 9, 2022
@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 9, 2022
@tekton-robot
Copy link
Collaborator

Hi @SaschaSchwarze0. Thanks for your PR.

I'm waiting for a tektoncd 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.

@SaschaSchwarze0
Copy link
Contributor Author

If somebody has a hint where the problem with my release note block is, let me know.

@jerop
Copy link
Member

jerop commented Jun 9, 2022

@SaschaSchwarze0 you need to remove the space between the backticks and release-note

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 9, 2022
@SaschaSchwarze0
Copy link
Contributor Author

@SaschaSchwarze0 you need to remove the space between the backticks and release-note

Thanks, no idea how that could have gotten in there. lol

@pritidesai
Copy link
Member

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe 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 10, 2022
@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.8% 81.1% 0.3

@SaschaSchwarze0
Copy link
Contributor Author

/retest

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 @SaschaSchwarze0 🎉

Please add the context that you have in the pull request description to the commit message as well: https://github.com/tektoncd/community/blob/main/standards.md#commits

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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 10, 2022
@jerop
Copy link
Member

jerop commented Jun 10, 2022

/test pull-tekton-pipeline-integration-tests

@dibyom
Copy link
Member

dibyom commented Jun 13, 2022

Thank you @SaschaSchwarze0 This looks good to me.
/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2022
@tekton-robot tekton-robot merged commit 829ca7e into tektoncd:main Jun 13, 2022
vdemeester added a commit to vdemeester/tektoncd-pipeline that referenced this pull request Jul 29, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See tektoncd#4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
vdemeester added a commit to vdemeester/tektoncd-pipeline that referenced this pull request Jul 29, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See tektoncd#4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
vdemeester added a commit to vdemeester/tektoncd-pipeline that referenced this pull request Jul 29, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See tektoncd#4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit that referenced this pull request Jul 29, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See #4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
piyush-garg pushed a commit to piyush-garg/pipeline that referenced this pull request Aug 1, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See tektoncd#4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
piyush-garg pushed a commit to piyush-garg/pipeline that referenced this pull request Aug 1, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See tektoncd#4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit that referenced this pull request Aug 1, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See #4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
tekton-robot pushed a commit that referenced this pull request Aug 1, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See #4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
JeromeJu pushed a commit to JeromeJu/pipeline that referenced this pull request Aug 2, 2022
`tr.Status.TaskSpec.Steps` can be out-of-sync with
`tr.Status.Steps`. As we already have the image information (through
`ImageID`) in the struct be are getting from our iteration, we don't
need to look into another array, with the risk of getting a panic.

The same goes for sidecars.

We managed to get multiple panics on the controller prior to this change.

See tektoncd#4952 for the initial implementation.

Signed-off-by: Vincent Demeester <[email protected]>
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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

5 participants