-
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
Deleting a customrun on the basis of name #2362
Conversation
Hi @Senjuti256. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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.
/ok-to-test
pkg/cmd/customrun/delete.go
Outdated
@@ -0,0 +1,89 @@ | |||
// Copyright © 2023 The Tekton Authors. |
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.
// Copyright © 2023 The Tekton Authors. | |
// Copyright © 2024 The Tekton Authors. |
pkg/cmd/customrun/delete.go
Outdated
return nil | ||
} | ||
|
||
func deleteSingleCustomRun(cs *cli.Clients, namespace, crName string) error { |
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.
should we rename this to deleteCustomRun
?
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.
@vinamra28 made the modifications as per your suggestion
28169b3
to
a9a0b00
Compare
/retest |
@@ -0,0 +1,171 @@ | |||
package customrun |
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.
add header
a9a0b00
to
644dc67
Compare
pkg/cmd/customrun/delete.go
Outdated
return err | ||
} | ||
|
||
for _, crName := range crNames { |
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.
this should be after delete command, if err is not nil
644dc67
to
932f426
Compare
/test pull-tekton-cli-integration-tests |
1 similar comment
/test pull-tekton-cli-integration-tests |
} | ||
|
||
func deleteCustomRun(cs *cli.Clients, namespace, crName string) error { | ||
err := cs.Dynamic.Resource(customrunGroupResource).Namespace(namespace).Delete(context.TODO(), crName, metav1.DeleteOptions{}) |
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.
should we do a check also first whether it exists?
932f426
to
b991e46
Compare
b991e46
to
7cf046c
Compare
/test pull-tekton-cli-integration-tests |
/retest |
/lgtm |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vinamra28 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 |
/test pull-tekton-cli-integration-tests |
Added the delete.go and delete_test.go files for customruns to handle deletion of customruns based on name only.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
make check
make generated
See the contribution guide
for more details.
Release Notes