From 9291fd1ffb281a8d121a65c8f08f782d4a6fd44c Mon Sep 17 00:00:00 2001 From: briantu Date: Fri, 18 Oct 2024 13:36:36 -0400 Subject: [PATCH] Fix compute_missing_asset_subset --- .../_core/asset_graph_view/asset_graph_view.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python_modules/dagster/dagster/_core/asset_graph_view/asset_graph_view.py b/python_modules/dagster/dagster/_core/asset_graph_view/asset_graph_view.py index dd8a134e343a3..2034dd5b0d9d4 100644 --- a/python_modules/dagster/dagster/_core/asset_graph_view/asset_graph_view.py +++ b/python_modules/dagster/dagster/_core/asset_graph_view/asset_graph_view.py @@ -454,16 +454,16 @@ async def _compute_missing_asset_subset( partitions_def = self._get_partitions_def(key) if partitions_def: cache_value = await AssetStatusCacheValue.gen(self, (key, partitions_def)) - return ( + materialized_subset = ( cache_value.get_materialized_subset(self, key, partitions_def) if cache_value else self.get_empty_subset(key=key) ) - - value = self._queryer.get_materialized_asset_subset(asset_key=key).value - materialized_subset = EntitySubset( - self, key=key, value=_ValidatedEntitySubsetValue(value) - ) + else: + value = self._queryer.get_materialized_asset_subset(asset_key=key).value + materialized_subset = EntitySubset( + self, key=key, value=_ValidatedEntitySubsetValue(value) + ) return from_subset.compute_difference(materialized_subset) else: # more expensive call