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
cmd: Add deployment plan cancel #72
Conversation
Adds the deployment plan cancel command which allows users to cancel pending plans for specific resources. The syntax is as follows: ecctl deployment plan cancel <deployment id> --type <type> --ref-id <id> Signed-off-by: Marc Lopez <marc5.12@outlook.com>
4f47cc7
to
8a9c216
Compare
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.
Very nice 👍
Signed-off-by: Marc Lopez <marc5.12@outlook.com>
merr = multierror.Append(merr, deputil.NewInvalidDeploymentIDError(params.DeploymentID)) | ||
} | ||
|
||
if params.Type == "" { |
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 wondering if it makes any sense to add some checks here about the accepted types. I know we are using this in a few places in the code so we could create a common check. Ignore me if it doesn't worth the time
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.
We discussed it out of band and agreed that we should't overload this client logic and leave the API to validate the type sent as a queryparam
} | ||
|
||
// Validate ensures the parameters are usable by the consuming function. | ||
func (params CancelPlanParams) Validate() 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.
We are missing test for this method. I think we should explicitly test this function as we already do in other places rather than indirectly test it
Description
Adds the deployment plan cancel command which allows users to cancel
pending plans for specific resources.
The syntax is as follows:
ecctl deployment plan cancel <deployment id> --type <type> --ref-id <id>
Motivation and Context
Implement more of the Deployment resource APIs.
How Has This Been Tested?
Types of Changes