Skip to content

🎨 add WAITING_FOR_RESOURCES to get_pipeline_state_from_task_states #7640

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

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