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

[cherry-pick] Cp/fix/tr delete with running pr #1759

Conversation

vinamra28
Copy link
Member

Changes

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.

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

NONE

colinodell and others added 2 commits October 19, 2022 22:37
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 <pradkuma@redhat.com>
@tekton-robot tekton-robot added the release-note-none Denotes a PR that doesnt merit a release note. label Oct 19, 2022
@tekton-robot tekton-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 19, 2022
Signed-off-by: vinamra28 <jvinamra776@gmail.com>
@vinamra28 vinamra28 force-pushed the cp/fix/tr-delete-with-running-pr branch from 17f5af4 to 15e8f54 Compare October 20, 2022 03:14
@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 20, 2022
Since CI is using golang version v1.18.x, using older version of
golangci-lint will break the build-tests as it will produce false
positives, thus updating to v1.47.2.

Also fixing the e2e tests by fixing the version of Pipeline and Triggers
to the compatible version.
@vinamra28 vinamra28 force-pushed the cp/fix/tr-delete-with-running-pr branch from 043e41a to c182a15 Compare October 20, 2022 14:37
@vinamra28 vinamra28 changed the title Cp/fix/tr delete with running pr [cherry-pick] Cp/fix/tr delete with running pr Oct 20, 2022
@vinamra28
Copy link
Member Author

/kind misc

@tekton-robot tekton-robot added the kind/misc Categorizes issue or PR as a miscellaneuous one. label Oct 20, 2022
@vinamra28
Copy link
Member Author

/retest-required

@chmouel
Copy link
Member

chmouel commented Oct 20, 2022

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2022
@piyush-garg
Copy link
Contributor

/approve

@tekton-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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 26, 2022
@tekton-robot tekton-robot merged commit 0634fe3 into tektoncd:release-v0.25.0 Oct 26, 2022
@vinamra28 vinamra28 deleted the cp/fix/tr-delete-with-running-pr branch October 31, 2022 07:20
vinamra28 added a commit that referenced this pull request Oct 31, 2022
null | [vinamra28] New version v0.25.0 | 2022/07/21-22:44
#1759 | [Colin O'Dell] Fix --ignore-running unexpectedly deleting incomplete TaskRuns | 2022/10/26-10:03
#1759 | [Pradeep Kumar] fix taskrun getting deleted of running pipelinerun | 2022/10/26-10:03
#1759 | [vinamra28] [cherry-pick] Fix failing tests | 2022/10/26-10:03
#1759 | [vinamra28] Update golangci-lint to 1.47.2 & update e2e tests | 2022/10/26-10:03

Signed-off-by: vinamra28 <jvinamra776@gmail.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/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants