Cluster-api-provider-aws: Improve clusterawsadm UX

Created on 8 Oct 2018  路  3Comments  路  Source: kubernetes-sigs/cluster-api-provider-aws

/kind feature
/good-first-issue

Describe the solution you'd like

The clusterawsadm command has some terrible UX:

e.g. you need to provide an account ID to this command.

clusterawsadm alpha bootstrap generate-cloudformation
Error: accepts 1 arg(s), received 0
Usage:
clusterawsadm alpha bootstrap generate-cloudformation [flags]

Flags:
-h, --help   help for generate-cloudformation

accepts 1 arg(s), received 0

**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]

But it doesn't tell you what the argument is supposed to be.
Neither does it check that it's an account id.

It also reuses the glog tooling from the controllers, which is not
best for human readability, as in this example where no credentials
are present for CloudFormation to use.

-> clusterawsadm alpha bootstrap create-stack
ERROR: logging before flag.Parse: E1008 16:38:12.671749    9045 bootstrap.go:82] unable to get caller identity: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors

This could be much improved, with the logging prefix removed,
and errors handled gracefully with meaningful errors for
end users.

good first issue help wanted kinfeature

Most helpful comment

I want to take on the issue in the morning if that is okay and not late. :slightly_smiling_face:

/assign

All 3 comments

@randomvariable:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/kind feature
/good-first-issue

Describe the solution you'd like

The clusterawsadm command has some terrible UX:

e.g. you need to provide an account ID to this command.

clusterawsadm alpha bootstrap generate-cloudformation
Error: accepts 1 arg(s), received 0
Usage:
clusterawsadm alpha bootstrap generate-cloudformation [flags]

Flags:
-h, --help   help for generate-cloudformation

accepts 1 arg(s), received 0

**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]

It also reuses the glog tooling from the controllers, which is not
best for human readability, as in this example where no credentials
are present for CloudFormation to use.

-> clusterawsadm alpha bootstrap create-stack
ERROR: logging before flag.Parse: E1008 16:38:12.671749    9045 bootstrap.go:82] unable to get caller identity: NoCredentialProviders: no valid providers in chain. Deprecated.
For verbose messaging see aws.Config.CredentialsChainVerboseErrors

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.

I want to take on the issue in the morning if that is okay and not late. :slightly_smiling_face:

/assign

Created PR #244 which should fix the issue

Was this page helpful?
0 / 5 - 0 ratings