-
Notifications
You must be signed in to change notification settings - Fork 250
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 tkn tr delete command not deleting trs of completed pr #1974
Conversation
06bdda9
to
b2ee12b
Compare
This will fix the issues of tkn tr delete command not deleting the completed taskruns of a completed pipelinerun. Add tests for the scenario Fixes: tektoncd#1972 Signed-off-by: Shiv Verma <[email protected]>
b2ee12b
to
2935818
Compare
@@ -400,7 +400,7 @@ func ownerPrFinished(cs *cli.Clients, tr v1.TaskRun) bool { | |||
for _, ref := range tr.GetOwnerReferences() { | |||
if ref.Kind == pipeline.PipelineRunControllerName { | |||
var pr *v1.PipelineRun | |||
err := actions.GetV1(pipelineRunGroupResource, cs, tr.Namespace, ref.Name, metav1.GetOptions{}, &pr) | |||
err := actions.GetV1(pipelineRunGroupResource, cs, ref.Name, tr.Namespace, metav1.GetOptions{}, &pr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
[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 |
/lgtm |
#1965 | [Piyush Garg] Update readme, release date and choco for 0.30 | 2023/03/27-15:32 #1966 | [dependabot[bot]] Bump github.com/docker/docker | 2023/03/29-17:52 #1967 | [dependabot[bot]] Bump github.com/docker/cli | 2023/03/30-04:46 #1971 | [dependabot[bot]] Bump github.com/tektoncd/triggers from 0.23.0 to 0.23.1 | 2023/04/04-06:36 #1973 | [dependabot[bot]] Bump github.com/spf13/cobra from 1.6.1 to 1.7.0 | 2023/04/04-17:08 #1974 | [pratap0007] Fix tkn tr delete command not deleting trs of completed pr | 2023/04/05-17:37 #1975 | [dependabot[bot]] Bump github.com/docker/cli | 2023/04/06-06:01 #1977 | [dependabot[bot]] Bump github.com/docker/docker | 2023/04/06-07:27 #1978 | [dependabot[bot]] Bump golang.org/x/term from 0.6.0 to 0.7.0 | 2023/04/07-10:23 #1979 | [dependabot[bot]] Bump golang.org/x/net from 0.8.0 to 0.9.0 | 2023/04/07-15:09 null | [dependabot[bot]] Bump golang.org/x/crypto from 0.7.0 to 0.8.0 | 2023/04/07-16:01 Signed-off-by: vinamra28 <[email protected]>
This will fix the issues of tkn tr delete command
not deleting the completed taskruns of a completed
pipelinerun.
Add tests for the scenario
Fixes: #1972
Signed-off-by: Shiv Verma [email protected]
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes