-
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
Delete taskruns related to pipeline #601
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The following is the coverage report on pkg/.
|
Update the deleter helper to support removing multiple kinds of related resources and adds some testing around that behaviour. Updates the pipeline delete command so that specifying --all flag causes related taskruns as well as pipelineruns to be deleted.
The following is the coverage report on pkg/.
|
Actually... I don't think we need this after all! Deleting a pipeline run also deletes the taskruns that it generated. |
lol, I misread the feature request and implemented something nobody asked for. We want to delete taskruns of pipelineruns. I believe this happens automatically when deleting a pipelinerun: λ kubectl get pipelineruns
NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME
demo-pipeline-run-1 Unknown Running 7s
λ kubectl get taskruns
NAME SUCCEEDED REASON STARTTIME COMPLETIONTIME
demo-pipeline-run-1-build-skaffold-app-588ps Unknown Pending 1s
demo-pipeline-run-1-build-skaffold-web-z8fx8 Unknown Pending 1s
demo-pipeline-run-1-skaffold-unit-tests-997cv True Succeeded 9s 1s
λ tkn pr delete demo-pipeline-run-1
Are you sure you want to delete pipelinerun "demo-pipeline-run-1" (y/n): y
PipelineRun deleted: demo-pipeline-run-1
λ kubectl get pipelineruns
No resources found in default namespace.
λ kubectl get taskruns
No resources found in default namespace.
|
The following is the coverage report on pkg/.
|
Changes
Fixes #588
This PR updates the deleter helper to support removing multiple kinds of related resources and adds some testing around that behaviour.
This PR then updates the pipeline delete command so that specifying
--all
causes related taskruns as well as pipelineruns to be deleted.Submitter Checklist
make docs
andmake man
if needed.make check
See the contribution guide
for more details.
Release Notes