-
Bug
-
Resolution: Done
-
Blocker
-
None
-
None
-
1
-
False
-
None
-
False
-
This will fix tkn tr delete --keep command
-
-
-
Pipelines Sprint 235
Description of problem:
`tkn tr delete --keep <n>` is not working when taskruns belonging to pipelineruns are present
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
- Create few taskruns and create few pipelineruns
- Wait for the pipelinerun and taskrun to get completed
- Run tkn tr delete --keep 2
Actual results:
Taskruns which are related to pipelineruns are not getting deleted
Expected results:
tkn command should delete all taskruns except 2
Reproducibility (Always/Intermittent/Only Once):
Always
Build Details:
https://artifacts.ospqa.com/builds/1.10.0/469138-4.11/
Client version: 0.30.0 Pipeline version: v0.44.0 Triggers version: v0.23.0 Operator version: v0.65.1
Additional info (Such as Logs, Screenshots, etc):
tkn tr ls NAME STARTED DURATION STATUS echo-pipeline-run-jhvrn-echo-task 3 minutes ago 7s Succeeded echo-task-run-ddb9v 3 minutes ago 7s Succeeded echo-task-run-xwfk4 3 minutes ago 7s Succeeded tkn tr delete --keep 2 Are you sure you want to delete all TaskRuns in namespace "releasetest-w7vw7" keeping 2 TaskRuns (y/n): y All but 2 TaskRuns(Completed) deleted in namespace "releasetest-w7vw7" tkn tr ls NAME STARTED DURATION STATUS echo-pipeline-run-jhvrn-echo-task 3 minutes ago 7s Succeeded echo-task-run-ddb9v 3 minutes ago 7s Succeeded echo-task-run-xwfk4 3 minutes ago 7s Succeeded