-
Notifications
You must be signed in to change notification settings - Fork 32
♻️Dask-sidecar: remove dask Pub/Sub (🚨🚨🚨 computational services must be switched off prior to deploy) #7660
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
♻️Dask-sidecar: remove dask Pub/Sub (🚨🚨🚨 computational services must be switched off prior to deploy) #7660
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7660 +/- ##
===========================================
- Coverage 87.55% 70.00% -17.55%
===========================================
Files 1802 711 -1091
Lines 70140 33809 -36331
Branches 1137 170 -967
===========================================
- Hits 61409 23669 -37740
- Misses 8421 10082 +1661
+ Partials 310 58 -252
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
f9ae6c7 to
33b4faa
Compare
c810815 to
355cf27
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 removes Dask’s legacy Pub/Sub mechanism in favor of an event-based workflow using worker.log_event. Key changes include updating handlers and tests to work with the new event tuples, removing deprecated Pub/Sub usages, and refactoring related utilities and client registrations.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| services/director-v2/tests/unit/with_dbs/comp_scheduler/test_scheduler_dask.py | Updated progress event handling to use tuples with arrow timestamps |
| services/director-v2/tests/unit/test_modules_dask_client.py | Removed assertions on deprecated _subscribed_tasks and adjusted type annotations |
| services/director-v2/src/simcore_service_director_v2/utils/dask_client_utils.py | Modified TaskHandlers to accept progress events as tuples |
| services/director-v2/src/simcore_service_director_v2/utils/dask.py | Removed legacy Pub/Sub consumer logic |
| services/director-v2/src/simcore_service_director_v2/modules/dask_client.py | Replaced Pub/Sub-based registration with subscribe_topic calls |
| services/director-v2/src/simcore_service_director_v2/modules/comp_scheduler/_scheduler_dask.py | Adapted task progress change handler for tuple events |
| services/dask-sidecar/tests/unit/test_worker.py | Refactored tests to use subscribe_topic instead of Pub/Sub mocks |
| services/dask-sidecar/tests/unit/test_utils_dask.py | Updated test utilities to align with the new event-based progress reporting |
| services/dask-sidecar/tests/unit/conftest.py | Updated environment variables for logging level |
| services/dask-sidecar/src/simcore_service_dask_sidecar/utils/dask.py | Modified publish_event to call worker.log_event directly |
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.
Thanks 👍



What do these changes do?
This PR introduces several updates to the Dask-sidecar and Director-v2 and their associated tests.
The changes focus on transitioning from Dask's deprecated
Pub/Submechanism to their recommended event-based communication. Additionally, minor refactoring and cleanup have been performed to streamline the codebase.Key Changes:
Transition from
Pub/Subto Event-Based (usinglog_event) Communication:Pub/Submechanism with event-based communication usingworker.log_eventfor publishing task progress and logs. ([services/dask-sidecar/src/simcore_service_dask_sidecar/utils/dask.pyL172-R181](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-27830c4191d3861064437bb2474d4cbd8e1d90a2d3b0e8217c028e14fb674a2bL172-R181))distributed.Pubanddistributed.Subthroughout the codebase and tests. ([[1]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-27830c4191d3861064437bb2474d4cbd8e1d90a2d3b0e8217c028e14fb674a2bL66-L83),[[2]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-c66b25f1d5f48cb131389bf7b17fbe391d0bd704a54c10715d617d8684851a14L109-L116),[[3]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-c66b25f1d5f48cb131389bf7b17fbe391d0bd704a54c10715d617d8684851a14L141))Test Suite Updates:
Subfor verifying task progress and event publishing. Added helper functions like_assert_parse_progresses_from_progress_event_handlerto validate progress ordering and completeness. ([[1]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-29344dd3643e46b1bd55fb9f0d6cda0bec4a8131a71154f17ab0cb833ac41880L40-R121),[[2]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-c66b25f1d5f48cb131389bf7b17fbe391d0bd704a54c10715d617d8684851a14L644-R650),[[3]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-c66b25f1d5f48cb131389bf7b17fbe391d0bd704a54c10715d617d8684851a14L760-R757))dask_client_multi) to reduce redundancy. ([services/dask-sidecar/tests/unit/test_utils_dask.pyL40-R121](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-29344dd3643e46b1bd55fb9f0d6cda0bec4a8131a71154f17ab0cb833ac41880L40-R121))_wait_for_task_to_startand_notify_task_is_started_and_readyto use the Dask client explicitly. ([[1]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-29344dd3643e46b1bd55fb9f0d6cda0bec4a8131a71154f17ab0cb833ac41880L179-R139),[[2]](https://github.com/ITISFoundation/osparc-simcore/pull/7660/files#diff-29344dd3643e46b1bd55fb9f0d6cda0bec4a8131a71154f17ab0cb833ac41880L189-R149))Next PR:
Related issue/s
How to test
Dev-ops