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 pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> flag #965

Closed
VeereshAradhya opened this issue May 6, 2020 · 3 comments · Fixed by #990
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@VeereshAradhya
Copy link
Contributor

Version and Operating System

tkn Version:
v0.9.0

Operating System:
All

Expected Behavior

The command tkn pr delete -p <pipeline-name> --keep 2 should delete all the pipeline runs of the pipeline <pipeline-name> except for the latest 2 pipeline runs

Actual Behavior

The command tkn pr delete -p <pipeline-name> --keep 2 is working as tkn pr delete --keep 2, it is deleting all the pipeline runs and keeping the latest 2 pipeline runs

  1. Create multiple pipelines
  2. Start multiple pipeline runs from the created pipelines
  3. run the command tkn pr delete -p <pipeline-name> --keep n

Additional Info

Below are the command logs
Below output shows that there are pipelineruns for pipeline first-pipeline and second-pipeline

$ tkn pr ls
NAME                        STARTED          DURATION     STATUS
second-pipeline-run-fv2jv   3 minutes ago    ---          Running
second-pipeline-run-6mv76   3 minutes ago    ---          Running
first-pipeline-run-7gds5    4 minutes ago    ---          Running
first-pipeline-run-t5rl8    4 minutes ago    ---          Running
first-pipeline-run-zmr6q    4 minutes ago    ---          Running
first-pipeline-run-drmsv    4 minutes ago    ---          Running
first-pipeline-run-q2h9c    5 minutes ago    ---          Running
second-pipeline-run-vjhqw   10 minutes ago   47 seconds   Cancelled(PipelineRunCancelled)
second-pipeline-run-b8gth   27 minutes ago   10 minutes   Succeeded

Below running the delete command

$ tkn pr delete -p first-pipeline --keep 1
Are you sure you want to delete all pipelineruns in namespace "veeresh-testing" keeping 1 pipelineruns (y/n): y
All but 1 PipelineRuns deleted in namespace "veeresh-testing"

We can see that the tkn pr delete -p first-pipeline --keep 1 deleted the pipeline runs of second-pipeline as well

$ tkn pr ls
NAME                        STARTED         DURATION   STATUS
second-pipeline-run-fv2jv   4 minutes ago   ---        Running
@VeereshAradhya
Copy link
Contributor Author

/assign @piyush-garg

@piyush-garg
Copy link
Contributor

/kind bug

@tekton-robot tekton-robot added the kind/bug Categorizes issue or PR as related to a bug. label May 6, 2020
@VeereshAradhya VeereshAradhya changed the title tkn pr delete -p <pipeline-name> --keep n is not working as expected tkn pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> option May 6, 2020
@VeereshAradhya VeereshAradhya changed the title tkn pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> option tkn pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> flag May 6, 2020
@VeereshAradhya VeereshAradhya changed the title tkn pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> flag tkn pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> flag May 6, 2020
@VeereshAradhya VeereshAradhya changed the title tkn pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> flag tkn pr delete -p <pipeline-name> --keep n neglects the -p <pipeline-name> flag May 6, 2020
@piyush-garg piyush-garg added this to the 0.10.0 🐅 milestone May 7, 2020
@danielhelfand
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.

4 participants