🐛 Fix playwright websocket bug - getting updates for wrong project - #9571
🐛 Fix playwright websocket bug - getting updates for wrong project#9571mrnicegyu11 wants to merge 4 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9571 +/- ##
==========================================
+ Coverage 87.69% 87.78% +0.09%
==========================================
Files 2105 2129 +24
Lines 83070 84354 +1284
Branches 1585 1585
==========================================
+ Hits 72849 74051 +1202
- Misses 9799 9882 +83
+ Partials 422 421 -1
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
sanderegg
left a comment
There was a problem hiding this comment.
I think there is a flaw in this fix in the fact that the project_id is only set at the end. so in effect it could already have returned true due to another project.
Why not gate it with the project_id? and set a warning that the project ID is not set?
| if message.startswith(SOCKETIO_MESSAGE_PREFIX): | ||
| decoded_message = decode_socketio_42_message(message) | ||
| if decoded_message.name == _OSparcMessages.PROJECT_STATE_UPDATED.value: | ||
| if self.project_uuid is not None: |
There was a problem hiding this comment.
Is project_uuid allowed to be None per the API contract with the webserver? If so, should this be flagged as an error instead?
There was a problem hiding this comment.
@matusdrobuliak66 @bisgaard-itis can you maybe comment on this?
There was a problem hiding this comment.
Pull request overview
This PR fixes flaky Playwright E2E behavior caused by projectStateUpdated WebSocket frames from a different project (e.g., a previous job’s still-open project) being misinterpreted as updates for the currently opened project.
Changes:
- Captures the project UUID from the
:openresponse and uses it to scope subsequentprojectStateUpdatedmatching. - Extends
SocketIOProjectStateUpdatedWaiterto optionally ignoreprojectStateUpdatedevents for other projects.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/e2e-playwright/tests/conftest.py |
Sets the waiter’s project_uuid based on the opened project’s UUID from the :open HTTP response. |
packages/pytest-simcore/src/pytest_simcore/helpers/playwright.py |
Adds project UUID extraction and optional filtering logic to SocketIOProjectStateUpdatedWaiter to avoid matching updates from unrelated projects. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|



What do these changes do?
False negative playwright test failure, pipeline 1266387:project close on sim4life.io billable took 1m45s in the sleeper job, letting a stale OPENED/locked project bleed into the next same-user job.
Fix: Make SocketIOProjectStateUpdatedWaiter match on the specific project_uuid returned by the :open response, not on state alone.
Related issue/s
How to test
Dev-ops