-
Notifications
You must be signed in to change notification settings - Fork 27
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
✨ 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
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
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
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
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
Quality Gate passedIssues Measures |
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 /projects
won'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_DAYS
setting. This value is also available via the app's static configuration REST API endpoint. SEEHighlights
trash
tag inopenapi.yaml
:GET
object responseweb/server/tests/unit/with_dbs/03/test_trash.py
for usage examplestrashed_at
timestamp column in theprojects
tablePROJECTS_TRASH_RETENTION_DAYS
NOTE: this is now it would be curled
Related issue/s
How to test
Dev-ops checklist
PROJECTS_TRASH_RETENTION_DAYS
https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/merge_requests/1026