diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx index 499b151a2bfcb..4a29e0d66aa02 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetNodeDefinition.tsx @@ -298,7 +298,7 @@ const DescriptionAnnotations: React.FC<{ {assetNode.isSource ? ( Source Asset ) : !assetNode.isExecutable ? ( - Non-executable Asset + External Asset ) : undefined} ); diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx index 3c56cad640fe0..f781b65617da2 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetExecutionButton.tsx @@ -166,7 +166,7 @@ export function executionDisabledMessageForAssets( : assets.every((a) => a.isSource) ? 'Source assets cannot be materialized' : assets.every((a) => !a.isExecutable) - ? 'Non-executable assets cannot be materialized' + ? 'External assets cannot be materialized' : null; } @@ -412,7 +412,7 @@ async function stateForLaunchingAssets( if (assets.some((x) => !x.isExecutable)) { return { type: 'error', - error: 'One or more non-executable assets are selected.', + error: 'One or more external assets are selected.', }; } diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetExecutionButton.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetExecutionButton.test.tsx index 0a3b3a34974bd..cf48c31457fe1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetExecutionButton.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/LaunchAssetExecutionButton.test.tsx @@ -129,7 +129,7 @@ describe('LaunchAssetExecutionButton', () => { expect(button).toBeDisabled(); userEvent.hover(button); - expect(await screen.findByText('Non-executable assets cannot be materialized')).toBeDefined(); + expect(await screen.findByText('External assets cannot be materialized')).toBeDefined(); }); }); diff --git a/python_modules/dagster-test/dagster_test/toys/external_assets.py b/python_modules/dagster-test/dagster_test/toys/external_assets.py new file mode 100644 index 0000000000000..715f34848fea5 --- /dev/null +++ b/python_modules/dagster-test/dagster_test/toys/external_assets.py @@ -0,0 +1,26 @@ +from dagster import AssetMaterialization, AssetSpec, Definitions, OpExecutionContext, job, op +from dagster._core.definitions.external_asset import external_assets_from_specs + +asset_one = AssetSpec("asset_one") + +asset_two = AssetSpec("asset_two", deps=[asset_one]) + + +@op +def insert_materializations(context: OpExecutionContext) -> None: + context.log_event( + AssetMaterialization(asset_one.key, metadata={"nrows": 10, "source": "From this script."}) + ) + context.log_event( + AssetMaterialization(asset_two.key, metadata={"nrows": 12, "source": "From this script."}) + ) + + +@job +def insert_materializations_job() -> None: + insert_materializations() + + +defs = Definitions( + assets=external_assets_from_specs([asset_one, asset_two]), jobs=[insert_materializations_job] +)