-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: fixed batch delete happy stack #2613
feat: fixed batch delete happy stack #2613
Conversation
cli/cmd/delete.go
Outdated
@@ -32,7 +32,16 @@ var deleteCmd = &cobra.Command{ | |||
Short: "Delete an existing stack", | |||
Long: "Delete the stack with the given name.", | |||
SilenceUsage: true, | |||
RunE: runDelete, | |||
RunE: func(cmd *cobra.Command, args []string) error { | |||
fmt.Println("Running delete") |
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.
Please change to our standard logging. Use of fmt.Print* is frowned upon.
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.
Updated to using logrus.
cli/cmd/delete.go
Outdated
fmt.Println("Running delete") | ||
for _, stackName := range args { | ||
err := runDelete(cmd, stackName) | ||
if err != nil { |
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.
Might make sense to message and continue to the next stack.
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.
Updated to log error and continue.
LGTM TY! |
CCIE-1748
This is for slack request for batch deleting happy stack. See Jira issue here.
Verified the change by
cd
intoexamples/typical_app
folder then create two test stacks, then runhappy delete test-stack1 test-stack-2
to verify that the change works.The for loop does iterate through all the arguments but one of the test stack deletion got terminated early when it ran into unauthorized error.
Used this launch.json in debugger to step through the code change