Skip to content

feat: Move workspaces under organizations #1109

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

Merged
merged 2 commits into from
Apr 25, 2022
Merged

feat: Move workspaces under organizations #1109

merged 2 commits into from
Apr 25, 2022

Conversation

kylecarbs
Copy link
Member

This removes split ownership for workspaces. They are now
a resource of organizations and have a designated owner,
which is a user.

This enables simple administration for commands like:

  • coder stop ben/dev
  • coder build logs colin/arch

or if we decide to allow administrators to access workspaces,
they could even SSH using this syntax: coder ssh colin/dev.

@kylecarbs kylecarbs requested a review from Emyrk April 23, 2022 15:17
@kylecarbs kylecarbs self-assigned this Apr 23, 2022
@kylecarbs kylecarbs requested a review from a team as a code owner April 23, 2022 15:17
@codecov
Copy link

codecov bot commented Apr 23, 2022

Codecov Report

Merging #1109 (7505b01) into main (185d97a) will decrease coverage by 0.15%.
The diff coverage is 54.80%.

@@            Coverage Diff             @@
##             main    #1109      +/-   ##
==========================================
- Coverage   66.34%   66.18%   -0.16%     
==========================================
  Files         257      261       +4     
  Lines       16055    16476     +421     
  Branches      156      156              
==========================================
+ Hits        10652    10905     +253     
- Misses       4311     4434     +123     
- Partials     1092     1137      +45     
Flag Coverage Δ
unittest-go-macos-latest 53.51% <48.84%> (-0.11%) ⬇️
unittest-go-postgres- 65.50% <51.92%> (-0.30%) ⬇️
unittest-go-ubuntu-latest 56.03% <48.84%> (-0.30%) ⬇️
unittest-go-windows-2022 53.04% <48.46%> (?)
unittest-js 67.28% <ø> (ø)
Impacted Files Coverage Δ
cli/parameters.go 16.07% <0.00%> (ø)
cli/workspacedelete.go 22.22% <0.00%> (-3.87%) ⬇️
cli/workspacelist.go 6.55% <0.00%> (-0.47%) ⬇️
cli/workspaces.go 47.22% <0.00%> (-5.91%) ⬇️
cli/workspaceshow.go 16.66% <0.00%> (-3.34%) ⬇️
cli/workspacestart.go 13.51% <0.00%> (-1.64%) ⬇️
cli/workspacestop.go 12.50% <0.00%> (-1.39%) ⬇️
cli/workspaceupdate.go 7.14% <0.00%> (-0.76%) ⬇️
coderd/httpmw/httpmw.go 100.00% <ø> (ø)
coderd/users.go 63.22% <ø> (+2.86%) ⬆️
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 185d97a...7505b01. Read the comment docs.

This removes split ownership for workspaces. They are now
a resource of organizations and have a designated owner,
which is a user.

This enables simple administration for commands like:
- `coder stop ben/dev`
- `coder build logs colin/arch`

or if we decide to allow administrators to access workspaces,
they could even SSH using this syntax: `coder ssh colin/dev`.
@kylecarbs kylecarbs requested review from coadler and removed request for a team April 23, 2022 16:51
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Overall sweet. Love this resource division at the org scope.

For the use case of creating a workspace for another user, I think we should just rely on masquerading 👍

@Emyrk
Copy link
Member

Emyrk commented Apr 25, 2022

I only left minor nits. Will approve when you get to respond @kylecarbs. Wanted to get a response on a few before I approve and auto merge takes over

@kylecarbs
Copy link
Member Author

@Emyrk all fixed up!

@coadler coadler removed their request for review April 25, 2022 19:07
@coadler
Copy link
Contributor

coadler commented Apr 25, 2022

I'll leave this one to Steven

@kylecarbs kylecarbs merged commit 88669fd into main Apr 25, 2022
@kylecarbs kylecarbs deleted the mvworkspaces branch April 25, 2022 21:11
kylecarbs added a commit that referenced this pull request Jun 10, 2022
This removes split ownership for workspaces. They are now
a resource of organizations and have a designated owner,
which is a user.

This enables simple administration for commands like:
- `coder stop ben/dev`
- `coder build logs colin/arch`

or if we decide to allow administrators to access workspaces,
they could even SSH using this syntax: `coder ssh colin/dev`.
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.

3 participants