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

Avoid Use of Previous TaskRunSpecStatus and PipelineRunSpecStatus with Start Commands #1201

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

danielhelfand
Copy link
Member

Closes #1200

In #1134, the method for using previous TaskRun/PipelineRun runtime values as part of a new run was changed to capture the entire TaskRunSpec/PipelineRunSpec. The problem with this is that the Spec for TaskRuns/PipelineRuns contain the TaskRunSpecStatus/PipelineRunSpecStatus, which are used for cancelling runs.

If --use-taskrun/--use-pipelinerun or --last are passed the name of a cancelled run, the new run will be cancelled. While the choice of having TaskRunSpecStatus/PipelineRunSpecStatus is a bit curious, tkn needs to account for this case. The method used in this pr is to save the SpecStatus and reapply it to the run after the previous spec is copied over to avoid factoring this status into the new run's success or failure.

Submitter Checklist

  • Includes tests (if functionality changed/added)
  • Run the code checkers with make check
  • Regenerate the manpages, docs and go formatting with make generated
  • Commit messages follow commit message best practices

Release Notes

For pull requests with a release note:

Prevent cancelled TaskRuns/PipelineRuns used with --use-pipelinerun/--use-taskrun and --last from being cancelled

/kind bug

@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 Oct 12, 2020
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 12, 2020
Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

/meow
Thanks @danielhelfand

@tekton-robot
Copy link
Contributor

@vdemeester: cat image

In response to this:

/meow
Thanks @danielhelfand

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.

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2020
pkg/cmd/pipeline/start.go Outdated Show resolved Hide resolved
pkg/options/start.go Outdated Show resolved Hide resolved
@danielhelfand
Copy link
Member Author

@piyush-garg test for clustertask added

Copy link
Contributor

@piyush-garg piyush-garg 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 13, 2020
@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: piyush-garg, vdemeester

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:
  • OWNERS [piyush-garg,vdemeester]

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 merged commit 6278464 into tektoncd:master Oct 13, 2020
piyush-garg added a commit that referenced this pull request Oct 21, 2020
#1194 | [Daniel Helfand] update README to v0.13.0 | 2020/09/30-22:18
#1196 | [Chmouel Boudjnah] Update OSX instruction to install from brew 🍻 | 2020/10/02-11:36
#1197 | [Daniel Helfand] reorganize release process docs and add details | 2020/10/07-07:26
#1192 | [Daniel Helfand] add eventlistener logs command | 2020/10/07-08:00
#1198 | [Matt Moore] Bump Knative/K8s dependencies | 2020/10/08-00:34
#1201 | [Daniel Helfand] avoid use of previous TaskRunSpecStatus and PipelineRunSpecStatus | 2020/10/13-17:32
#1205 | [Daniel Helfand] remove assertions to help with debugging eventlistener e2e failures | 2020/10/20-07:27
#1207 | [Piyush Garg] tkn pr describe failing in pr with conditions | 2020/10/20-08:57
#1189 | [Daniel Helfand] refactor pipelinerun and taskrun cancel err based on condition status | 2020/10/20-09:15
#1189 | [Daniel Helfand] add pipelinerun and taskrun cancel e2e tests | 2020/10/20-09:15
null | [Daniel Helfand] common way of referring to tekton resources in user facing messages: EventListener | 2020/10/21-07:21
null | [Daniel Helfand] common way of referring to tekton resources in user facing messages: TriggerBinding | 2020/10/21-08:00

Signed-off-by: Piyush Garg <pgarg@redhat.com>
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
4 participants