-
Notifications
You must be signed in to change notification settings - Fork 32
🐛Ensure log/progress queue is restored when websocket connection is restored #7971
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
🐛Ensure log/progress queue is restored when websocket connection is restored #7971
Conversation
|
@mergify queue |
🟠 Waiting for conditions to match
|
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 ensures that when a user’s WebSocket connection is restored, their log/progress queue resumes by passing and handling a client_session_id across socket handlers and observers.
- Extended the auth handler to return a
client_session_id. - Updated connect flow to emit
client_session_idwith the user-connected signal. - Added new observers in project slot and adjusted resource-usage handlers to accept
client_session_id.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| services/web/server/src/simcore_service_webserver/socketio/_handlers.py | Extended auth handler return type and emit arguments |
| services/web/server/src/simcore_service_webserver/resource_usage/_observer.py | Updated observer signatures to accept client_session_id |
| services/web/server/src/simcore_service_webserver/projects/_controller/projects_slot.py | Added user-connected observer that uses client_session_id |
Comments suppressed due to low confidence (3)
services/web/server/src/simcore_service_webserver/socketio/_handlers.py:47
- [nitpick] The docstring for this handler should be updated to mention that a
client_session_idis now returned in addition touser_idandproduct_name.
async def _handler(request: web.Request) -> tuple[UserID, ProductName, str]:
services/web/server/src/simcore_service_webserver/projects/_controller/projects_slot.py:24
- [nitpick] Consider adding a docstring to explain this new observer’s purpose and the meaning of its parameters, especially
client_session_id.
async def _on_user_connected(
services/web/server/src/simcore_service_webserver/socketio/_handlers.py:139
- Add or update unit/integration tests to cover reconnect scenarios and verify that
client_session_idis correctly propagated and used for restoring log/progress queues.
)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7971 +/- ##
==========================================
- Coverage 87.89% 81.23% -6.66%
==========================================
Files 1841 692 -1149
Lines 70996 32726 -38270
Branches 1227 176 -1051
==========================================
- Hits 62401 26585 -35816
+ Misses 8241 6083 -2158
+ Partials 354 58 -296
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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!
84d53cc to
378c79e
Compare
|
@mergify queue |
🟠 Waiting for conditions to match
|
378c79e to
0572ef4
Compare
services/web/server/src/simcore_service_webserver/projects/_controller/projects_slot.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_controller/projects_slot.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.
Looks good 👍
0572ef4 to
57d30a3
Compare
|
@mergify queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 4546aa7 |
|



What do these changes do?
This PR ensures that re-connection of a user to the websocket re-enables the flow of log/progress messages to the frontend.
Related issue/s
How to test
Dev-ops