-
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
WIP: 🐛 Clean removal of output files #6986
base: master
Are you sure you want to change the base?
WIP: 🐛 Clean removal of output files #6986
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6986 +/- ##
==========================================
- Coverage 87.16% 83.95% -3.21%
==========================================
Files 1634 1629 -5
Lines 64264 64149 -115
Branches 2051 2051
==========================================
- Hits 56013 53858 -2155
- Misses 7914 9968 +2054
+ Partials 337 323 -14
Continue to review full report in Codecov by Sentry.
|
…rloromeo/osparc-simcore into is6963/clean-output-files-removal
services/web/server/src/simcore_service_webserver/projects/_projects_db.py
Show resolved
Hide resolved
…rloromeo/osparc-simcore into is6963/clean-output-files-removal
Quality Gate passedIssues Measures |
What do these changes do?
TL;DR: Removing (output) files referenced by Project Nodes, leaves the system in an inconsistent state.
Currently, the WebServer is the 1st responder and forwards the deletion requests to the Storage service, which deletes physically the file(s).
The Projects Nodes are not updated accordingly and Director v2 is not informed about the changes.
Proposal
To maintain decoupling while ensuring consistency between the storage and project services, I recommend using an Event-Driven Architecture:
FileDeleted
event with relevant metadata.FileDeleted
event once the deletion is successful.FileReferenced
/FileDereferenced
events from the event broker.FileReferenced
/FileDereferenced
event is received, it updates the soft reference count associated with that file.FileReferenced
/FileDereferenced
events once a file is referenced/dereferenced.FileDeleted
events from the event broker.FileDeleted
event is received, it verifies if the file is referenced in any project and updates its data (e.g., mark the file as deleted, remove reference from Nodes).Event Types Overview
FileDeleted
FileReferenced
FileDereferenced
It would be nice to have the PR #7010 in as well, since it cleans the Project Nodes persistence in the DB.
Related issue/s
workbench
fromprojects
toprojects_nodes
table 🗃️ #7010How to test
Dev-ops checklist