Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
schrockn committed Sep 19, 2023
1 parent 0041a2a commit c57f687
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -779,10 +779,14 @@ def _gen_fn():
yield DagsterEvent.asset_materialization(step_context, materialization)

asset_key, partitions = _asset_key_and_partitions_for_output(output_context)
asset_layer = step_context.job_def.asset_layer
if asset_key and asset_layer.has_assets_def_for_asset(asset_key):
assets_def = asset_layer.assets_def_for_asset(asset_key)
execution_type = assets_def.asset_execution_type_for_asset(asset_key)
if asset_key:
asset_layer = step_context.job_def.asset_layer
execution_type = (
asset_layer.assets_def_for_asset(asset_key).asset_execution_type_for_asset(asset_key)
if asset_layer.has_assets_def_for_asset(asset_key)
else AssetExecutionType.MATERIALIZATION
)

check.invariant(
execution_type != AssetExecutionType.UNEXECUTABLE,
"There should never be unexecutable assets here",
Expand Down

0 comments on commit c57f687

Please sign in to comment.