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

Add workspace CLI command, list/inspect subcommands #2385

Merged
merged 11 commits into from
Oct 5, 2021
Merged

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Sep 29, 2021

This PR introduces a top level command tree workspace that is scoped to the current context, with two subcommands:

  • list: list all workspaces in this context
  • inspect <name>: inspect the workspace <name>, or the current workspace

This PR builds off of #2353 so I'm opening it as a draft until 2353 is approved and merged. Until then this PR will appear to be larger than it actually is. #2353 has been merged

UX:

List:

$ waypoint workspace list                  
   NAME   |        PROJECTS
----------+--------------------------
  default | example-go,example-ruby
  dev     | example-go
  lab     | example-ruby,example-go

Inspect the default workspace:

$ waypoint workspace inspect               

» Workspace Info:
             Name: default
  Latest activity: 22 minutes ago
         Projects: example-go,example-ruby

Inspect workspace by name:

$ waypoint workspace inspect dev

» Workspace Info:
             Name: dev
  Latest activity: 28 minutes ago
         Projects: example-go

@catsby catsby changed the title DRAFT: Add workspace CLI command, list/inspect subcommands Add workspace CLI command, list/inspect subcommands Oct 1, 2021
@catsby catsby requested a review from a team October 1, 2021 21:42
Copy link
Contributor

@evanphx evanphx 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!

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.

Nice! Love to get more inspection tools on the CLI. Looks good. Most of my comments are pretty minor fixups 😄 👍🏻

internal/cli/workspace_inspect.go Outdated Show resolved Hide resolved
internal/cli/workspace_list.go Outdated Show resolved Hide resolved
internal/cli/workspace_list.go Outdated Show resolved Hide resolved
internal/cli/workspace_inspect.go Outdated Show resolved Hide resolved
internal/cli/workspace_list.go Outdated Show resolved Hide resolved
internal/cli/workspace_list.go Outdated Show resolved Hide resolved
Co-authored-by: Brian Cain <bcain@hashicorp.com>
Co-authored-by: Brian Cain <bcain@hashicorp.com>
Co-authored-by: Brian Cain <bcain@hashicorp.com>
Co-authored-by: Brian Cain <bcain@hashicorp.com>
@catsby catsby merged commit 2590391 into main Oct 5, 2021
@catsby catsby deleted the cmd-workspace branch October 5, 2021 21:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants