-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
AssetsDefinition.node_def
optional (#22165)
## Summary & Motivation Makes the `_node_def` property on `AssetsDefinition` optional. This means that: - `AssetsDefinition`s constructed using `external_assets_from_specs` no longer include a dummy function. - `AssetsDefinition`s created from `SourceAsset`s no longer include a dummy function. - `{SYSTEM_METADATA_KEY_ASSET_EXECUTION_TYPE: "UNEXECUTABLE"}` goes away - `external_assets_from_specs(spec)` now functions identically to `[AssetsDefinition(specs=[spec])]` A question that came up while implementing this was: what to do about IO managers? `SourceAsset` has an `io_manager_key` attribute. IO manager keys are currently stored inside `OutputDefinition`s. Previously, when converting `SourceAsset`s to `AssetsDefinition`s, we were stashing the `io_manager_key` inside the output defs on the dummy node. This PR adds a "dagster/io_manager_key" asset definition metadata key for these cases. An alternative would be to give `AssetSpec` an `io_manager_key` attribute. ## How I Tested These Changes
- Loading branch information
Showing
8 changed files
with
170 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.