-
Notifications
You must be signed in to change notification settings - Fork 32
✨ Trash projects #6579
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 projects #6579
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6579 +/- ##
==========================================
+ Coverage 87.75% 87.87% +0.12%
==========================================
Files 1552 1555 +3
Lines 62361 62559 +198
Branches 2085 2085
==========================================
+ Hits 54724 54974 +250
+ Misses 7319 7267 -52
Partials 318 318
Continue to review full report in Codecov by Sentry.
|
de1da19 to
74fafef
Compare
odeimaiz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if a delete a folder? And if I then untrash a study within that folder?
services/web/server/src/simcore_service_webserver/garbage_collector/plugin.py
Show resolved
Hide resolved
matusdrobuliak66
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I left some comments
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, a few comments that we can discuss
packages/postgres-database/src/simcore_postgres_database/models/projects.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_crud_api_read.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_trash_api.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_trash_api.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/projects_api.py
Show resolved
Hide resolved
Clarified offline. |
879671e to
9ae8293
Compare
sanderegg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok. this will open many doors to many new issues. let's see.
da74564 to
3c21197
Compare
|



What do these changes do?
A project can now be marked as trashed (
POST /projects/{id}:trash) or restored from the trash (POST /projects/{id}:untrash). Trashing a project flags it for deletion after the defined retention period elapses (PROJECTS_TRASH_RETENTION_DAYS).This is a view of new entrypoints

When listing projects
GET /projects?filters={"trashed": true}, you can now filter out trashed items. Those would correspond to the items in the trash bin. By default, trashed projects are excluded from the list, i.e.GET /projectswon't list trashed projects. The project object in the response includes new fields indicating whether a project is trashed (trashedAt=null) and the date it was trashed (trashedAt!=null).The retention policy for trashed projects is controlled at the application level through the
PROJECTS_TRASH_RETENTION_DAYSsetting. This value is also available via the app's static configuration REST API endpoint. SEEHighlights
trashtag inopenapi.yaml:GETobject responseweb/server/tests/unit/with_dbs/03/test_trash.pyfor usage examplestrashed_attimestamp column in theprojectstablePROJECTS_TRASH_RETENTION_DAYSNOTE: this is now it would be curled
Related issue/s
How to test
Dev-ops checklist
PROJECTS_TRASH_RETENTION_DAYShttps://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/merge_requests/1026