Skip to content
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

Improve CLI UX #49

Merged
merged 4 commits into from
Mar 4, 2021
Merged

Improve CLI UX #49

merged 4 commits into from
Mar 4, 2021

Conversation

patricksanders
Copy link
Contributor

@patricksanders patricksanders commented Feb 27, 2021

This PR is focused on making the CLI more intuitive and easier to work with for users who aren't as familiar with specific AWS constructs such as IMDS. It consolidates the two distinct webserver commands (metadata and ecs_credential_helper) into a single serve command. This new command takes an optional argument to enable the IMDS endpoints for a specific role and otherwise always serves the ECS credential helper endpoints. I also added aliases to the serve command to maintain CLI compatibility with previous versions. For example, weep metadata AdminRole still works, just using the serve command instead and with the ECS credential provider running at the same time.

Additionally, short and long help texts for commands have been centralized into cmd/vars.go. This helps declutter the files for individual commands and aids in writing more consistent help text.

@patricksanders patricksanders marked this pull request as ready for review March 3, 2021 23:11
@castrapel
Copy link
Contributor

Looking good! I encountered these issues:

  1. With the vanilla flow, I would expect to need to set up my consoleme url and username if I don't already have a configuration, but it isn't prompting me:

$ ./weep serve consoleme time="2021-03-03T21:32:53-08:00" level=info msg="Configuring weep IMDS service for role consoleme" Error: Authentication method unsupported or not provided.

  1. When I type ./weep, I see help in the list of commands. It doesn't indicate clearly that I need to type a command after the help arg. When I type ./weep help, I am also not told this clearly

  2. When I type ./weep serve <role> (where is a string that matches multiple roles), Weep appears to try multiple times before erroring, despite getting the More than one matching role error

@castrapel castrapel merged commit 1afbcd0 into master Mar 4, 2021
@castrapel castrapel deleted the refactor/cli-ux branch March 4, 2021 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants