diff --git a/python_modules/dagster/dagster/_core/execution/context/compute.py b/python_modules/dagster/dagster/_core/execution/context/compute.py index 3b2c6c13c746c..bfb61e5ed0dc3 100644 --- a/python_modules/dagster/dagster/_core/execution/context/compute.py +++ b/python_modules/dagster/dagster/_core/execution/context/compute.py @@ -576,10 +576,11 @@ def partition_keys_for_asset( of the dependecy version of the asset, not the partition of the asset as currently being materialized. Defaults to False. """ - return list( - self._step_execution_context.asset_partitions_subset_for_asset( + return self.partitions_def_for_asset(asset).get_partition_keys_in_range( + self._step_execution_context.asset_partition_key_range_for_asset( asset, is_dependency=is_dependency - ).get_partition_keys() + ), + dynamic_partitions_store=self.instance, ) @public