🐛♻️Computational pipelines: Align computation pipeline HTTP codes, fix dynamic cycles bug#8963
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8963 +/- ##
=======================================
Coverage 87.48% 87.48%
=======================================
Files 2068 2068
Lines 81581 81586 +5
Branches 1434 1434
=======================================
+ Hits 71368 71375 +7
+ Misses 9809 9806 -3
- Partials 404 405 +1
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
e1ab703 to
90f8fae
Compare
There was a problem hiding this comment.
Pull request overview
This PR aligns computation “start” semantics across director-v2, webserver, api-server, and the frontend by returning clearer HTTP response codes (notably using 200 OK when there is nothing to start vs 201 Created when a run is actually started), and updating clients/tests/specs accordingly.
Changes:
- Director-v2 computations endpoint now returns 200 when the pipeline is up-to-date / has no runnable computational tasks (instead of treating it as a 422).
- Webserver director-v2 client plumbing now propagates the downstream status code (200 vs 201) up to the webserver REST endpoint.
- Frontend + integration/unit tests + OpenAPI specs updated to reflect the new response-code behavior (and related not-found/conflict/service-unavailable mappings).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| services/web/server/tests/integration/01/test_computation.py | Updates integration expectations (e.g., restart start → 200) and minor formatting adjustments. |
| services/web/server/src/simcore_service_webserver/director_v2/_director_v2_service.py | Adapts director-v2 request helper call sites to new (payload, status) return shape. |
| services/web/server/src/simcore_service_webserver/director_v2/_controller/rest.py | Propagates downstream 200 vs 201 for computation start to webserver clients. |
| services/web/server/src/simcore_service_webserver/director_v2/_client_base.py | Enhances request helper to accept multiple expected success codes and return (payload, status). |
| services/web/server/src/simcore_service_webserver/director_v2/_client.py | Allows director-v2 “start computation” to succeed with 200 or 201 and returns status upstream. |
| services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js | Handles 200 “up-to-date” start response by prompting to force re-run. |
| services/director-v2/tests/unit/with_dbs/comp_scheduler/test_api_route_computations.py | Updates unit tests to new status codes (e.g., 404/409). |
| services/director-v2/tests/integration/conftest.py | Accepts 200 or 201 from computation creation helper. |
| services/director-v2/tests/integration/01/test_computation_api.py | Updates integration tests to expect 200 when nothing is runnable/up-to-date. |
| services/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_tasks/_utils.py | Raises a more specific EC2 instance-type not-found error for invalid EC2 type selection. |
| services/director-v2/src/simcore_service_director_v2/core/errors.py | Introduces EC2InstanceTypeNotFoundError and minor message formatting updates. |
| services/director-v2/src/simcore_service_director_v2/api/routes/computations.py | Implements 200 “nothing started” behavior and remaps several error statuses. |
| services/api-server/src/simcore_service_api_server/services_http/webserver.py | Updates exception mapping for computation start to reflect new upstream statuses. |
| services/api-server/src/simcore_service_api_server/exceptions/backend_errors.py | Aligns api-server error status codes (e.g., cluster not found → 404, config error → 503). |
| api/specs/web-server/_computations.py | Updates webserver OpenAPI spec responses for computation start. |
services/web/server/src/simcore_service_webserver/director_v2/_controller/rest.py
Outdated
Show resolved
Hide resolved
services/api-server/src/simcore_service_api_server/services_http/webserver.py
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/core/errors.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/api/routes/computations.py
Show resolved
Hide resolved
services/static-webserver/client/source/class/osparc/desktop/StudyEditor.js
Outdated
Show resolved
Hide resolved
0f8fb8b to
7f923bb
Compare
354c9fe to
8b04211
Compare
services/api-server/src/simcore_service_api_server/exceptions/backend_errors.py
Outdated
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/api/routes/computations.py
Show resolved
Hide resolved
services/director-v2/src/simcore_service_director_v2/api/routes/computations.py
Outdated
Show resolved
Hide resolved
...ces/director-v2/src/simcore_service_director_v2/modules/db/repositories/comp_tasks/_utils.py
Outdated
Show resolved
Hide resolved
…tudyEditor.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
5bbbfc2 to
c381665
Compare
|
@mergify queue |
Merge Queue Status
Required conditions to enter a queue
|
|
|



What do these changes do?
Bugfix: it is now possible to run the computational pipeline, even though there is a cycle in the dynamic services
Related issue/s
How to test
pytestin director-v2, webserver, api-server, static-webserverDev-ops