Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

"waypoint user" CLI #1864

Merged
merged 8 commits into from
Jul 15, 2021
Merged

"waypoint user" CLI #1864

merged 8 commits into from
Jul 15, 2021

Conversation

mitchellh
Copy link
Contributor

@mitchellh mitchellh commented Jul 14, 2021

This introduces a "waypoint user" CLI that is more user-oriented. This deprecates waypoint token. I kept the waypoint token command around so it works still but it is now hidden.

This exposes the user system introduced in #1752 and available as part of #1831.

@mitchellh mitchellh added this to the 0.5.0 milestone Jul 14, 2021
@mitchellh mitchellh requested a review from a team July 14, 2021 21:45
@github-actions github-actions bot added the core label Jul 14, 2021
Copy link
Contributor

@izaaklauer izaaklauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good to me. I can imagine operators wanting a user list command, but it doesn't need to come now.

@@ -48,6 +48,9 @@ var (
// hiddenCommands are not shown in CLI help output.
hiddenCommands = map[string]struct{}{
"plugin": {},

// Deprecated:
"token": {}, // replaced by "user"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll probably want to audit the UI before releasing and replace waypoint token new with waypoint user token. The token new command shows up in some unexpected places, like here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, there are also a handful of places on the website that reference waypoint token new:

website/content/docs/automating-execution/index.mdx
43:- `WAYPOINT_SERVER_TOKEN`. Must be set to a Waypoint token, created with [`waypoint token new`](/commands/token-new)

website/content/docs/runner/run-manual.mdx
54:  auth token using `waypoint token new`.

website/content/docs/server/auth.mdx
54:$ waypoint token new

website/content/docs/troubleshooting.mdx
175:$ waypoint token new

website/content/commands/token-new.mdx
8:# Waypoint Token new
10:Command: `waypoint token new`
18:Usage: `waypoint token new [options]`

ui/app/components/login-token/index.hbs
5:      <pre><code id="waypoint-token-new">waypoint token new</code></pre>

Copy link
Member

@briancain briancain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

If we're deprecating token we should add a warning message in that command too that prints right away when invoked.
The website and UI updates could come in a separate PR though.

@@ -48,6 +48,9 @@ var (
// hiddenCommands are not shown in CLI help output.
hiddenCommands = map[string]struct{}{
"plugin": {},

// Deprecated:
"token": {}, // replaced by "user"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, there are also a handful of places on the website that reference waypoint token new:

website/content/docs/automating-execution/index.mdx
43:- `WAYPOINT_SERVER_TOKEN`. Must be set to a Waypoint token, created with [`waypoint token new`](/commands/token-new)

website/content/docs/runner/run-manual.mdx
54:  auth token using `waypoint token new`.

website/content/docs/server/auth.mdx
54:$ waypoint token new

website/content/docs/troubleshooting.mdx
175:$ waypoint token new

website/content/commands/token-new.mdx
8:# Waypoint Token new
10:Command: `waypoint token new`
18:Usage: `waypoint token new [options]`

ui/app/components/login-token/index.hbs
5:      <pre><code id="waypoint-token-new">waypoint token new</code></pre>

@mitchellh
Copy link
Contributor Author

If we're deprecating token we should add a warning message in that command too that prints right away when invoked.

I was kind of afraid to do this cause right now we ONLY output the token so its easy to pipe somewhere. Maybe I'll force send it to stderr that should fix that.

@mitchellh
Copy link
Contributor Author

I'll merge this and do the docs changes as part of the user system docs in general. There's a lot there.

@mitchellh mitchellh merged commit d6b1e3f into main Jul 15, 2021
@mitchellh mitchellh deleted the feature/user-cli branch July 15, 2021 16:33
@fr3fou
Copy link

fr3fou commented Oct 31, 2021

image
The new set of commands don't seem to be working for me (running this on my server)

@briancain
Copy link
Member

Hey there @fr3fou - could you please open a new issue? We'll be able to help triage what's going on there better, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants