Skip to content

Commit

Permalink
Fix asset wipe mutation with missing dynamic partitions store (#25674)
Browse files Browse the repository at this point in the history
## Summary & Motivation
Fix the asset wipe mutation for dynamically partitioned assets.

## How I Tested These Changes
Will add test in a follow up PR.

## Changelog
Fixes an issue where wiping a dynamically partitioned asset causes an
error.
  • Loading branch information
clairelin135 committed Oct 31, 2024
1 parent abb0188 commit 7800b90
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@ def wipe_assets(

node = graphene_info.context.asset_graph.asset_node_snaps_by_key[apr.asset_key]
partitions_def = check.not_none(node.partitions).get_partitions_definition()
partition_keys = partitions_def.get_partition_keys_in_range(apr.partition_range)
partition_keys = partitions_def.get_partition_keys_in_range(
apr.partition_range, dynamic_partitions_store=instance
)
try:
instance.wipe_asset_partitions(apr.asset_key, partition_keys)

Expand Down

0 comments on commit 7800b90

Please sign in to comment.