Skip to content

Commit

Permalink
update canceling logic for failed subset
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 25, 2024
1 parent 05eacc4 commit cb3ce07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1295,12 +1295,19 @@ def get_canceling_asset_backfill_iteration_data(
),
asset_graph,
)
# we fetch the failed_subset to get any new assets that have failed and add that to the set of
# assets we alerady know failed and their downstreams. However we need to remove any assets in
# updated_materialized_subset to account for the case where a run retry successfully
# materialized a previlusly failed asset.
updated_failed_subset = (
asset_backfill_data.failed_and_downstream_subset | failed_subset
) - updated_materialized_subset
updated_backfill_data = AssetBackfillData(
target_subset=asset_backfill_data.target_subset,
latest_storage_id=asset_backfill_data.latest_storage_id,
requested_runs_for_target_roots=asset_backfill_data.requested_runs_for_target_roots,
materialized_subset=updated_materialized_subset,
failed_and_downstream_subset=failed_subset,
failed_and_downstream_subset=updated_failed_subset,
requested_subset=asset_backfill_data.requested_subset,
backfill_start_time=TimestampWithTimezone(backfill_start_timestamp, "UTC"),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3159,6 +3159,7 @@ def test_asset_backfill_retries_make_downstreams_runnable(
backfill = instance.get_backfill(backfill_id)
assert backfill
assert backfill.status == BulkActionStatus.COMPLETED_SUCCESS
assert backfill.asset_backfill_data
assert (
backfill.asset_backfill_data.failed_and_downstream_subset.num_partitions_and_non_partitioned_assets
== 0
Expand Down

0 comments on commit cb3ce07

Please sign in to comment.