diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx index b74042d211a55..8f1170499695b 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNode.tsx @@ -29,8 +29,6 @@ interface Props { } export const AssetNode = React.memo(({definition, selected, computeKindTagsFilter}: Props) => { - const isSource = definition.isSource; - const {liveData} = useAssetLiveData(definition.assetKey); return ( @@ -45,7 +43,7 @@ export const AssetNode = React.memo(({definition, selected, computeKindTagsFilte /> - + {definition.description ? ( @@ -55,7 +53,7 @@ export const AssetNode = React.memo(({definition, selected, computeKindTagsFilte ) : ( No description )} - {definition.isPartitioned && !definition.isSource && ( + {definition.isPartitioned && definition.isMaterializable && ( )} @@ -81,13 +79,13 @@ export const AssetNameRow = ({definition}: {definition: AssetNodeFragment}) => { const displayName = definition.assetKey.path[definition.assetKey.path.length - 1]!; return ( - + - +
{withMiddleTruncation(displayName, { @@ -191,7 +189,7 @@ export const AssetNodeMinimal = ({ definition: AssetNodeFragment; height: number; }) => { - const {isSource, assetKey} = definition; + const {isMaterializable, assetKey} = definition; const {liveData} = useAssetLiveData(assetKey); const {border, background} = buildAssetNodeStatusContent({assetKey, definition, liveData}); @@ -214,7 +212,7 @@ export const AssetNodeMinimal = ({ > ) : null} {isStale ? : null} - + {withMiddleTruncation(displayName, {maxLength: 18})} @@ -254,7 +252,7 @@ export const ASSET_NODE_FRAGMENT = gql` computeKind isPartitioned isObservable - isSource + isMaterializable assetKey { ...AssetNodeKey } @@ -290,12 +288,12 @@ const AssetNodeShowOnHover = styled.span` `; export const AssetNodeBox = styled.div<{ - $isSource: boolean; + $isMaterializable: boolean; $selected: boolean; $noScale?: boolean; }>` ${(p) => - p.$isSource + !p.$isMaterializable ? `border: 2px dashed ${p.$selected ? Colors.accentGrayHover() : Colors.accentGray()}` : `border: 2px solid ${ p.$selected ? Colors.lineageNodeBorderSelected() : Colors.lineageNodeBorder() @@ -343,11 +341,12 @@ const NameTooltipStyleSource = JSON.stringify({ border: `none`, }); -const AssetName = styled.div<{$isSource: boolean}>` +const AssetName = styled.div<{$isMaterializable: boolean}>` ${NameCSS}; display: flex; gap: 4px; - background: ${(p) => (p.$isSource ? Colors.backgroundLight() : Colors.lineageNodeBackground())}; + background: ${(p) => + p.$isMaterializable ? Colors.lineageNodeBackground() : Colors.backgroundLight()}; border-top-left-radius: 8px; border-top-right-radius: 8px; `; @@ -357,7 +356,7 @@ const MinimalAssetNodeContainer = styled(AssetNodeContainer)` `; const MinimalAssetNodeBox = styled.div<{ - $isSource: boolean; + $isMaterializable: boolean; $selected: boolean; $background: string; $border: string; @@ -367,7 +366,7 @@ const MinimalAssetNodeBox = styled.div<{ background: ${(p) => p.$background}; overflow: hidden; ${(p) => - p.$isSource + !p.$isMaterializable ? `border: 4px dashed ${p.$selected ? Colors.accentGray() : p.$border}` : `border: 4px solid ${p.$selected ? Colors.lineageNodeBorderSelected() : p.$border}`}; ${(p) => diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeMenu.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeMenu.tsx index 4d4445a6245d9..7cb644cbc6258 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeMenu.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeMenu.tsx @@ -20,7 +20,7 @@ export type AssetNodeMenuNode = { id: string; assetKey: AssetKeyInput; definition: { - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; hasMaterializePermission: boolean; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeStatusContent.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeStatusContent.tsx index 03360b9528056..e20898fc6d695 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeStatusContent.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/AssetNodeStatusContent.tsx @@ -51,7 +51,7 @@ const LOADING_STATUS_CONTENT = { export type StatusContentArgs = { assetKey: AssetKeyInput; - definition: {opNames: string[]; isSource: boolean; isObservable: boolean}; + definition: {opNames: string[]; isMaterializable: boolean; isObservable: boolean}; liveData: LiveDataForNode | null | undefined; expanded?: boolean; }; @@ -400,7 +400,7 @@ export function _buildAssetNodeStatusContent({ }; } - if (!lastMaterialization && definition.isSource) { + if (!lastMaterialization && !definition.isMaterializable) { return { case: StatusCase.SOURCE_NO_STATE as const, background: Colors.backgroundLight(), diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx index 6aa677d75f06c..cdb6002e5e63f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/SidebarAssetInfo.tsx @@ -189,7 +189,7 @@ export const SidebarAssetInfo = ({graphNode}: {graphNode: GraphNode}) => { {assetType && } - {asset.partitionDefinition && !definition.isSource && ( + {asset.partitionDefinition && definition.isMaterializable && (

{asset.partitionDefinition.description}

diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__fixtures__/AssetNode.fixtures.ts b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__fixtures__/AssetNode.fixtures.ts index 52ebc0a9ccd38..4d64bc0705c47 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__fixtures__/AssetNode.fixtures.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__fixtures__/AssetNode.fixtures.ts @@ -61,7 +61,7 @@ export const AssetNodeFragmentBasic: AssetNodeFragment = buildAssetNode({ id: '["asset1"]', isObservable: false, isPartitioned: false, - isSource: false, + isMaterializable: true, jobNames: ['job1'], opNames: ['asset1'], opVersion: '1', @@ -82,13 +82,13 @@ export const AssetNodeFragmentSource = buildAssetNode({ description: 'This is a test source asset', id: '["source_asset"]', isObservable: true, - isSource: true, + isMaterializable: false, jobNames: [], opNames: [], }); export const AssetNodeFragmentSourceOverdue = buildAssetNode({ - isSource: true, + isMaterializable: false, isObservable: false, freshnessInfo: buildAssetFreshnessInfo({ currentMinutesLate: 12, diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx index 2c2113b4652b6..2e088346ccf29 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/__stories__/SidebarAssetInfo.stories.tsx @@ -53,7 +53,7 @@ const buildGraphNodeMock = (definitionOverrides: Partial): GraphNode graphName: null, isPartitioned: false, isObservable: false, - isSource: false, + isMaterializable: true, ...definitionOverrides, }), }); @@ -329,7 +329,9 @@ export const AssetWithDifferentOpName = () => { export const ObservableSourceAsset = () => { return ( - + ); }; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/layout.ts b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/layout.ts index 5a79f3010d8be..7dc54f2c88b8e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/layout.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/layout.ts @@ -343,7 +343,7 @@ export const ASSET_NODE_NAME_MAX_LENGTH = 38; export const getAssetNodeDimensions = (def: { assetKey: {path: string[]}; opNames: string[]; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isPartitioned: boolean; graphName: string | null; @@ -355,7 +355,7 @@ export const getAssetNodeDimensions = (def: { let height = 106; // top tags area + name + description - if (def.isSource && def.isObservable) { + if (!def.isMaterializable && def.isObservable) { height += 30; // status row } else { height += 28; // status row diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/AssetNode.types.ts b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/AssetNode.types.ts index 653f5f70aee4d..d068cf77d286d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/AssetNode.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/AssetNode.types.ts @@ -15,7 +15,7 @@ export type AssetNodeFragment = { computeKind: string | null; isPartitioned: boolean; isObservable: boolean; - isSource: boolean; + isMaterializable: boolean; assetKey: {__typename: 'AssetKey'; path: Array}; tags: Array<{__typename: 'DefinitionTag'; key: string; value: string}>; }; diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/useAssetGraphData.types.ts b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/useAssetGraphData.types.ts index eea8c24acc933..39ce22fc1d9f7 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/useAssetGraphData.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/useAssetGraphData.types.ts @@ -24,7 +24,7 @@ export type AssetGraphQuery = { computeKind: string | null; isPartitioned: boolean; isObservable: boolean; - isSource: boolean; + isMaterializable: boolean; tags: Array<{__typename: 'DefinitionTag'; key: string; value: string}>; owners: Array< {__typename: 'TeamAssetOwner'; team: string} | {__typename: 'UserAssetOwner'; email: string} @@ -56,7 +56,7 @@ export type AssetNodeForGraphQueryFragment = { computeKind: string | null; isPartitioned: boolean; isObservable: boolean; - isSource: boolean; + isMaterializable: boolean; tags: Array<{__typename: 'DefinitionTag'; key: string; value: string}>; owners: Array< {__typename: 'TeamAssetOwner'; team: string} | {__typename: 'UserAssetOwner'; email: string} diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/util.ts b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/util.ts index 973c758989613..d333853639f4e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/util.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/util.ts @@ -6,7 +6,7 @@ import {AssetKeyInput} from '../graphql/types'; export function groupAssetsByStatus< T extends { key: AssetKeyInput; - definition?: {opNames: string[]; isSource: boolean; isObservable: boolean} | null; + definition?: {opNames: string[]; isMaterializable: boolean; isObservable: boolean} | null; }, >(assets: T[], liveDataByNode: Record) { type StatusesType = { diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetEvents.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetEvents.tsx index 515395d4bc575..c9ea9466c0b7c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetEvents.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetEvents.tsx @@ -75,10 +75,10 @@ export const AssetEvents = ({ (json) => ({types: json?.types || ALL_EVENT_TYPES}), ); - // Source assets never have materializations, so we don't want to show the type filter - const hideFilters = assetNode?.isSource; - // Source assets never have a partitions tab, so we shouldn't allow links to it - const hidePartitionLinks = assetNode?.isSource; + // No need to show the type filter for assets without materializations + const hideFilters = !assetNode?.isMaterializable; + // Non-materializable assets never have a partitions tab, so we shouldn't allow links to it + const hidePartitionLinks = !assetNode?.isMaterializable; const grouped = useGroupedEvents( xAxis, 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 db373170fe35a..a89ae10dc99b6 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 @@ -296,9 +296,7 @@ const DescriptionAnnotations = ({ ))} - {assetNode.isSource ? ( - Source Asset - ) : !assetNode.isExecutable ? ( + {!assetNode.isMaterializable ? ( External Asset ) : undefined}
@@ -313,7 +311,7 @@ export const ASSET_NODE_DEFINITION_FRAGMENT = gql` opNames opVersion jobNames - isSource + isMaterializable isExecutable tags { key diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx index 25159c91d6053..d40a626b00151 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTableFragment.tsx @@ -6,7 +6,7 @@ export const ASSET_TABLE_DEFINITION_FRAGMENT = gql` changedReasons groupName opNames - isSource + isMaterializable isObservable isExecutable computeKind diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTabs.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTabs.tsx index c7e2ec99d3d44..f7ee57be759a8 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTabs.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetTabs.tsx @@ -65,7 +65,7 @@ export const buildAssetTabMap = (input: AssetTabConfigInput) => { id: 'partitions', title: 'Partitions', to: buildAssetViewParams({...params, view: 'partitions'}), - hidden: !definition?.partitionDefinition || definition?.isSource, + hidden: !definition?.partitionDefinition || !definition?.isMaterializable, } as AssetTabConfig, checks: { id: 'checks', diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx index 14e5a16d6c1f6..56971a7256ea0 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetView.tsx @@ -177,7 +177,7 @@ export const AssetView = ({ }; const renderPartitionsTab = () => { - if (definition?.isSource) { + if (!definition?.isMaterializable) { return ; } @@ -567,11 +567,7 @@ const AssetViewPageHeaderTags = ({ /> ) : null} - {definition?.isSource ? ( - Source Asset - ) : !definition?.isExecutable ? ( - External Asset - ) : undefined} + {!definition?.isMaterializable ? External Asset : undefined} ); }; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx index bce49375af09f..4d3af7d758f4f 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/CalculateUnsyncedDialog.tsx @@ -55,7 +55,7 @@ export const CalculateUnsyncedDialog = React.memo( const unsynced = React.useMemo( () => (data?.assetNodes || []) - .filter((node) => !node.isSource && (isAssetStale(node) || isAssetMissing(node))) + .filter((node) => node.isMaterializable && (isAssetStale(node) || isAssetMissing(node))) .map(asAssetKeyInput), [data], ); @@ -208,7 +208,7 @@ const ASSET_STALE_STATUS_QUERY = gql` assetKey { path } - isSource + isMaterializable staleStatus partitionStats { numMaterialized diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx index 6330d8f7455b3..1a0c043276cfb 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetChoosePartitionsDialog.tsx @@ -706,7 +706,7 @@ export const LAUNCH_ASSET_WARNINGS_QUERY = gql` query LaunchAssetWarningsQuery($upstreamAssetKeys: [AssetKeyInput!]!) { assetNodes(assetKeys: $upstreamAssetKeys) { id - isSource + isMaterializable assetKey { path } @@ -755,7 +755,7 @@ const Warnings = ({ (upstreamAssets || []) .filter( (a) => - !a.isSource && + a.isMaterializable && a.partitionDefinition && displayedPartitionDefinition && partitionDefinitionsEqual(a.partitionDefinition, displayedPartitionDefinition), 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 b4bc99ac8052d..61b1b7f351dd3 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 @@ -655,7 +655,7 @@ async function upstreamAssetsWithNoMaterializations( }); return result.data.assetNodes - .filter((a) => !a.isSource && a.assetMaterializations.length === 0) + .filter((a) => a.isMaterializable && a.assetMaterializations.length === 0) .map((a) => a.assetKey); } @@ -789,7 +789,7 @@ const LAUNCH_ASSET_EXECUTION_ASSET_NODE_FRAGMENT = gql` } isObservable isExecutable - isSource + isMaterializable assetKey { path } @@ -936,7 +936,7 @@ export const LAUNCH_ASSET_CHECK_UPSTREAM_QUERY = gql` assetKey { path } - isSource + isMaterializable opNames graphName assetMaterializations(limit: 1) { diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx index 3c5a638771000..3ec9b3ab6a633 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/LaunchAssetObservationButton.tsx @@ -144,17 +144,10 @@ async function stateForObservingAssets( _forceLaunchpad: boolean, preferredJobName?: string, ): Promise { - if (assets.some((x) => !x.isSource)) { - return { - type: 'error', - error: 'One or more non-source assets are selected and cannot be observed.', - }; - } - if (assets.some((x) => !x.isObservable)) { return { type: 'error', - error: 'One or more of the selected source assets is not an observable asset.', + error: 'One or more of the selected assets is not an observable asset.', }; } const repoAddress = buildRepoAddress( diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/AssetViewDefinition.fixtures.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/AssetViewDefinition.fixtures.ts index e1e76ac2e58d9..7e2448a7584e1 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/AssetViewDefinition.fixtures.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/AssetViewDefinition.fixtures.ts @@ -84,7 +84,7 @@ export const AssetViewDefinitionSourceAsset = buildQueryMock< isPartitioned: false, isObservable: true, isExecutable: true, - isSource: true, + isMaterializable: false, metadataEntries: [], type: null, requiredResources: [buildResourceRequirement({resourceKey: 'foo'})], @@ -137,7 +137,7 @@ export const AssetViewDefinitionSDA = buildQueryMock< isPartitioned: false, isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, metadataEntries: [], type: null, requiredResources: [buildResourceRequirement({resourceKey: 'foo'})], diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetExecutionButton.fixtures.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetExecutionButton.fixtures.ts index e34bdf4d278a1..52516f437bc3d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetExecutionButton.fixtures.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetExecutionButton.fixtures.ts @@ -102,7 +102,7 @@ export const UNPARTITIONED_ASSET = buildAssetNode({ isPartitioned: false, isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({path: ['unpartitioned_asset']}), requiredResources: [], configField: BASE_CONFIG_TYPE_FIELD, @@ -131,7 +131,7 @@ export const CHECKED_ASSET = buildAssetNode({ export const UNPARTITIONED_SOURCE_ASSET = buildAssetNode({ ...UNPARTITIONED_ASSET, id: 'test.py.repo.["unpartitioned_source_asset"]', - isSource: true, + isMaterializable: false, isObservable: true, assetKey: buildAssetKey({path: ['unpartitioned_source_asset']}), }); @@ -197,7 +197,7 @@ export const ASSET_DAILY = buildAssetNode({ isPartitioned: true, isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({path: ['asset_daily']}), requiredResources: [], configField: BASE_CONFIG_TYPE_FIELD, @@ -231,7 +231,7 @@ export const ASSET_WEEKLY = buildAssetNode({ isPartitioned: true, isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({path: ['asset_weekly']}), requiredResources: [], configField: BASE_CONFIG_TYPE_FIELD, diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetLoaderQuery.fixtures.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetLoaderQuery.fixtures.tsx index e89623556bdbb..00b6aecf8a6fa 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetLoaderQuery.fixtures.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/__fixtures__/LaunchAssetLoaderQuery.fixtures.tsx @@ -35,7 +35,7 @@ export const assetNodes: AssetNode[] = [ }), isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({ path: ['release_files'], }), @@ -84,7 +84,7 @@ export const assetNodes: AssetNode[] = [ }), isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({ path: ['release_files_metadata'], }), @@ -133,7 +133,7 @@ export const assetNodes: AssetNode[] = [ }), isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({ path: ['release_zips'], }), @@ -182,7 +182,7 @@ export const assetNodes: AssetNode[] = [ }), isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({ path: ['releases_metadata'], }), @@ -218,7 +218,7 @@ export const assetNodes: AssetNode[] = [ partitionDefinition: null, isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({ path: ['releases_summary'], }), diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/useAssetTabs.test.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/useAssetTabs.test.tsx index d07ed6d2d19f2..86c2fb9a47bdc 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/useAssetTabs.test.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/__tests__/useAssetTabs.test.tsx @@ -59,7 +59,7 @@ describe('buildAssetTabs', () => { isPartitioned: true, isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({ path: ['eager_downstream_3_partitioned'], }), @@ -150,7 +150,7 @@ describe('buildAssetTabs', () => { isPartitioned: false, isObservable: false, isExecutable: true, - isSource: false, + isMaterializable: true, assetKey: buildAssetKey({ path: ['lazy_downstream_1'], }), diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetNodeDefinition.types.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetNodeDefinition.types.ts index c5dc6994e3c10..ff88269a3661d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetNodeDefinition.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetNodeDefinition.types.ts @@ -11,7 +11,7 @@ export type AssetNodeDefinitionFragment = { opNames: Array; opVersion: string | null; jobNames: Array; - isSource: boolean; + isMaterializable: boolean; isExecutable: boolean; hasMaterializePermission: boolean; changedReasons: Array; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetTableFragment.types.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetTableFragment.types.ts index 79a2832e57c10..a761450e07853 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetTableFragment.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetTableFragment.types.ts @@ -8,7 +8,7 @@ export type AssetTableDefinitionFragment = { changedReasons: Array; groupName: string; opNames: Array; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; computeKind: string | null; @@ -37,7 +37,7 @@ export type AssetTableFragment = { changedReasons: Array; groupName: string; opNames: Array; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; computeKind: string | null; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetView.types.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetView.types.ts index 02b6bfd800a74..d74dd6f1500a9 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetView.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetView.types.ts @@ -27,7 +27,7 @@ export type AssetViewDefinitionQuery = { opNames: Array; opVersion: string | null; jobNames: Array; - isSource: boolean; + isMaterializable: boolean; isExecutable: boolean; hasMaterializePermission: boolean; changedReasons: Array; @@ -16298,7 +16298,7 @@ export type AssetViewDefinitionNodeFragment = { opNames: Array; opVersion: string | null; jobNames: Array; - isSource: boolean; + isMaterializable: boolean; isExecutable: boolean; hasMaterializePermission: boolean; changedReasons: Array; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetsCatalogTable.types.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetsCatalogTable.types.ts index bfdf8aa6c88b3..859d8ad1a19c5 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetsCatalogTable.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/types/AssetsCatalogTable.types.ts @@ -22,7 +22,7 @@ export type AssetCatalogTableQuery = { changedReasons: Array; groupName: string; opNames: Array; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; computeKind: string | null; @@ -67,7 +67,7 @@ export type AssetCatalogGroupTableQuery = { changedReasons: Array; groupName: string; opNames: Array; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; computeKind: string | null; @@ -94,7 +94,7 @@ export type AssetCatalogGroupTableNodeFragment = { changedReasons: Array; groupName: string; opNames: Array; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; computeKind: string | null; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/types/CalculateUnsyncedDialog.types.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/types/CalculateUnsyncedDialog.types.ts index 4529a490a1471..5546f1f8ce7b6 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/types/CalculateUnsyncedDialog.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/types/CalculateUnsyncedDialog.types.ts @@ -11,7 +11,7 @@ export type AssetStaleStatusQuery = { assetNodes: Array<{ __typename: 'AssetNode'; id: string; - isSource: boolean; + isMaterializable: boolean; staleStatus: Types.StaleStatus | null; assetKey: {__typename: 'AssetKey'; path: Array}; partitionStats: { diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetChoosePartitionsDialog.types.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetChoosePartitionsDialog.types.ts index 82ef10da16113..0af017ae87b1c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetChoosePartitionsDialog.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetChoosePartitionsDialog.types.ts @@ -11,7 +11,7 @@ export type LaunchAssetWarningsQuery = { assetNodes: Array<{ __typename: 'AssetNode'; id: string; - isSource: boolean; + isMaterializable: boolean; assetKey: {__typename: 'AssetKey'; path: Array}; partitionDefinition: { __typename: 'PartitionDefinition'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetExecutionButton.types.ts b/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetExecutionButton.types.ts index 2688d7f23bdb5..5c19aa1207e4d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetExecutionButton.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/types/LaunchAssetExecutionButton.types.ts @@ -30,7 +30,7 @@ export type LaunchAssetExecutionAssetNodeFragment = { hasMaterializePermission: boolean; isObservable: boolean; isExecutable: boolean; - isSource: boolean; + isMaterializable: boolean; partitionDefinition: { __typename: 'PartitionDefinition'; description: string; @@ -639,7 +639,7 @@ export type LaunchAssetLoaderQuery = { hasMaterializePermission: boolean; isObservable: boolean; isExecutable: boolean; - isSource: boolean; + isMaterializable: boolean; partitionDefinition: { __typename: 'PartitionDefinition'; description: string; @@ -1264,7 +1264,7 @@ export type LaunchAssetLoaderJobQuery = { hasMaterializePermission: boolean; isObservable: boolean; isExecutable: boolean; - isSource: boolean; + isMaterializable: boolean; partitionDefinition: { __typename: 'PartitionDefinition'; description: string; @@ -2462,7 +2462,7 @@ export type LaunchAssetCheckUpstreamQuery = { assetNodes: Array<{ __typename: 'AssetNode'; id: string; - isSource: boolean; + isMaterializable: boolean; opNames: Array; graphName: string | null; assetKey: {__typename: 'AssetKey'; path: Array}; diff --git a/js_modules/dagster-ui/packages/ui-core/src/graphql/schema.graphql b/js_modules/dagster-ui/packages/ui-core/src/graphql/schema.graphql index e5853bd7d2e32..36ec593b58dcf 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/graphql/schema.graphql +++ b/js_modules/dagster-ui/packages/ui-core/src/graphql/schema.graphql @@ -665,8 +665,8 @@ type AssetNode { id: ID! isExecutable: Boolean! isObservable: Boolean! + isMaterializable: Boolean! isPartitioned: Boolean! - isSource: Boolean! jobNames: [String!]! jobs: [Pipeline!]! latestMaterializationByPartition(partitions: [String!]): [MaterializationEvent]! diff --git a/js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts b/js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts index 067ab764caa1c..e36578d998892 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/graphql/types.ts @@ -442,9 +442,9 @@ export type AssetNode = { hasMaterializePermission: Scalars['Boolean']['output']; id: Scalars['ID']['output']; isExecutable: Scalars['Boolean']['output']; + isMaterializable: Scalars['Boolean']['output']; isObservable: Scalars['Boolean']['output']; isPartitioned: Scalars['Boolean']['output']; - isSource: Scalars['Boolean']['output']; jobNames: Array; jobs: Array; latestMaterializationByPartition: Array>; @@ -6478,11 +6478,14 @@ export const buildAssetNode = ( : '006fc1b6-3c6e-432d-ac6a-c1c16c0c05b9', isExecutable: overrides && overrides.hasOwnProperty('isExecutable') ? overrides.isExecutable! : false, + isMaterializable: + overrides && overrides.hasOwnProperty('isMaterializable') + ? overrides.isMaterializable! + : true, isObservable: overrides && overrides.hasOwnProperty('isObservable') ? overrides.isObservable! : false, isPartitioned: overrides && overrides.hasOwnProperty('isPartitioned') ? overrides.isPartitioned! : true, - isSource: overrides && overrides.hasOwnProperty('isSource') ? overrides.isSource! : false, jobNames: overrides && overrides.hasOwnProperty('jobNames') ? overrides.jobNames! : [], jobs: overrides && overrides.hasOwnProperty('jobs') ? overrides.jobs! : [], latestMaterializationByPartition: diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx index e0c1df108b34f..821e226f8156e 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/VirtualizedAssetRow.tsx @@ -170,7 +170,7 @@ export const VirtualizedAssetRow = (props: AssetRowProps) => { ) : null} - {definition?.partitionDefinition && !definition?.isSource ? ( + {definition?.partitionDefinition && definition?.isMaterializable ? ( {partitionCountString(liveData?.partitionStats?.numPartitions)} diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/types/VirtualizedRepoAssetTable.types.ts b/js_modules/dagster-ui/packages/ui-core/src/workspace/types/VirtualizedRepoAssetTable.types.ts index 1f22cb1605776..a5cfbe3997037 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/types/VirtualizedRepoAssetTable.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/types/VirtualizedRepoAssetTable.types.ts @@ -8,7 +8,7 @@ export type RepoAssetTableFragment = { groupName: string; changedReasons: Array; opNames: Array; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; computeKind: string | null; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsRoot.types.ts b/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsRoot.types.ts index 112ce6c29aa3c..363b99fe8efad 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsRoot.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsRoot.types.ts @@ -29,7 +29,7 @@ export type WorkspaceAssetsQuery = { groupName: string; changedReasons: Array; opNames: Array; - isSource: boolean; + isMaterializable: boolean; isObservable: boolean; isExecutable: boolean; computeKind: string | null; diff --git a/python_modules/dagster-graphql/dagster_graphql/schema/asset_graph.py b/python_modules/dagster-graphql/dagster_graphql/schema/asset_graph.py index b2e568a6b184e..6da8df4ad58d8 100644 --- a/python_modules/dagster-graphql/dagster_graphql/schema/asset_graph.py +++ b/python_modules/dagster-graphql/dagster_graphql/schema/asset_graph.py @@ -284,8 +284,8 @@ class GrapheneAssetNode(graphene.ObjectType): id = graphene.NonNull(graphene.ID) isExecutable = graphene.NonNull(graphene.Boolean) isObservable = graphene.NonNull(graphene.Boolean) + isMaterializable = graphene.NonNull(graphene.Boolean) isPartitioned = graphene.NonNull(graphene.Boolean) - isSource = graphene.NonNull(graphene.Boolean) jobNames = non_null_list(graphene.String) jobs = non_null_list(GraphenePipeline) latestMaterializationByPartition = graphene.Field( @@ -546,8 +546,9 @@ def get_required_resource_keys_rec( def is_graph_backed_asset(self) -> bool: return self.graphName is not None - def is_source_asset(self) -> bool: - return self._external_asset_node.is_source + @property + def is_executable(self) -> bool: + return self._external_asset_node.is_executable def resolve_hasMaterializePermission( self, @@ -685,7 +686,7 @@ def resolve_assetObservations( ] def resolve_configField(self, _graphene_info: ResolveInfo) -> Optional[GrapheneConfigTypeField]: - if self.is_source_asset(): + if self.is_executable: return None external_pipeline = self.get_external_job() node_def_snap = self.get_node_definition_snap() @@ -1028,12 +1029,12 @@ def resolve_jobs(self, _graphene_info: ResolveInfo) -> Sequence[GraphenePipeline if self._external_repository.has_external_job(job_name) ] - def resolve_isSource(self, _graphene_info: ResolveInfo) -> bool: - return self.is_source_asset() - def resolve_isPartitioned(self, _graphene_info: ResolveInfo) -> bool: return self._external_asset_node.partitions_def_data is not None + def resolve_isMaterializable(self, _graphene_info: ResolveInfo) -> bool: + return self._external_asset_node.is_materializable + def resolve_isObservable(self, _graphene_info: ResolveInfo) -> bool: return self._external_asset_node.is_observable @@ -1213,7 +1214,7 @@ def resolve_tags(self, _graphene_info: ResolveInfo) -> Sequence[GrapheneDefiniti def resolve_op( self, _graphene_info: ResolveInfo ) -> Optional[Union[GrapheneSolidDefinition, GrapheneCompositeSolidDefinition]]: - if self.is_source_asset(): + if not self.is_executable: return None external_pipeline = self.get_external_job() node_def_snap = self.get_node_definition_snap() @@ -1292,7 +1293,7 @@ def resolve_repository(self, graphene_info: ResolveInfo) -> "GrapheneRepository" def resolve_required_resources( self, _graphene_info: ResolveInfo ) -> Sequence[GrapheneResourceRequirement]: - if self.is_source_asset(): + if not self.is_executable: return [] node_def_snap = self.get_node_definition_snap() all_unique_keys = self.get_required_resource_keys(node_def_snap) @@ -1305,7 +1306,7 @@ def resolve_type( "GrapheneListDagsterType", "GrapheneNullableDagsterType", "GrapheneRegularDagsterType" ] ]: - if self.is_source_asset(): + if not self._external_asset_node.is_materializable: return None external_pipeline = self.get_external_job() output_name = self.external_asset_node.output_name