Skip to content

Commit 840cabe

Browse files
authored
🐛Director-v2 computational scheduler: tasks specific state combination was missing and returning UNKNOWN pipeline state (#8281)
1 parent 6ed663d commit 840cabe

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

services/director-v2/src/simcore_service_director_v2/utils/computations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
RunningState.PENDING,
6666
RunningState.NOT_STARTED,
6767
RunningState.WAITING_FOR_CLUSTER,
68+
RunningState.WAITING_FOR_RESOURCES,
6869
): RunningState.STARTED,
6970
}
7071

services/director-v2/tests/unit/test_utils_computation.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,24 @@ def fake_task(fake_task_file: Path) -> CompTaskAtDB:
266266
RunningState.WAITING_FOR_RESOURCES,
267267
id="published and waiting for resources = waiting for resources",
268268
),
269+
pytest.param(
270+
[
271+
(RunningState.SUCCESS),
272+
(RunningState.WAITING_FOR_RESOURCES),
273+
(RunningState.PUBLISHED),
274+
],
275+
RunningState.STARTED,
276+
id="success, published and waiting for resources = waiting for resources",
277+
),
278+
pytest.param(
279+
[
280+
(RunningState.SUCCESS),
281+
(RunningState.WAITING_FOR_CLUSTER),
282+
(RunningState.PUBLISHED),
283+
],
284+
RunningState.STARTED,
285+
id="success, published and waiting for cluster = waiting for resources",
286+
),
269287
],
270288
)
271289
def test_get_pipeline_state_from_task_states(

0 commit comments

Comments
 (0)