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

✨ web-api: Empty bins for folders and its content #7237

Merged

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Feb 17, 2025

What do these changes do?

This PR enhances empty_trash to support folders, along with all their contents, including subfolders and projects. It also removes projects that were implicitly trashed.

Support for workspaces and shared projects will be addressed in future PRs.

Related issue/s

How to test

Driving tests

cd services/web/server
make install-dev
pytest -vv tests/unit/with_dbs -k test_trash_folder_with_subfolder_and_project_and_empty_bin
pytest -vv tests/unit/**/test_*trash*.py

Manual exploratory test

image

  • clone twice a project with a file picker of 1GB
  • create folder foo
  • enter foo and move one project there
  • create folder bar
  • enter folder bar and move another project there
  • trash the parent folder foo
  • go to trash, you should only see foo
  • delete trash
  • all items get deleted.

Dev-ops

None

@pcrespov pcrespov added the a:webserver issue related to the webserver service label Feb 17, 2025
@pcrespov pcrespov added this to the Singularity milestone Feb 17, 2025
@pcrespov pcrespov self-assigned this Feb 17, 2025
Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 88.70968% with 7 lines in your changes missing coverage. Please review.

Project coverage is 83.64%. Comparing base (135be29) to head (80f7337).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7237      +/-   ##
==========================================
- Coverage   85.39%   83.64%   -1.76%     
==========================================
  Files        1677      651    -1026     
  Lines       64805    31257   -33548     
  Branches     1115      177     -938     
==========================================
- Hits        55343    26144   -29199     
+ Misses       9144     5051    -4093     
+ Partials      318       62     -256     
Flag Coverage Δ
integrationtests 65.50% <61.29%> (+0.03%) ⬆️
unittests 86.05% <88.70%> (+1.89%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library ∅ <ø> (∅)
pkg_dask_task_models_library ∅ <ø> (∅)
pkg_models_library ∅ <ø> (∅)
pkg_notifications_library ∅ <ø> (∅)
pkg_postgres_database ∅ <ø> (∅)
pkg_service_integration ∅ <ø> (∅)
pkg_service_library ∅ <ø> (∅)
pkg_settings_library ∅ <ø> (∅)
pkg_simcore_sdk 77.25% <ø> (-7.83%) ⬇️
agent ∅ <ø> (∅)
api_server ∅ <ø> (∅)
autoscaling ∅ <ø> (∅)
catalog ∅ <ø> (∅)
clusters_keeper ∅ <ø> (∅)
dask_sidecar ∅ <ø> (∅)
datcore_adapter ∅ <ø> (∅)
director ∅ <ø> (∅)
director_v2 78.63% <ø> (-12.68%) ⬇️
dynamic_scheduler ∅ <ø> (∅)
dynamic_sidecar 89.77% <ø> (ø)
efs_guardian ∅ <ø> (∅)
invitations ∅ <ø> (∅)
osparc_gateway_server ∅ <ø> (∅)
payments ∅ <ø> (∅)
resource_usage_tracker ∅ <ø> (∅)
storage ∅ <ø> (∅)
webclient ∅ <ø> (∅)
webserver 85.02% <88.70%> (+5.67%) ⬆️

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 135be29...80f7337. Read the comment docs.

@pcrespov pcrespov force-pushed the is468/empty-trash-from-folders branch from 307786b to 05ee408 Compare February 17, 2025 17:59
@pcrespov pcrespov changed the title WIP: ✨ Is468/empty trash from folders ✨ web-api: Empty bins for folders and its content Feb 17, 2025
@pcrespov pcrespov marked this pull request as ready for review February 17, 2025 18:04
@pcrespov pcrespov force-pushed the is468/empty-trash-from-folders branch from 05ee408 to 27dad9d Compare February 17, 2025 20:24
…osparc-simcore into is468/empty-trash-from-folders
Copy link
Contributor

@GitHK GitHK 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
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.

👍

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
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.

Cool stuff! Thanks for the effort

@pcrespov pcrespov enabled auto-merge (squash) February 18, 2025 10:00
@pcrespov pcrespov disabled auto-merge February 18, 2025 13:33
@pcrespov pcrespov merged commit 8344bf6 into ITISFoundation:master Feb 18, 2025
88 of 92 checks passed
@pcrespov pcrespov deleted the is468/empty-trash-from-folders branch February 18, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:webserver issue related to the webserver service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants