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 nil pointer dereference when taksrun is canceled #1237

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

jkhelil
Copy link
Member

@jkhelil jkhelil commented Oct 31, 2024

Changes

When taskrun is status TaskRunCancelled, there is no Status.TaskSpec., the PR aims to fix the test so we dont fall in the nil pointer dereference
here is a status of canceled taskrun


status:
 completionTime: "2024-10-30T01:40:17Z"
 conditions:
 - lastTransitionTime: "2024-10-30T01:40:17Z"
   message: TaskRun "simple-tasks"
     was cancelled. TaskRun cancelled as the PipelineRun it belongs to has timed
     out.
   reason: TaskRunCancelled
   status: "False"
   type: Succeeded
 podName: ""
 startTime: "2024-10-30T01

Submitter Checklist

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

  • Has Docs included if any changes are user facing
  • Has 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 updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 31, 2024
Copy link
Contributor

@lcarva lcarva 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 Oct 31, 2024
@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lcarva

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 Oct 31, 2024
@tekton-robot tekton-robot merged commit 4117846 into tektoncd:main Oct 31, 2024
17 checks passed
@lcarva lcarva mentioned this pull request Nov 7, 2024
@vdemeester
Copy link
Member

/cherry-pick release-v0.22.x

@vdemeester
Copy link
Member

/cherry-pick release-v0.21.x

@vdemeester
Copy link
Member

/cherry-pick release-v0.22.x

@tekton-robot
Copy link

@vdemeester: new pull request created: #1246

In response to this:

/cherry-pick release-v0.22.x

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.

@vdemeester
Copy link
Member

/cherry-pick release-v0.21.x

@tekton-robot
Copy link

@vdemeester: #1237 failed to apply on top of branch "release-v0.21.x":

Applying: fix nil pointer dereference when taksrun is canceled
Using index info to reconstruct a base tree...
M	pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go
CONFLICT (content): Merge conflict in pkg/chains/formats/slsa/v1/pipelinerun/pipelinerun.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix nil pointer dereference when taksrun is canceled
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-v0.21.x

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.

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. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants