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

feat: Add workspace management for admins #1652

Merged
merged 1 commit into from
Jul 25, 2024
Merged

Conversation

MoritzWeber0
Copy link
Member

@MoritzWeber0 MoritzWeber0 commented Jul 15, 2024

Important

The database migration will fail if there are multiple users with the same user name but different casing! Scan your users list to remove duplicated users before updating.

Implements some parts of #998 and workspace related changes proposed in #1645.
Resolves #191.

The pvc_name and size are now stored in our database, which enables us to use a new algorithm for persistent volume names without breaking existing volumes. The new algorithm is independent from the username and uses a random UUID as name instead.

Even though the workspace/user relationship is modeled as many-to-many relationship, each user can only have one workspace. It's intended to add support for more workspaces in the future and the database structure is already set up properly.

The CLI has been updated and shows all persistent volumes created before this update as "Persistent user workspace (legacy)". In addition, the size and annotations are now preserved when performing a backup / restore of a workspace via the CLI. It also fixes an issue that the Pod isn't terminated if the command is aborted with CTRL + C while "Waiting for Pod".

The workspaces are also displayed in the UI with their corresponding size in the user profiles for administrators. Workspaces incl. their content can be deleted. In addition, workspace are now also cleaned up during user deletion.

This PR also makes username changes non-breaking.

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 12 lines in your changes missing coverage. Please review.

Project coverage is 81.12%. Comparing base (28e9e64) to head (117be93).
Report is 294 commits behind head on main.

Files with missing lines Patch % Lines
backend/capellacollab/cli/ws.py 74.41% 9 Missing and 2 partials ⚠️
backend/capellacollab/events/crud.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1652      +/-   ##
==========================================
+ Coverage   80.65%   81.12%   +0.47%     
==========================================
  Files         185      191       +6     
  Lines        6095     6215     +120     
  Branches      679      692      +13     
==========================================
+ Hits         4916     5042     +126     
+ Misses       1030     1027       -3     
+ Partials      149      146       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Jul 16, 2024

A Storybook preview is available for commit a020a89.
View Storybook
View Chromatic build

@MoritzWeber0 MoritzWeber0 force-pushed the workspace-mangement branch 3 times, most recently from 09bbf89 to dab5133 Compare July 18, 2024 15:21
@MoritzWeber0 MoritzWeber0 force-pushed the workspace-mangement branch 2 times, most recently from a2d012b to d1da505 Compare July 25, 2024 13:09
@MoritzWeber0 MoritzWeber0 marked this pull request as ready for review July 25, 2024 13:09
@DSD-DBS DSD-DBS deleted a comment from github-actions bot Jul 25, 2024
@MoritzWeber0 MoritzWeber0 force-pushed the workspace-mangement branch 2 times, most recently from 0f6681f to a14a7ea Compare July 25, 2024 18:03
Copy link

sonarcloud bot commented Jul 25, 2024

@MoritzWeber0 MoritzWeber0 merged commit f366ae0 into main Jul 25, 2024
30 checks passed
@MoritzWeber0 MoritzWeber0 deleted the workspace-mangement branch July 25, 2024 18:29
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.

Clean persistent Capella workspaces
1 participant