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

tkn taskrun delete --keep Doesn't Sort TaskRuns By Start Time Before Deleting #802

Closed
danielhelfand opened this issue Mar 13, 2020 · 1 comment · Fixed by #893
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@danielhelfand
Copy link
Member

danielhelfand commented Mar 13, 2020

Version and Operating System

tkn Version: v0.8.0

Expected Behavior

tkn tr delete --all --keep doesn't sort TaskRuns by start time before deleting them. The description for the command says that it Keep n least recent number of taskruns when deleting. As of now, the flag will delete TaskRuns that are sorted by name by default.

In general, a better deletion filtering method as described in #800 would probably make sense here, but, at the very least, this should be updated since this behavior is not expected by users.

Sorting should only be applied when --keep is specified. The way it is implemented for PipelineRuns, sorting takes place when --all is specified, which is unnecessary. This should be addressed for PipelineRuns as well so it only sorts when --keep is specified.

@danielhelfand danielhelfand added the kind/bug Categorizes issue or PR as related to a bug. label Mar 13, 2020
@waveywaves
Copy link
Member

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants