-
Notifications
You must be signed in to change notification settings - Fork 32
🎨♻️Simultaneous access: emit project update event when a user closes a project or the GC closes it #8163
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
🎨♻️Simultaneous access: emit project update event when a user closes a project or the GC closes it #8163
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8163 +/- ##
==========================================
+ Coverage 87.93% 87.99% +0.05%
==========================================
Files 1716 1769 +53
Lines 68890 69675 +785
Branches 1056 1182 +126
==========================================
+ Hits 60580 61309 +729
- Misses 7988 8014 +26
- Partials 322 352 +30
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
992ef20 to
2e952ec
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.
Merci!
f6eccdb to
9e0b3ab
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.
Pull Request Overview
This PR refactors the simultaneous access system to emit project update events when a user closes a project or when the garbage collector (GC) closes it. The changes consolidate project closing logic by making the GC use the same code path as user-initiated project closure, ensuring consistent event emission.
- Refactors the garbage collector to use the same project closing mechanism as user actions
- Introduces a new
UserSessionmodel to replace the previous dict-based approach for better type safety - Consolidates project closing logic to ensure project update events are emitted in all scenarios
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| services/web/server/src/simcore_service_webserver/resource_manager/models.py | Introduces new UserSession pydantic model with redis key serialization methods |
| services/web/server/src/simcore_service_webserver/resource_manager/registry.py | Updates registry to use UserSession model instead of dict-based approach |
| services/web/server/src/simcore_service_webserver/projects/_projects_service.py | Refactors project closing logic and renames function for clarity |
| services/web/server/src/simcore_service_webserver/garbage_collector/_core_disconnected.py | Simplifies GC logic to use the unified project closing mechanism |
| Multiple test files | Updates tests to use the new UserSession model and improved socketio connection handling |
services/web/server/src/simcore_service_webserver/resource_manager/models.py
Outdated
Show resolved
Hide resolved
...s/web/server/tests/unit/with_dbs/04/garbage_collector/test_resource_manager_user_sessions.py
Show resolved
Hide resolved
...s/web/server/tests/unit/with_dbs/04/garbage_collector/test_resource_manager_user_sessions.py
Outdated
Show resolved
Hide resolved
...s/web/server/tests/unit/with_dbs/04/garbage_collector/test_resource_manager_user_sessions.py
Outdated
Show resolved
Hide resolved
bf737d2 to
f1d5bd0
Compare
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'd say it looks OK, I have a few questions
services/web/server/src/simcore_service_webserver/resource_manager/models.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/garbage_collector/_core_disconnected.py
Outdated
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/garbage_collector/_core_disconnected.py
Outdated
Show resolved
Hide resolved
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
services/web/server/src/simcore_service_webserver/projects/_projects_service.py
Show resolved
Hide resolved
|
@mergify queue |
🟠 Waiting for conditions to match
|
43b8ba6 to
7260add
Compare
|



What do these changes do?
Related issue/s
How to test
Dev-ops