From cbaa1abbc3363a61e0f7c9f6b209705d5280743c Mon Sep 17 00:00:00 2001 From: JamieDeMaria Date: Mon, 23 Dec 2024 13:50:10 -0800 Subject: [PATCH] comments --- .../AutomaterializeMiddlePanelWithData.tsx | 12 ++++++------ .../automation_tick_evaluation_context.py | 3 +++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx index 28ab4ae312092..f915ea9b9e413 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AutoMaterializePolicyPage/AutomaterializeMiddlePanelWithData.tsx @@ -111,12 +111,12 @@ export const AutomaterializeMiddlePanelWithData = ({ const {partitions: allPartitions} = usePartitionsForAssetKey(definition?.assetKey.path || []); - // DA will either request a list of runs or a single backfill. When DA requests a backfill - // we want to show a row for that backfill in the table, so we need to construct the RunsFilter - // differently. Backfill IDs are 8 characters long, so we can use that to determine if a - // backfill was requested. If DA is updated to request multiple backfills in a single evaluation, - // or emit a combination of runs and backfills in a single evaluation, this logic will need to - // be updated. + // For a single asset for a single tick, DA will either request a list of runs or a single backfill. + // When DA requests a backfill we want to show a row for that backfill in the table, so we need to + // construct the RunsFilter differently. Backfill IDs are 8 characters long, so we can use that to + // determine if a backfill was requested. If DA is updated to request multiple backfills in a + // single evaluation, or emit a combination of runs and backfills in a single evaluation, this + // logic will need to be updated. const backfillIdLength = 8; const runsFilter: RunsFilter | null = useMemo( () => diff --git a/python_modules/dagster/dagster/_core/definitions/automation_tick_evaluation_context.py b/python_modules/dagster/dagster/_core/definitions/automation_tick_evaluation_context.py index 416851a12540e..cf19197e7e34e 100644 --- a/python_modules/dagster/dagster/_core/definitions/automation_tick_evaluation_context.py +++ b/python_modules/dagster/dagster/_core/definitions/automation_tick_evaluation_context.py @@ -286,6 +286,9 @@ def build_run_requests( run_tags: Optional[Mapping[str, str]], emit_backfills: bool, ) -> Sequence[RunRequest]: + """For a single asset in a given tick, the asset will only be part of a run or a backfill, not both. + If the asset is targetd by a backfill, there will only be one backfill that targets the asset. + """ if emit_backfills: backfill_run_request, entity_subsets = _build_backfill_request( entity_subsets, asset_graph, run_tags