Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
RunningState.NOT_STARTED,
RunningState.WAITING_FOR_CLUSTER,
): RunningState.WAITING_FOR_CLUSTER,
# if there are tasks waiting for resources and nothing is running/pending, then the pipeline is also waiting for resources
(
RunningState.PUBLISHED,
RunningState.NOT_STARTED,
RunningState.WAITING_FOR_RESOURCES,
): RunningState.WAITING_FOR_RESOURCES,
# if there are PENDING states that means the pipeline was published and is awaiting sidecars
(
RunningState.PENDING,
Expand Down
9 changes: 9 additions & 0 deletions services/director-v2/tests/unit/test_utils_computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@ def fake_task(fake_task_file: Path) -> CompTaskAtDB:
RunningState.WAITING_FOR_CLUSTER,
id="published and waiting for cluster = waiting for cluster",
),
pytest.param(
[
(RunningState.WAITING_FOR_RESOURCES),
(RunningState.PUBLISHED),
(RunningState.PUBLISHED),
],
RunningState.WAITING_FOR_RESOURCES,
id="published and waiting for resources = waiting for resources",
),
],
)
def test_get_pipeline_state_from_task_states(
Expand Down
Loading