-
Notifications
You must be signed in to change notification settings - Fork 255
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
Change Behavior of What --keep Saves from Deletion #800
Comments
I agree on the ordering, that the default should be newest-first. Maybe introduce a flag for sorting oldest-first?
I like this idea a lot. An example syntax for this might be something like # Delete any TaskRun older than 30d that doesn't have the given label
tkn tr delete --all --keep since=30d --keep label="tekton.dev/do-not-delete" Going with key-value would also allow the existing behaviour with a numeric argument to persist: # Delete all but the 3 newest TaskRuns in the last 30d that don't have the given label
tkn tr delete --all --keep 3 --keep since=30d --keep label="tekton.dev/do-not-delete" |
Issues go stale after 90d of inactivity. /lifecycle stale Send feedback to tektoncd/plumbing. |
Stale issues rot after 30d of inactivity. /lifecycle rotten Send feedback to tektoncd/plumbing. |
Rotten issues close after 30d of inactivity. /close Send feedback to tektoncd/plumbing. |
@tekton-robot: Closing this issue. In response to this:
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. |
Version and Operating System
tkn Version: v0.8.0
Expected Behavior
The
--keep
option fortkn pr ls
andtkn tr ls
should delete the least recent TaskRuns or PipelineRuns as opposed to the most recent. It is more common to want to keep more recent entries than later ones.An alternative suggestion would be for
--keep
to keep by something other than a number. An example being a date range or a variety of filter options.Whatever the choice, the deletion approach of
--keep
should be changed from its current deletion approach.An example is as follows for keeping most recent TaskRuns:
tkn tr ls
:tkn tr delete --all --keep 3 & tkn tr ls
(Most recent are saved):Actual Behavior
An example is as follows:
tkn tr ls
:tkn tr delete --all --keep 3 & tkn tr ls
(Least recent are kept):The text was updated successfully, but these errors were encountered: