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

✨ Trash workspaces #6690

Open
wants to merge 52 commits into
base: master
Choose a base branch
from

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Nov 8, 2024

What do these changes do?

ReDoc Swagger UI
image

web-api offers new operations to trash workspaces

Highlights

  • ✨ web api 0.45.0 → 0.46.0 changes:
    • adds trash as POST /workspace/{workspace_id}:trash
    • adds untrash as POST /workspace/{workspace_id}:untrash
    • list_workpaces adds filters query
    • WorkspaceGet adds optional trashed_at and trashed_by
  • 🗃️ adds trash attributes to workspaces table
  • 🎨 ♻️ cleanup workspaces plugin: modules, schemas, oas-generators and exception handling

Next steps

  • extend trashed_by to projects and folders
  • unit-of-work across api

Related issue/s

How to test

cd services/web/server
make install-dev
pytest -vv tests/unit/with_dbs/**/test_*trash*.py
pytest -vv tests/unit/with_dbs/**/test_*workspace*.py
  • trash empty workspace and listing
  • api and local deployment (with @odeimaiz )
  • trash workspace with children (discuss with @matusdrobuliak66 )
  • access rights and roles (i.e permissions)(discuss with @matusdrobuliak66 )

Dev-ops

None

@pcrespov pcrespov added a:webserver issue related to the webserver service a:api framework api, data schemas, labels Nov 8, 2024
@pcrespov pcrespov added this to the Event Horizon milestone Nov 8, 2024
@pcrespov pcrespov self-assigned this Nov 8, 2024
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 89.66942% with 25 lines in your changes missing coverage. Please review.

Project coverage is 89.36%. Comparing base (ba881e9) to head (966980a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6690      +/-   ##
==========================================
+ Coverage   88.64%   89.36%   +0.72%     
==========================================
  Files        1527     1361     -166     
  Lines       60452    55231    -5221     
  Branches     2155     1174     -981     
==========================================
- Hits        53588    49358    -4230     
+ Misses       6536     5697     -839     
+ Partials      328      176     -152     
Flag Coverage Δ
integrationtests 64.76% <64.53%> (-0.01%) ⬇️
unittests 87.41% <89.66%> (+3.89%) ⬆️
Components Coverage Δ
api 79.60% <ø> (ø)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library 91.26% <90.47%> (+0.02%) ⬆️
pkg_notifications_library 84.57% <ø> (ø)
pkg_postgres_database 87.52% <100.00%> (+0.21%) ⬆️
pkg_service_integration 70.00% <ø> (ø)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 85.36% <ø> (ø)
agent 97.00% <ø> (ø)
api_server 89.72% <ø> (ø)
autoscaling 95.21% <ø> (ø)
catalog 90.57% <ø> (ø)
clusters_keeper 98.73% <ø> (ø)
dask_sidecar 91.26% <ø> (ø)
datcore_adapter 93.17% <ø> (ø)
director 75.97% <ø> (∅)
director_v2 91.03% <ø> (-0.03%) ⬇️
dynamic_scheduler 96.59% <ø> (ø)
dynamic_sidecar 89.78% <ø> (+0.03%) ⬆️
efs_guardian 90.12% <ø> (ø)
invitations 93.44% <ø> (ø)
osparc_gateway_server 85.49% <ø> (ø)
payments 92.76% <ø> (ø)
resource_usage_tracker 90.79% <ø> (+0.14%) ⬆️
storage 89.66% <ø> (ø)
webclient ∅ <ø> (∅)
webserver 88.66% <86.62%> (-0.02%) ⬇️

Continue to review full report in Codecov by Sentry.

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

---- 🚨 Try these New Features:

@pcrespov pcrespov force-pushed the is468/trash-api-workspaces branch 4 times, most recently from 8927e20 to 15b0d4f Compare November 14, 2024 15:56
@pcrespov pcrespov force-pushed the is468/trash-api-workspaces branch 2 times, most recently from a1a972b to 3d3599f Compare November 20, 2024 14:47
@pcrespov pcrespov changed the title WIP: Is468/trash api workspaces ✨ Trash workspaces Nov 20, 2024
Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

looking very good! Thanks!

Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Very nice! Thanks a lot for the effort.

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

Thanks for all the improvements (including the unit tests 💯)

Copy link
Member

@odeimaiz odeimaiz left a comment

Choose a reason for hiding this comment

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

👍

Copy link

sonarcloud bot commented Nov 21, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:api framework api, data schemas, a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants