-
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
Add flag to task and pipeline to only delete related resources #608
Conversation
I wonder if the flags should be |
The following is the coverage report on pkg/.
|
I rather have the --only-* prefix which makes more sense imho |
|
ok great, I've gone with |
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
So… I think we need to think about this a little bit more 🤔 We have something a little bit like that when listing
This is in
This would also allow to delete all @chmouel @piyush-garg @danielhelfand @sbwsg wdyt ? |
IMHO I think that's less than intuitive... I like how @sbwsg implemented it, where I can tell to myself : "I want to delete all the auto created taskruns attached to my task named foo" and map it into a command that looks as what i am thinking :
your suggested command :
looks not intuitive to me.. (and we loose completion)
👎 on this, even tho this may look more logical, this is not going to be intuitive for our end users |
🤔 so It might be just me, but as a user, if I want to delete all |
Because you are deep neck into the project and you know what a run is 🤣 We don't necessary expose the *Runs with CLI, we just say here is a task/pipeline and start it(tkn task start).... we give a taskrun objects so we can do stuff on it... but it really start from the |
right, that might make sense 👼 but then should the flag be just about |
I am okay with that! but i'll let others weight in! |
I gotta be honest I don't feel strongly either way - do we want both?
My eye likes the syntax of the first one better. But I agree that users are task-centric, not so much taskrun-centric. @danielhelfand do you have any thoughts here from when you initially created the issue? |
Maybe we get even more fancy:
|
As @chmouel, I like the fancy solution 😛 |
Filtering with explicit task and pipelinerun flags IMO is more intuitive. The key=value syntax incorrectly implies that it's similar to k8s labels: Same would go for the list: Could make sense to support the same syntax for the pipelinerun too in addition to the existing syntax: I'm opposed to indirect The command reads delete tasks except that it doesn't do that, it deletes taskruns. |
Great feedback, thanks @siamaksade, you make some excellent points. I think my next step here is to bring this up at the next CLI WG. |
OK cool, after quick chat in the working group, we're going to go with |
The following is the coverage report on pkg/.
|
The following is the coverage report on pkg/.
|
Failures are Just need to update docs/manpages. |
TaskRun and PipelineRun delete commands provide a mechanism to delete both the taskruns or pipelineruns related to a task or pipeline. This commit adds a flag to delete resources related to a parent - a taskrun's parent is a task, a pipelinerun's parent is a pipeline - without deleting the task or pipeline. The flags are: `tkn taskrun delete --task task-name` `tkn pipelinerun delete --pipeline pipeline-name`
The following is the coverage report on pkg/.
|
It is green 🎉 |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm 🔥 |
🙏 woo, cheers! |
Changes
Fixes #589
This commit adds a flag to delete resources related to a parent - a
taskrun's parent is a task, a pipelinerun's parent is a pipeline -
without deleting the task or pipeline.
The flags are:
tkn taskrun delete --task task-name
tkn pipelinerun delete --pipeline pipeline-name
TODO:
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make docs
andmake man
if needed.make check
Release Notes