-
Notifications
You must be signed in to change notification settings - Fork 32
🎨 Add removal of project documents from the Redis (Garbage Collection background task) #8177
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
🎨 Add removal of project documents from the Redis (Garbage Collection background task) #8177
Conversation
Introduces client session ID to APIs and project update notifications, enabling session-aware updates and improved multi-tab/user experience. Allows the frontend to distinguish between updates from different user sessions, preventing redundant UI refreshes for the originating session when optimistic updates are used. Relates to collaborative editing and real-time notification enhancements.
Cleans up obsolete code related to updating frontend node outputs, streamlining the module and reducing maintenance overhead. This helps avoid confusion and ensures only relevant logic is retained.
Streamlines the workflow for updating project documents by separating workbench updates from document and version increment logic. Improves atomicity and clarity in concurrent operations, ensuring that project documents and their versions remain consistent. Enhances maintainability and reduces potential race conditions during project modifications.
Introduces a background job that regularly prunes project documents from Redis, improving resource management and preventing data accumulation. Integrates the new cleanup routine into the existing garbage collector plugin.
Introduces an admin cleanup function that scans project documents in the Redis database and deletes those associated with projects that do not have any connected users via socketio. Helps reduce unnecessary storage and maintains data consistency.
Simplifies logic for identifying opened projects by introducing a shared utility function. Improves reliability of project document removal by ensuring active projects are preserved. Adds comprehensive unit tests to verify correct behavior in various edge cases.
Improves test clarity and maintainability by introducing fixtures for Redis client, SocketIO server, and project document setup. Simplifies test logic, enhances resource cleanup, and ensures more robust test isolation for project document removal scenarios.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8177 +/- ##
==========================================
- Coverage 88.06% 85.11% -2.96%
==========================================
Files 1901 739 -1162
Lines 73093 33838 -39255
Branches 1280 176 -1104
==========================================
- Hits 64368 28800 -35568
+ Misses 8345 4980 -3365
+ Partials 380 58 -322
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
pcrespov
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.
thx! left some suggestions
services/web/server/src/simcore_service_webserver/resource_manager/registry_utils.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/resource_manager/registry_utils.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_service.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_service.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/04/garbage_collector/test_projects_document_service.py
Show resolved
Hide resolved
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.
merci
GitHK
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.
I'm not convinced by the approach, but I might be missing something. Please see my comment
services/web/server/src/simcore_service_webserver/projects/_project_document_service.py
Outdated
Show resolved
Hide resolved
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.
cool, thanks!
services/web/server/src/simcore_service_webserver/projects/_project_document_service.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_project_document_service.py
Outdated
Show resolved
Hide resolved
services/web/server/tests/unit/with_dbs/04/garbage_collector/test_projects_document_service.py
Outdated
Show resolved
Hide resolved
|
|
@mergify queue |
🟠 Waiting for conditions to match
|
bca1a27
into
ITISFoundation:master



What do these changes do?
Related issue/s
How to test
osparc-simcore/services/web/server/tests/unit/with_dbs/04/garbage_collector/test_projects_document_service.pyDev-ops