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 taskrun getting deleted of running pipelinerun #1736

Merged

Conversation

pradeepitm12
Copy link
Contributor

@pradeepitm12 pradeepitm12 commented Oct 6, 2022

This ignores all the taskruns attached to pipelinerun which are
still running.

Behaviour with keep, keep-since, all by default ignores taskruns
attached to running pipelinerun.
Behaviour if user gives taskrun name to delete will reassure before
deleting , if user also specify -f flag then it deletes with a
warning msg for each taskrun.

this also adds ignore-running-pipelinerun flag.
This will help user if they want to delete a taskrun in any case

Signed-off-by: Pradeep Kumar <[email protected]>

Changes

Submitter Checklist

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

  • 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

See the contribution guide
for more details.

Release Notes

With this fix tkn ignores to delete all the taskrun(s) attached to pipelinerun which are
still running(without a completion time).

Behaviour with keep, keep-since, all by default ignores taskruns attached to running
pipelinerun.
Behaviour if user gives taskrun name to delete will reassure before deleting, if user
also specify -f flag then it deletes with a warning message for each taskrun.

This also adds ignore-running-pipelinerun flag will helps user to delete a taskrun
attached to a running pipelienrun.

@tekton-robot tekton-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 6, 2022
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 6, 2022
@pradeepitm12
Copy link
Contributor Author

cc: @vinamra28 @vdemeester

@pradeepitm12 pradeepitm12 force-pushed the fix/tr-delete-with-running-pr branch from c6c6489 to 6d8371a Compare October 7, 2022 04:44
@pradeepitm12 pradeepitm12 force-pushed the fix/tr-delete-with-running-pr branch 2 times, most recently from 7ef1cb6 to 00010bb Compare October 7, 2022 05:57
This ignores all the taskruns attached to pipelinerun which are
still running.

Behaviour with keep, keep-since, all by default ignores taskruns
attached to running pipelinerun.
Behaviour if user gives taskrun name to delete will reassure before
deleting , if user also specify -f flag then it deletes with a
warning msg for each taskrun.

this also adds ignore-running-pipelinerun flag.
This will help user if they want to delete a taskrun in any case

Signed-off-by: Pradeep Kumar <[email protected]>
@pradeepitm12 pradeepitm12 force-pushed the fix/tr-delete-with-running-pr branch from 00010bb to 71497ac Compare October 7, 2022 06:00
@piyush-garg
Copy link
Contributor

Thanks for the PR
/lgtm

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

@vinamra28 vinamra28 left a comment

Choose a reason for hiding this comment

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

/meow

@tekton-robot
Copy link
Contributor

@vinamra28: cat image

In response to this:

/meow

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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vinamra28

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 7, 2022
@tekton-robot tekton-robot merged commit 106adac into tektoncd:main Oct 7, 2022
pradeepitm12 added a commit to pradeepitm12/cli that referenced this pull request Oct 7, 2022
fix taskrun getting deleted of running pipelinerun tektoncd#1736

Fix incomplete TaskRuns being deleted when --ignore-running=true tektoncd#1708

Signed-off-by: Pradeep Kumar <[email protected]>
tekton-robot pushed a commit that referenced this pull request Oct 7, 2022
fix taskrun getting deleted of running pipelinerun #1736

Fix incomplete TaskRuns being deleted when --ignore-running=true #1708

Signed-off-by: Pradeep Kumar <[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. 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
Development

Successfully merging this pull request may close these issues.

4 participants