Skip to content

Commit

Permalink
add defensive check for multiple ExternalAssetNodes for same key (#16764
Browse files Browse the repository at this point in the history
)

pretty sure this would be bad so assert against it 

## How I Tested These Changes

existing test coverage
  • Loading branch information
alangenfeld authored Sep 25, 2023
1 parent 73123b5 commit 99c287d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1659,6 +1659,13 @@ def external_asset_graph_from_defs(
)
)

defined = set()
for node in asset_nodes:
if node.asset_key in defined:
check.failed(f"Produced multiple ExternalAssetNodes for key {node.asset_key}")
else:
defined.add(node.asset_key)

return asset_nodes


Expand Down

0 comments on commit 99c287d

Please sign in to comment.