⚗️ 🐛 fix(director-v2): yield event loop during compute_pipeline_details node-hash loop - #9469
Conversation
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent event-loop starvation in director-v2 when computing pipeline details by explicitly yielding during the computational-node traversal used to compute node hashes/states.
Changes:
- Added an
asyncioimport to support explicit yielding. - Inserted
await asyncio.sleep(0)inside_set_computational_nodes_states()to yield to the event loop while iterating through computational nodes.
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #9469 +/- ##
===========================================
- Coverage 87.60% 67.72% -19.89%
===========================================
Files 2116 826 -1290
Lines 83403 37740 -45663
Branches 1553 202 -1351
===========================================
- Hits 73069 25558 -47511
- Misses 9913 12130 +2217
+ Partials 421 52 -369
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
… of github.com:giancarloromeo/osparc-simcore into fix/director-v2-event-loop-starvation-pipeline-details
|



What do these changes do?
This pull request introduces a minor improvement to the computational nodes state-setting logic in
dags.py. The main change is the addition of anawait asyncio.sleep(0)call inside the loop that processes computational nodes, which helps yield control to the event loop and can improve responsiveness in async environments.Related issue/s
How to test
Dev-ops