From 9eacecf5af5fc034936e6f103808d99fdb25aadc Mon Sep 17 00:00:00 2001 From: prha Date: Mon, 30 Dec 2024 15:51:09 -0800 Subject: [PATCH] UI references to pools --- .../dagster-ui/packages/ui-core/client.json | 18 ++++----- .../src/asset-graph/SidebarAssetInfo.tsx | 1 + .../types/SidebarAssetInfo.types.ts | 4 +- .../src/assets/AssetNodeDefinition.tsx | 1 + .../assets/AssetSidebarActivitySummary.tsx | 12 ++++++ .../ui-core/src/assets/AssetTableFragment.tsx | 1 + .../assets/overview/ComputeDetailsSection.tsx | 12 ++++++ .../assets/types/AssetNodeDefinition.types.ts | 1 + .../assets/types/AssetTableFragment.types.ts | 2 + .../src/assets/types/AssetView.types.ts | 4 +- .../assets/types/AssetsCatalogTable.types.ts | 7 +++- .../src/instance/InstanceConcurrency.tsx | 3 +- .../packages/ui-core/src/instance/PoolTag.tsx | 39 +++++++++++++++++++ .../types/InstanceConcurrency.types.ts | 4 +- .../src/ops/types/OpDetailsRoot.types.ts | 4 +- .../ui-core/src/pipelines/SidebarOp.tsx | 15 ++++++- .../src/pipelines/SidebarOpDefinition.tsx | 1 + .../src/pipelines/types/SidebarOp.types.ts | 18 ++++++++- .../types/SidebarOpDefinition.types.ts | 2 + .../types/WorkspaceAssetsQuery.types.ts | 4 +- 20 files changed, 133 insertions(+), 20 deletions(-) create mode 100644 js_modules/dagster-ui/packages/ui-core/src/instance/PoolTag.tsx diff --git a/js_modules/dagster-ui/packages/ui-core/client.json b/js_modules/dagster-ui/packages/ui-core/client.json index 0f117f0460896..6b1d0cd7a9516 100644 --- a/js_modules/dagster-ui/packages/ui-core/client.json +++ b/js_modules/dagster-ui/packages/ui-core/client.json @@ -5,7 +5,7 @@ "AssetStaleStatusDataQuery": "0168440bb72ae79664e8ba33f41a85f99398d0838b0baaa611b16a4dbb15b004", "AssetGraphSidebarQuery": "dec086c5cc4b9fb1ab796679125eb4b628b8f60510e23293a401e70d4b69cca2", "AssetLiveRunLogsSubscription": "4b78f566975bdd949f6d1fde8de10b6db89a2db3fe678cc5033fedfc16f0ba12", - "SidebarAssetQuery": "93a3d84b13e1be3e32ea74d05e8d77b37e4bab1dd09573f2c2765cf50d9096e2", + "SidebarAssetQuery": "5f38c406efbfe5b009416f7f9605072a820228ab893cb774af310f8f162827ae", "AssetGraphQuery": "26030b5c565bdc4d84b54b2c9a7e8172562cf7434912511768bde20875d47b44", "AssetForNavigationQuery": "eb695ab88044ddd7068ea0dc1e2482eaba1fcb11b83de11050ff52f55e83ed3d", "AssetDefinitionCollisionQuery": "84027ea05480797a69eb150ce07ac7dfd40d6007a8107f90a6c558cf3a2662f5", @@ -13,9 +13,9 @@ "AssetMaterializationUpstreamQuery": "754bab88738acc8d310c71f577ac3cf06dc57950bb1f98a18844e6e00bae756d", "AssetPartitionDetailQuery": "7f951ecf11bbeaa37e3444caf175a92feae9cb16dfd09bb8ad46f600f3a7711c", "AssetPartitionStaleQuery": "4215f4014e9d7592142e1775c4b07377703e913389396f9ca14dc6bb779ce764", - "AssetViewDefinitionQuery": "50f492ac4a6ea268a3e8c2a54c80ad63cee4aa97a56da4c7659d0200746abe1a", - "AssetCatalogTableQuery": "1da21265e44d573112f150f5c1f396225d357a2b8132591a54bd7ee154805beb", - "AssetCatalogGroupTableQuery": "54f21240839f4b212b7bc911bb27aa7bfff72ea726b45256db9cd9cb8f3d4368", + "AssetViewDefinitionQuery": "dcda9d955aedec1cd9640f349171a2e9f60934af69f5ea3a5362326757269b45", + "AssetCatalogTableQuery": "5422b3da3382bc9ac3122990d11110bc63f8b27b4389e4411b95b0bb131f987b", + "AssetCatalogGroupTableQuery": "77c8aa916469e8e1af76ae8d31d8feb512b743e2996180111368e0e5fe17cc90", "AssetsOverviewRootQuery": "77ab0417c979b92c9ec01cd76a0f49b59f5b8ce7af775cab7e9b3e57b7871f7d", "RunStatusAndPartitionKey": "4642abda7da52fb70cc0a47c19cd5bf2fd8b854bb104b6a73eb8545fcd0146b2", "RunStatusOnlyQuery": "e0000c8f2600dbe29f305febb04cca005e08da6a7ce03ec20476c59d607495c0", @@ -56,7 +56,7 @@ "SetConcurrencyLimit": "758e6bfdb936dff3e4e38f8e1fb447548710a2b2c66fbcad9d4f264a10a61044", "DeleteConcurrencyLimit": "03397142bc71bc17649f43dd17aabf4ea771436ebc4ee1cb40eff2c2848d7b4d", "FreeConcurrencySlots": "7363c435dba06ed2a4be96e1d9bf1f1f8d9c90533b80ff42896fe9d50879d60e", - "ConcurrencyKeyDetailsQuery": "52af385169eb4399ef46e98eb206f911c7fd1562c3a86a971ef038a32a7ff12e", + "ConcurrencyKeyDetailsQuery": "1ef7d2f0933f52851ef7259c8d607601f4f4f7aac57d8af66da717362f8cb28f", "RunsForConcurrencyKeyQuery": "35ebd16622a13c6aaa35577c7694bf8ffdeb16921b46c6040a407bb3095eaf75", "InstanceConfigQuery": "bcc75f020d292abb1e2d27cf924ec84a3c1a48f7f24a216e5ec0ed2864becc7a", "InstanceHealthQuery": "287f4e065bba5aba76b6c1e1a58f0f929c0b37e0065b75d5e5fd8a5bc69617b9", @@ -95,7 +95,7 @@ "RepositoryLocationStatusQuery": "7129557ca993e0638a147e30c6fe3bdff04a929d4e6775c3e4e5dc9fa3c88d94", "ReloadWorkspaceMutation": "763808cb236e2d60a426cd891a4f60efd6851a755345d4a3ef019549f35e0a5e", "ReloadRepositoryLocationMutation": "19f0c7c1764ac7327424133d498295b6417cb00ef06d88f30a458a7d33926e26", - "UsedSolidDetailsQuery": "075b7d054775a58ed6aff12a1a912cf17ec6f40b722a97344db0c51507579c95", + "UsedSolidDetailsQuery": "9f501125e94979298e2b290f5c8dac2fd8aa0e0d4a5d9f6dfde007186a707665", "OpsRootQuery": "a8ce0cedc4ebcc5ed0007d8795360ce5635ceefe1882802f88162b457f2058a4", "OverviewResourcesQuery": "38594d66ef4f0161f6cd670cb369ce161f1f4a2b012080af70fb446f600b8cf0", "OverviewSchedulesQuery": "04a2e4a6537d8d9de9aecfb08bb82bebf73767cf1858b3eddd0c063779129c39", @@ -110,8 +110,8 @@ "PartitionStepLoaderQuery": "c81bb54e0d99fe562bdeab9ae126f737c827cb034601c62cd7a6962ac93a9e48", "PipelineExplorerRootQuery": "983c2ad55930c1f8f2333af0de694a7172105cf5ba60ccd10a1226bf17173232", "PipelineRunsRootQuery": "3ed2a4c2669f29ed627eb12c6d95beb7d7c6d87a4914938ff83da8f174c61695", - "SidebarPipelineOpQuery": "e7c81b4abaefc0eeea9128b4e39c74a1c68d7b28f154ac5ad9cd2d5182d48d5f", - "SidebarGraphOpQuery": "c53856856bea89e1eb944ab02f6e175a8dbccc99ee4c8600f0df96e05535be89", + "SidebarPipelineOpQuery": "f2f757259ed45d1f13782138866817a5d8e6dd27e4e64253940a72cb60a345f4", + "SidebarGraphOpQuery": "d990aa216ec9ca839d65d14e400e00b57acdebfd96399b4daada499381296d34", "SidebarOpGraphsQuery": "3feca8de1ac2e1f479a0a6b88b76e731da4162cb717f7174e5f232527cc6ce52", "ResourceRootQuery": "43f17e6a448c083d86843c38edbae83098853097a8a7a5f3ef3a3238e3880bff", "WorkspaceResourcesQuery": "c5f1870a354eb3cf1a94291c56f4477d3462fcece7145bd372b07ef1563f7bd6", @@ -177,7 +177,7 @@ "SingleJobQuery": "5ff8f070e59507f5369f1a19abb9a72cfa12439ab04a08dc340866885f6e4702", "SingleScheduleQuery": "508a47e32ce04ba5be52c66cd592b74147bf98ec85b9f5d0e4db45172bd9a897", "SingleSensorQuery": "dbda5ba47d4ba10f8c527c9a7cd45fba0811276441a17a8ac6f173ed588f025b", - "WorkspaceAssetsQuery": "53e4bb05e5c1194cc83e0910cfe7c482d75344c10eabf184be26da29d771c236", + "WorkspaceAssetsQuery": "cc333781b40b421b35810070c5a7171e99bb43896380d462775939a32a70f045", "LocationWorkspaceQuery": "72685489c28204d48c39ed5d85231756f5637febc8b19e0a0b4967a2d982191e", "CodeLocationStatusQuery": "f92885e073b8b4b9bd588bf248df7b06025e2a1f6e74c082233ac7863f5eef8e", "WorkspaceGraphsQuery": "ccbef870f327b56beb0d781a476c8afbbc22ff2621181c8576861daaf7667ecf" 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 f4660a56a6dbc..077e5db70ce05 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 @@ -274,6 +274,7 @@ const SIDEBAR_ASSET_FRAGMENT = gql` backfillPolicy { description } + pools partitionDefinition { description } diff --git a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts index 9065d94d04411..14a110b0dc562 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/asset-graph/types/SidebarAssetInfo.types.ts @@ -6,6 +6,7 @@ export type SidebarAssetFragment = { __typename: 'AssetNode'; id: string; description: string | null; + pools: Array; opVersion: string | null; jobNames: Array; changedReasons: Array; @@ -16133,6 +16134,7 @@ export type SidebarAssetQuery = { __typename: 'AssetNode'; id: string; description: string | null; + pools: Array; opVersion: string | null; jobNames: Array; changedReasons: Array; @@ -32411,4 +32413,4 @@ export type SidebarAssetQuery = { | {__typename: 'AssetNotFoundError'}; }; -export const SidebarAssetQueryVersion = '93a3d84b13e1be3e32ea74d05e8d77b37e4bab1dd09573f2c2765cf50d9096e2'; +export const SidebarAssetQueryVersion = '5f38c406efbfe5b009416f7f9605072a820228ab893cb774af310f8f162827ae'; 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 cf3c0d18ad6e7..8db4fc66bb084 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 @@ -313,6 +313,7 @@ export const ASSET_NODE_DEFINITION_FRAGMENT = gql` jobNames isMaterializable isExecutable + pools tags { key value diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx index e1d043a79d578..f9829a7c49319 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/AssetSidebarActivitySummary.tsx @@ -15,6 +15,7 @@ import {useGroupedEvents} from './groupByPartition'; import {RecentAssetEvents} from './useRecentAssetEvents'; import {LiveDataForNodeWithStaleData} from '../asset-graph/Utils'; import {SidebarAssetFragment} from '../asset-graph/types/SidebarAssetInfo.types'; +import {PoolTag} from '../instance/PoolTag'; import {SidebarSection} from '../pipelines/SidebarComponents'; interface Props { @@ -42,6 +43,7 @@ export const AssetSidebarActivitySummary = ({ const grouped = useGroupedEvents(xAxis, materializations, observations, loadedPartitionKeys); const displayedEvent = isObservable ? observations[0] : materializations[0]; + const pools = asset.pools || []; useEffect(() => { refetch(); @@ -60,6 +62,16 @@ export const AssetSidebarActivitySummary = ({ )} + {pools.length ? ( + + + {pools.map((pool, idx) => ( + + ))} + + + ) : null} + {asset.freshnessPolicy && ( 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 0d14e18894d8d..a9af23525682a 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 @@ -40,6 +40,7 @@ export const ASSET_TABLE_DEFINITION_FRAGMENT = gql` key value } + pools jobNames kinds repository { diff --git a/js_modules/dagster-ui/packages/ui-core/src/assets/overview/ComputeDetailsSection.tsx b/js_modules/dagster-ui/packages/ui-core/src/assets/overview/ComputeDetailsSection.tsx index 8fe2ff1e87552..dc76f201d5241 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/assets/overview/ComputeDetailsSection.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/assets/overview/ComputeDetailsSection.tsx @@ -7,6 +7,7 @@ import {AttributeAndValue, SectionSkeleton} from './Common'; import {showCustomAlert} from '../../app/CustomAlertProvider'; import {COMMON_COLLATOR} from '../../app/Util'; import {DagsterTypeSummary} from '../../dagstertype/DagsterType'; +import {PoolTag} from '../../instance/PoolTag'; import {RepoAddress} from '../../workspace/types'; import {workspacePathFromAddress} from '../../workspace/workspacePath'; import {UnderlyingOpsOrGraph} from '../UnderlyingOpsOrGraph'; @@ -25,6 +26,7 @@ export const ComputeDetailsSection = ({ const {assetType} = metadataForAssetNode(assetNode); const configType = assetNode?.configField?.configType; const assetConfigSchema = configType && configType.key !== 'Any' ? configType : null; + const pools = assetNode.pools || []; return ( @@ -38,6 +40,16 @@ export const ComputeDetailsSection = ({ + 1 ? 'Pools' : 'Pool'}> + {pools.length > 0 ? ( + + {pools.map((pool, idx) => ( + + ))} + + ) : null} + + {assetNode.opVersion} 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 b8d1ccbaaed28..49596d312a77a 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 @@ -13,6 +13,7 @@ export type AssetNodeDefinitionFragment = { jobNames: Array; isMaterializable: boolean; isExecutable: boolean; + pools: Array; hasMaterializePermission: boolean; changedReasons: Array; computeKind: string | null; 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 f5722471eebe7..63c7d27c89511 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 @@ -16,6 +16,7 @@ export type AssetTableDefinitionFragment = { hasMaterializePermission: boolean; hasReportRunlessAssetEventPermission: boolean; description: string | null; + pools: Array; jobNames: Array; kinds: Array; assetKey: {__typename: 'AssetKey'; path: Array}; @@ -63,6 +64,7 @@ export type AssetTableFragment = { hasMaterializePermission: boolean; hasReportRunlessAssetEventPermission: boolean; description: string | null; + pools: Array; jobNames: Array; kinds: Array; assetKey: {__typename: 'AssetKey'; path: Array}; 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 964be66140980..1a74a7b3dfda2 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 @@ -30,6 +30,7 @@ export type AssetViewDefinitionQuery = { jobNames: Array; isMaterializable: boolean; isExecutable: boolean; + pools: Array; hasMaterializePermission: boolean; changedReasons: Array; computeKind: string | null; @@ -16414,6 +16415,7 @@ export type AssetViewDefinitionNodeFragment = { jobNames: Array; isMaterializable: boolean; isExecutable: boolean; + pools: Array; hasMaterializePermission: boolean; changedReasons: Array; computeKind: string | null; @@ -32572,4 +32574,4 @@ export type AssetViewDefinitionNodeFragment = { | null; }; -export const AssetViewDefinitionQueryVersion = '50f492ac4a6ea268a3e8c2a54c80ad63cee4aa97a56da4c7659d0200746abe1a'; +export const AssetViewDefinitionQueryVersion = 'dcda9d955aedec1cd9640f349171a2e9f60934af69f5ea3a5362326757269b45'; 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 6477b223de9f1..baa462b720116 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 @@ -31,6 +31,7 @@ export type AssetCatalogTableQuery = { hasMaterializePermission: boolean; hasReportRunlessAssetEventPermission: boolean; description: string | null; + pools: Array; jobNames: Array; kinds: Array; assetKey: {__typename: 'AssetKey'; path: Array}; @@ -94,6 +95,7 @@ export type AssetCatalogGroupTableQuery = { hasMaterializePermission: boolean; hasReportRunlessAssetEventPermission: boolean; description: string | null; + pools: Array; jobNames: Array; kinds: Array; assetKey: {__typename: 'AssetKey'; path: Array}; @@ -138,6 +140,7 @@ export type AssetCatalogGroupTableNodeFragment = { hasMaterializePermission: boolean; hasReportRunlessAssetEventPermission: boolean; description: string | null; + pools: Array; jobNames: Array; kinds: Array; assetKey: {__typename: 'AssetKey'; path: Array}; @@ -167,6 +170,6 @@ export type AssetCatalogGroupTableNodeFragment = { }; }; -export const AssetCatalogTableQueryVersion = '1da21265e44d573112f150f5c1f396225d357a2b8132591a54bd7ee154805beb'; +export const AssetCatalogTableQueryVersion = '5422b3da3382bc9ac3122990d11110bc63f8b27b4389e4411b95b0bb131f987b'; -export const AssetCatalogGroupTableQueryVersion = '54f21240839f4b212b7bc911bb27aa7bfff72ea726b45256db9cd9cb8f3d4368'; +export const AssetCatalogGroupTableQueryVersion = '77c8aa916469e8e1af76ae8d31d8feb512b743e2996180111368e0e5fe17cc90'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx index 3e72fa1ddc767..e8e0e20643899 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/InstanceConcurrency.tsx @@ -962,6 +962,7 @@ const CONCURRENCY_STEP_FRAGMENT = gql` const CONCURRENCY_LIMIT_FRAGMENT = gql` fragment ConcurrencyLimitFragment on ConcurrencyKeyInfo { concurrencyKey + configuredLimit slotCount claimedSlots { runId @@ -1019,7 +1020,7 @@ export const FREE_CONCURRENCY_SLOTS_MUTATION = gql` } `; -const CONCURRENCY_KEY_DETAILS_QUERY = gql` +export const CONCURRENCY_KEY_DETAILS_QUERY = gql` query ConcurrencyKeyDetailsQuery($concurrencyKey: String!) { instance { id diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/PoolTag.tsx b/js_modules/dagster-ui/packages/ui-core/src/instance/PoolTag.tsx new file mode 100644 index 0000000000000..079c5762bac17 --- /dev/null +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/PoolTag.tsx @@ -0,0 +1,39 @@ +import {Box, Icon, Tag, Tooltip} from '@dagster-io/ui-components'; +import {Link} from 'react-router-dom'; + +import {CONCURRENCY_KEY_DETAILS_QUERY} from './InstanceConcurrency'; +import {useQuery} from '../apollo-client'; +import { + ConcurrencyKeyDetailsQuery, + ConcurrencyKeyDetailsQueryVariables, +} from './types/InstanceConcurrency.types'; + +export const PoolTag = ({pool}: {pool: string}) => { + const path = `/deployment/concurrency/${pool}`; + const {data} = useQuery( + CONCURRENCY_KEY_DETAILS_QUERY, + { + variables: { + concurrencyKey: pool, + }, + }, + ); + + return ( + + + + {pool} + {data?.instance.concurrencyLimit && + data.instance.concurrencyLimit.configuredLimit === null ? ( + + + + ) : null} + + + ); +}; diff --git a/js_modules/dagster-ui/packages/ui-core/src/instance/types/InstanceConcurrency.types.ts b/js_modules/dagster-ui/packages/ui-core/src/instance/types/InstanceConcurrency.types.ts index e8512cc941309..d28f22136349c 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/instance/types/InstanceConcurrency.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/instance/types/InstanceConcurrency.types.ts @@ -14,6 +14,7 @@ export type ConcurrencyStepFragment = { export type ConcurrencyLimitFragment = { __typename: 'ConcurrencyKeyInfo'; concurrencyKey: string; + configuredLimit: number | null; slotCount: number; claimedSlots: Array<{__typename: 'ClaimedConcurrencySlot'; runId: string; stepKey: string}>; pendingSteps: Array<{ @@ -88,6 +89,7 @@ export type ConcurrencyKeyDetailsQuery = { concurrencyLimit: { __typename: 'ConcurrencyKeyInfo'; concurrencyKey: string; + configuredLimit: number | null; slotCount: number; claimedSlots: Array<{__typename: 'ClaimedConcurrencySlot'; runId: string; stepKey: string}>; pendingSteps: Array<{ @@ -126,7 +128,7 @@ export const DeleteConcurrencyLimitVersion = '03397142bc71bc17649f43dd17aabf4ea7 export const FreeConcurrencySlotsVersion = '7363c435dba06ed2a4be96e1d9bf1f1f8d9c90533b80ff42896fe9d50879d60e'; -export const ConcurrencyKeyDetailsQueryVersion = '52af385169eb4399ef46e98eb206f911c7fd1562c3a86a971ef038a32a7ff12e'; +export const ConcurrencyKeyDetailsQueryVersion = '1ef7d2f0933f52851ef7259c8d607601f4f4f7aac57d8af66da717362f8cb28f'; export const RunsForConcurrencyKeyQueryVersion = '35ebd16622a13c6aaa35577c7694bf8ffdeb16921b46c6040a407bb3095eaf75'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/ops/types/OpDetailsRoot.types.ts b/js_modules/dagster-ui/packages/ui-core/src/ops/types/OpDetailsRoot.types.ts index 23e11ac22335d..898c423028a15 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/ops/types/OpDetailsRoot.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/ops/types/OpDetailsRoot.types.ts @@ -22,6 +22,7 @@ export type UsedSolidDetailsQuery = { name: string; description: string | null; id: string; + pools: Array; metadata: Array<{__typename: 'MetadataItemDefinition'; key: string; value: string}>; inputDefinitions: Array<{ __typename: 'InputDefinition'; @@ -100,6 +101,7 @@ export type UsedSolidDetailsQuery = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; metadata: Array<{__typename: 'MetadataItemDefinition'; key: string; value: string}>; inputDefinitions: Array<{ __typename: 'InputDefinition'; @@ -721,4 +723,4 @@ export type UsedSolidDetailsQuery = { | {__typename: 'RepositoryNotFoundError'}; }; -export const UsedSolidDetailsQueryVersion = '075b7d054775a58ed6aff12a1a912cf17ec6f40b722a97344db0c51507579c95'; +export const UsedSolidDetailsQueryVersion = '9f501125e94979298e2b290f5c8dac2fd8aa0e0d4a5d9f6dfde007186a707665'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx index 2b78b21fe45de..57378fd949887 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/SidebarOp.tsx @@ -1,6 +1,7 @@ import {Box, Colors, NonIdealState} from '@dagster-io/ui-components'; import {ExplorerPath} from './PipelinePathUtils'; +import {SidebarSection} from './SidebarComponents'; import {SIDEBAR_OP_DEFINITION_FRAGMENT, SidebarOpDefinition} from './SidebarOpDefinition'; import {SidebarOpExecutionGraphs} from './SidebarOpExecutionGraphs'; import {SIDEBAR_OP_INVOCATION_FRAGMENT, SidebarOpInvocation} from './SidebarOpInvocation'; @@ -12,6 +13,7 @@ import { SidebarPipelineOpQuery, SidebarPipelineOpQueryVariables, } from './types/SidebarOp.types'; +import {PoolTag} from '../instance/PoolTag'; import {OpNameOrPath} from '../ops/OpNameOrPath'; import {LoadingSpinner} from '../ui/Loading'; import {RepoAddress} from '../workspace/types'; @@ -120,7 +122,7 @@ export const SidebarOp = ({ ); } - + const pools = solidContainer!.solidHandle!.solid.definition.pools; return ( <> + + {!!pools.length && ( + + + {pools.map((pool) => ( + + ))} + + + )} + {!isGraph && repoAddress && ( ; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -95,6 +96,7 @@ export type SidebarOpFragment_CompositeSolidDefinition = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{__typename: 'ResourceRequirement'; resourceKey: string}>; configField: { __typename: 'ConfigTypeField'; @@ -791,6 +793,7 @@ export type SidebarOpFragment_Graph = { id: string; name: string; description: string | null; + pools: Array; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -869,6 +872,7 @@ export type SidebarOpFragment_Graph = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{__typename: 'ResourceRequirement'; resourceKey: string}>; configField: { __typename: 'ConfigTypeField'; @@ -1565,6 +1569,7 @@ export type SidebarOpFragment_Job = { id: string; name: string; description: string | null; + pools: Array; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -1643,6 +1648,7 @@ export type SidebarOpFragment_Job = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{__typename: 'ResourceRequirement'; resourceKey: string}>; configField: { __typename: 'ConfigTypeField'; @@ -2339,6 +2345,7 @@ export type SidebarOpFragment_Pipeline = { id: string; name: string; description: string | null; + pools: Array; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -2417,6 +2424,7 @@ export type SidebarOpFragment_Pipeline = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{__typename: 'ResourceRequirement'; resourceKey: string}>; configField: { __typename: 'ConfigTypeField'; @@ -3113,6 +3121,7 @@ export type SidebarOpFragment_PipelineSnapshot = { id: string; name: string; description: string | null; + pools: Array; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -3191,6 +3200,7 @@ export type SidebarOpFragment_PipelineSnapshot = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{__typename: 'ResourceRequirement'; resourceKey: string}>; configField: { __typename: 'ConfigTypeField'; @@ -3903,6 +3913,7 @@ export type SidebarPipelineOpQuery = { id: string; name: string; description: string | null; + pools: Array; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -3985,6 +3996,7 @@ export type SidebarPipelineOpQuery = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{ __typename: 'ResourceRequirement'; resourceKey: string; @@ -4699,6 +4711,7 @@ export type SidebarGraphOpQuery = { id: string; name: string; description: string | null; + pools: Array; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -4781,6 +4794,7 @@ export type SidebarGraphOpQuery = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{ __typename: 'ResourceRequirement'; resourceKey: string; @@ -5472,6 +5486,6 @@ export type SidebarGraphOpQuery = { | {__typename: 'PythonError'}; }; -export const SidebarPipelineOpQueryVersion = 'e7c81b4abaefc0eeea9128b4e39c74a1c68d7b28f154ac5ad9cd2d5182d48d5f'; +export const SidebarPipelineOpQueryVersion = 'f2f757259ed45d1f13782138866817a5d8e6dd27e4e64253940a72cb60a345f4'; -export const SidebarGraphOpQueryVersion = 'c53856856bea89e1eb944ab02f6e175a8dbccc99ee4c8600f0df96e05535be89'; +export const SidebarGraphOpQueryVersion = 'd990aa216ec9ca839d65d14e400e00b57acdebfd96399b4daada499381296d34'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/pipelines/types/SidebarOpDefinition.types.ts b/js_modules/dagster-ui/packages/ui-core/src/pipelines/types/SidebarOpDefinition.types.ts index 0af169c89da26..4f694e520284d 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/pipelines/types/SidebarOpDefinition.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/pipelines/types/SidebarOpDefinition.types.ts @@ -7,6 +7,7 @@ export type SidebarOpDefinitionFragment_CompositeSolidDefinition = { id: string; name: string; description: string | null; + pools: Array; inputMappings: Array<{ __typename: 'InputMapping'; definition: {__typename: 'InputDefinition'; name: string}; @@ -86,6 +87,7 @@ export type SidebarOpDefinitionFragment_SolidDefinition = { __typename: 'SolidDefinition'; name: string; description: string | null; + pools: Array; requiredResources: Array<{__typename: 'ResourceRequirement'; resourceKey: string}>; configField: { __typename: 'ConfigTypeField'; diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsQuery.types.ts b/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsQuery.types.ts index 063639b538e6f..4007e41de5579 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsQuery.types.ts +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/types/WorkspaceAssetsQuery.types.ts @@ -16,6 +16,7 @@ export type RepoAssetTableFragment = { hasMaterializePermission: boolean; hasReportRunlessAssetEventPermission: boolean; description: string | null; + pools: Array; jobNames: Array; kinds: Array; assetKey: {__typename: 'AssetKey'; path: Array}; @@ -80,6 +81,7 @@ export type WorkspaceAssetsQuery = { hasMaterializePermission: boolean; hasReportRunlessAssetEventPermission: boolean; description: string | null; + pools: Array; jobNames: Array; kinds: Array; assetKey: {__typename: 'AssetKey'; path: Array}; @@ -113,4 +115,4 @@ export type WorkspaceAssetsQuery = { | {__typename: 'RepositoryNotFoundError'}; }; -export const WorkspaceAssetsQueryVersion = '53e4bb05e5c1194cc83e0910cfe7c482d75344c10eabf184be26da29d771c236'; +export const WorkspaceAssetsQueryVersion = 'cc333781b40b421b35810070c5a7171e99bb43896380d462775939a32a70f045';