-
Notifications
You must be signed in to change notification settings - Fork 420
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
chore(cli): add task delete validate/ask #1831
Conversation
chore(aws): add ListStacksWithTags method chore(aws): remove unused client call from interfaces chore(cloudformation): add ListStacksWIthTags to cf interfaces chore(cloudformation): extract task stack name pattern to variable in deploy pkg chore(awscfn): fix staticcheck error chore(cloudformation): address feedback chore(cloudformation): revert invalid change to ListDefaultTaskStacks chore(cloudformation): regenerate mocks chore(cloudformation): remove unnecessary private method
// Validate checks that flag inputs are valid. | ||
func (o *deleteTaskOpts) Validate() error { | ||
|
||
if o.name != "" { |
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.
I'm probably missing it-- do we validate that the flag-inputted task exists?
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.
No. It's difficult because in the case where a task is provided but no app, env, or default cluster flag, we don't know where to look for the task.
In these cases we rely on error messages returned when we go looking for the task or service in the Execute
logic.
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.
Looks good!
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 just a few nits.
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! just one nit. feel free to put down the label.
internal/pkg/cli/task_delete.go
Outdated
deleteTaskVars: vars, | ||
|
||
store: store, | ||
// spinner: termprogress.NewSpinner(log.DiagnosticWriter), |
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.
Oh maybe this one as well.
<!-- Provide summary of changes --> Adds the skeleton of a new `task delete` command with Ask() and Validate() filled in. Tests for Ask() forthcoming, then I'll work on Execute in a separate PR. <!-- Issue number, if available. E.g. "Fixes aws#31", "Addresses aws#42, 77" --> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Adds the skeleton of a new
task delete
command with Ask() and Validate() filled in. Tests for Ask() forthcoming, then I'll work on Execute in a separate PR.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.