-
Notifications
You must be signed in to change notification settings - Fork 32
✨ Is1647/collaboration feature - 1. iteration (OPS ⚠️) #8140
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
✨ Is1647/collaboration feature - 1. iteration (OPS ⚠️) #8140
Conversation
Introduces a project document model with versioning, stored in Redis, and emits real-time update notifications to project rooms via socket.io when a project is patched. Updates Redis and docker-compose configs to support a dedicated documents database. Improves collaboration features by allowing clients to receive live project document changes. Relates to collaborative editing and project state synchronization features.
Updates socket.io room joining to reflect non-awaitable enter_room method, preparing for upcoming dependency upgrade. Also adds DOCUMENTS to Redis database setup and improves type casting for project types. Improves code clarity and ensures future compatibility.
Introduces a unified function for patching projects with versioning and notification, ensuring atomic updates and consistent user alerts. Removes legacy methods, simplifies project API, and updates usages across modules for better maintainability and reduced duplication.
Updates the comment to note that the progress field, while marked deprecated, is still actively used by the frontend file picker. Helps prevent confusion for future maintainers about its current usage.
…tions Introduces a locked and versioned update mechanism for project workbench modifications, ensuring atomic operations using Redis distributed locks and version increments. Notifies users of project document updates after each successful change, reducing race conditions and improving consistency in collaborative environments.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8140 +/- ##
==========================================
- Coverage 89.72% 88.12% -1.61%
==========================================
Files 1701 1893 +192
Lines 66249 72916 +6667
Branches 824 1279 +455
==========================================
+ Hits 59443 64257 +4814
- Misses 6590 8279 +1689
- Partials 216 380 +164
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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 introduces the first iteration of a collaboration feature that enables real-time project document updates and user notifications. The implementation adds a comprehensive system for tracking project document versions and notifying users when changes occur through WebSocket connections.
- Implements Redis-based document versioning for collaborative editing
- Adds real-time notification system using SocketIO for project updates
- Refactors project update methods to include user notification and version control
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| services/docker-compose*.yml | Increases Redis database count to 11 and adds documents database configuration |
| packages/settings-library/src/settings_library/redis.py | Adds DOCUMENTS Redis database enum |
| packages/service-library/src/servicelib/redis/* | Implements project document versioning utilities with Redis |
| packages/models-library/src/models_library/api_schemas_webserver/* | Adds ProjectDocument model and SocketIO project room support |
| services/web/server/src/simcore_service_webserver/redis.py | Adds Redis document manager client |
| services/web/server/src/simcore_service_webserver/socketio/messages.py | Implements project room messaging |
| services/web/server/src/simcore_service_webserver/projects/* | Refactors project services to support collaboration with notifications |
| services/web/server/tests/unit/* | Updates tests and removes unused test methods |
Comments suppressed due to low confidence (1)
services/web/server/src/simcore_service_webserver/projects/_controller/projects_states_rest.py:115
- [nitpick] The error message 'Cannot open project without a socket_id, please refresh the page' may be confusing to users. Consider a more specific message about WebSocket connection requirements
raise web.HTTPBadRequest(
packages/models-library/src/models_library/api_schemas_webserver/projects_ui.py
Show resolved
Hide resolved
packages/models-library/src/models_library/api_schemas_webserver/projects_ui.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_jobs_repository.py
Show resolved
Hide resolved
services/web/server/src/simcore_service_webserver/projects/_projects_service_delete.py
Show resolved
Hide resolved
…buliak66/osparc-simcore into is1647/collaboration-features-1
Adds detailed debug logging to lock acquisition, enhances pytest output with DEBUG logs for CI, and clarifies mock subsystem setup for test reliability. Facilitates easier diagnosis of concurrency and storage issues.
This reverts commit 22df4d8.
|



What do these changes do?
What am I trying to solve?
How does it work?
ProjectDocumentmodel is used, which is always fully transmitted to the frontend along with a new version. This allows the frontend client to compute a diff and understand what has changed.PROJECT_DB_UPDATE_REDIS_LOCK_KEYhas been introduced in Redis.ProjectDocumentversion is also stored in Redis in thedocumentstable.Bonus identified issues with @pcrespov @sanderegg
fire_and_forget_taskfunction to fix thisPROJECT_DB_UPDATE_REDIS_LOCK_KEYwas set to arbitrary value of 30 seconds, this was set toNonesuch that we wait forever for the lock instead of failing (issue with creating/deleting 150 nodes concurrently)Related issue/s
How to test
Dev-ops
documents