From b08812184a0702f7232d74e4125ab8cf1054359d Mon Sep 17 00:00:00 2001 From: JamieDeMaria Date: Tue, 20 Aug 2024 10:44:41 -0400 Subject: [PATCH] comment --- .../dagster-graphql/dagster_graphql/schema/backfill.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python_modules/dagster-graphql/dagster_graphql/schema/backfill.py b/python_modules/dagster-graphql/dagster_graphql/schema/backfill.py index acc17980eb483..e9c13d26f6550 100644 --- a/python_modules/dagster-graphql/dagster_graphql/schema/backfill.py +++ b/python_modules/dagster-graphql/dagster_graphql/schema/backfill.py @@ -506,13 +506,14 @@ def resolve_runStatus(self, _graphene_info: ResolveInfo) -> str: return GrapheneRunStatus.QUEUED return GrapheneRunStatus.STARTED # BulkActionStatus.COMPLETED + # Backfills are only marked as COMPLETED once all runs that are part of the backfill have reached + # a finished state (SUCCESS, FAILURE, or CANCELED). So we only need to check for those + # statuses to determine the overall status of the backfill. sub_runs = self._get_records(_graphene_info) sub_run_statuses = [record.dagster_run.status.value for record in sub_runs] if all(status == "SUCCESS" for status in sub_run_statuses): return GrapheneRunStatus.SUCCESS - if any(status == "FAILURE" for status in sub_run_statuses): - return GrapheneRunStatus.FAILURE - if any(status == "CANCELED" for status in sub_run_statuses): + if any(status == "FAILURE" or status == "CANCELED" for status in sub_run_statuses): return GrapheneRunStatus.FAILURE # can't import this because two deserializers get registered for PipelineRunStatsSnapshot