Skip to content

Commit e2b6b31

Browse files
committed
feat(FR-2891): move resource group to deployment-level metadata and refine deployment detail UI
1 parent 1f3f171 commit e2b6b31

46 files changed

Lines changed: 2053 additions & 969 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

data/schema.graphql

Lines changed: 71 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,25 @@ type ActiveResourceOverview
151151
input AddRevisionInput
152152
@join__type(graph: STRAWBERRY)
153153
{
154-
name: String = null
155-
156154
"""
157155
Added in 26.4.2. DeploymentRevisionPreset ID. When specified, preset values are used as defaults and can be overridden by explicitly provided fields.
158156
"""
159157
revisionPresetId: UUID = null
160158
deploymentId: ID!
161-
clusterConfig: ClusterConfigInput!
162-
resourceConfig: ResourceConfigInput!
163-
image: ImageInput!
164-
modelRuntimeConfig: ModelRuntimeConfigInput!
159+
160+
"""Cluster configuration"""
161+
clusterConfig: ClusterConfigInput = null
162+
163+
"""Resource configuration"""
164+
resourceConfig: ResourceConfigInput = null
165+
166+
"""Container image"""
167+
image: ImageInput = null
168+
169+
"""Runtime configuration"""
170+
modelRuntimeConfig: ModelRuntimeConfigInput = null
171+
172+
"""Model mount configuration"""
165173
modelMountConfig: ModelMountConfigInput!
166174

167175
"""
@@ -3843,8 +3851,6 @@ Added in 25.19.0. Input for specifying revision configuration within a deploymen
38433851
input CreateRevisionInput
38443852
@join__type(graph: STRAWBERRY)
38453853
{
3846-
name: String = null
3847-
38483854
"""
38493855
Added in 26.4.2. DeploymentRevisionPreset ID. When specified, preset values are used as defaults and can be overridden by explicitly provided fields.
38503856
"""
@@ -6772,6 +6778,11 @@ type ExtraVFolderMountInfoGQL
67726778
The concrete permission snapshot fixed at revision-write time. ``INHERIT`` policies are resolved against the vfolder's current permission at that point, so this value is immutable and does not change when the vfolder's permission later changes. ``None`` when the caller left it unset to inherit the vfolder's stored permission at session-creation time (task #83).
67736779
"""
67746780
mountPerm: MountPermission!
6781+
6782+
"""
6783+
Added in UNRELEASED. Subpath within the vfolder. ``None`` means the vfolder root.
6784+
"""
6785+
subpath: String
67756786
}
67766787

67776788
"""Added in 25.19.0. """
@@ -6780,6 +6791,11 @@ input ExtraVFolderMountInput
67806791
{
67816792
vfolderId: ID!
67826793
mountDestination: String
6794+
6795+
"""
6796+
Added in UNRELEASED. Subpath within the vfolder. ``null`` (default) mounts the vfolder root.
6797+
"""
6798+
subpath: String = null
67836799
}
67846800

67856801
"""
@@ -9350,6 +9366,11 @@ Added in 25.19.0. Contains metadata information for a model deployment including
93509366
type ModelDeploymentMetadata
93519367
@join__type(graph: STRAWBERRY)
93529368
{
9369+
"""
9370+
Added in UNRELEASED. The resource group this deployment runs in, resolved via DataLoader.
9371+
"""
9372+
resourceGroup: ResourceGroup
9373+
93539374
"""The project of this entity."""
93549375
project: GroupNode @deprecated(reason: "Use project_v2 instead.")
93559376

@@ -9370,6 +9391,7 @@ type ModelDeploymentMetadata
93709391
name: String!
93719392
status: DeploymentStatus!
93729393
tags: [String!]!
9394+
resourceGroupName: String!
93739395
createdAt: DateTime!
93749396
updatedAt: DateTime!
93759397
}
@@ -9380,6 +9402,7 @@ input ModelDeploymentMetadataInput
93809402
{
93819403
projectId: ID!
93829404
domainName: String!
9405+
resourceGroupName: String!
93839406
name: String = null
93849407
tags: [String!] = null
93859408
}
@@ -9550,6 +9573,11 @@ type ModelMountConfig
95509573
vfolderId: ID!
95519574
mountDestination: String!
95529575
definitionPath: String!
9576+
9577+
"""
9578+
Added in UNRELEASED. Subpath within the model vfolder. ``None`` means the vfolder root.
9579+
"""
9580+
subpath: String
95539581
}
95549582

95559583
"""Added in 25.19.0. """
@@ -9559,6 +9587,11 @@ input ModelMountConfigInput
95599587
vfolderId: ID!
95609588
mountDestination: String!
95619589
definitionPath: String = null
9590+
9591+
"""
9592+
Added in UNRELEASED. Subpath within the model vfolder. ``null`` (default) mounts the vfolder root.
9593+
"""
9594+
subpath: String = null
95629595
}
95639596

95649597
"""
@@ -9582,6 +9615,17 @@ type ModelReplica implements Node
95829615
"""Whether the replica is actively receiving traffic."""
95839616
activenessStatus: ActivenessStatus!
95849617

9618+
"""
9619+
Added in UNRELEASED. Provisioning status of the replica (mirrors the underlying route status).
9620+
"""
9621+
status: ReplicaStatus!
9622+
9623+
"""Added in UNRELEASED. Traffic status of the replica."""
9624+
trafficStatus: TrafficStatus!
9625+
9626+
"""Added in UNRELEASED. Health check status of the replica."""
9627+
healthStatus: ReplicaHealthStatus!
9628+
95859629
"""Timestamp when the replica was created."""
95869630
createdAt: DateTime!
95879631

@@ -9771,7 +9815,6 @@ input ModelRuntimeConfigInput
97719815
@join__type(graph: STRAWBERRY)
97729816
{
97739817
runtimeVariantId: UUID!
9774-
inferenceRuntimeConfig: JSON = null
97759818

97769819
"""Environment variables for the service."""
97779820
environ: EnvironmentVariablesInput = null
@@ -14049,10 +14092,10 @@ type Query
1404914092
"""
1405014093
Added in 25.16.0. Get configuration JSON Schemas for all inference runtimes.
1405114094
"""
14052-
inferenceRuntimeConfigs: JSON @join__field(graph: STRAWBERRY)
14095+
inferenceRuntimeConfigs: JSON @join__field(graph: STRAWBERRY) @deprecated(reason: "Deprecated since UNRELEASED. Use the runtime_variant resources instead.")
1405314096

1405414097
"""Added in 25.16.0. Get JSON Schema for inference runtime configuration"""
14055-
inferenceRuntimeConfig(name: String!): JSON @join__field(graph: STRAWBERRY)
14098+
inferenceRuntimeConfig(name: String!): JSON @join__field(graph: STRAWBERRY) @deprecated(reason: "Deprecated since UNRELEASED. Use the runtime_variant resources instead.")
1405614099

1405714100
"""Added in 25.19.0. Get a specific route by ID."""
1405814101
route(id: ID!): Route @join__field(graph: STRAWBERRY)
@@ -14729,6 +14772,18 @@ input ReplicaFilter
1472914772
NOT: [ReplicaFilter!] = null
1473014773
}
1473114774

14775+
"""
14776+
Added in UNRELEASED. This enum represents the health check status of a replica.
14777+
"""
14778+
enum ReplicaHealthStatus
14779+
@join__type(graph: STRAWBERRY)
14780+
{
14781+
NOT_CHECKED @join__enumValue(graph: STRAWBERRY)
14782+
HEALTHY @join__enumValue(graph: STRAWBERRY)
14783+
UNHEALTHY @join__enumValue(graph: STRAWBERRY)
14784+
DEGRADED @join__enumValue(graph: STRAWBERRY)
14785+
}
14786+
1473214787
"""Added in 25.19.0. """
1473314788
input ReplicaOrderBy
1473414789
@join__type(graph: STRAWBERRY)
@@ -14893,8 +14948,6 @@ type ResourceConfig
1489314948
input ResourceConfigInput
1489414949
@join__type(graph: STRAWBERRY)
1489514950
{
14896-
resourceGroup: ResourceGroupInput!
14897-
1489814951
"""Added in 26.1.0. Resources allocated for the deployment."""
1489914952
resourceSlots: ResourceSlotInput!
1490014953

@@ -14998,13 +15051,6 @@ input ResourceGroupFilter
1499815051
NOT: [ResourceGroupFilter!] = null
1499915052
}
1500015053

15001-
"""Added in 25.19.0. """
15002-
input ResourceGroupInput
15003-
@join__type(graph: STRAWBERRY)
15004-
{
15005-
name: String!
15006-
}
15007-
1500815054
"""Added in 26.2.0. Metadata for a resource group."""
1500915055
type ResourceGroupMetadata
1501015056
@join__type(graph: STRAWBERRY)
@@ -17066,6 +17112,11 @@ input SessionMountItemInput
1706617112

1706717113
"""Mount permission ('rw' or 'ro')."""
1706817114
permission: String = null
17115+
17116+
"""
17117+
Added in UNRELEASED. Subpath within the vfolder to mount. Null mounts the vfolder root.
17118+
"""
17119+
subpath: String = null
1706917120
}
1707017121

1707117122
"""Added in 25.13.0."""

packages/backend.ai-ui/src/components/BAISelect.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,6 @@ export interface BAISelectProps<
108108
footer?: React.ReactNode;
109109
endReached?: () => void; // New prop for endReached
110110
searchAction?: (value: string) => Promise<void>;
111-
// antd v6 made `role` required on SelectProps. We Omit it from the
112-
// extended props and re-add it as optional with a sensible default so
113-
// callers don't have to spell it out at every call site. Override
114-
// (e.g. `role="listbox"`) when a specific ARIA role is needed.
115-
role?: SelectProps<ValueType, OptionType>['role'];
116111
}
117112

118113
function BAISelect<
@@ -128,7 +123,6 @@ function BAISelect<
128123
footer,
129124
endReached, // Destructure the new prop
130125
searchAction,
131-
role = 'combobox',
132126
...selectProps
133127
}: BAISelectProps<ValueType, OptionType>): React.ReactElement {
134128
const { value, options, onChange } = selectProps;
@@ -202,7 +196,6 @@ function BAISelect<
202196
<Tooltip title={tooltip}>
203197
<Select<ValueType, OptionType>
204198
{...selectProps}
205-
role={role}
206199
loading={isPending || selectProps.loading}
207200
showSearch={composedShowSearch}
208201
ref={ref}

react/src/components/AdminDeploymentPresetNodes.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ const AdminDeploymentPresetNodes: React.FC<AdminDeploymentPresetNodesProps> = ({
9191
deploymentStrategy
9292
}
9393
createdAt
94-
...DeploymentPresetDetailModalFragment
9594
}
9695
`,
9796
presetsFrgmt,

react/src/components/AdminDeploymentPresetReviewSummary.tsx

Lines changed: 10 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,16 @@
22
@license
33
Copyright (c) 2015-2026 Lablup Inc. All rights reserved.
44
*/
5-
import type { AdminDeploymentPresetReviewSummaryImageQuery } from '../__generated__/AdminDeploymentPresetReviewSummaryImageQuery.graphql';
5+
import { useAdminImageCanonicalName } from '../hooks/hooksUsingRelay';
66
import { ResourceNumbersOfSession } from '../pages/SessionLauncherPage';
77
import type { AdminDeploymentPresetFormValue } from './AdminDeploymentPresetFormTypes';
88
import SourceCodeView from './SourceCodeView';
99
import { Button, Descriptions, Space, Tag, Typography, theme } from 'antd';
1010
import type { FormInstance } from 'antd';
1111
import { BAICard, BAIFlex, toLocalId } from 'backend.ai-ui';
1212
import * as _ from 'lodash-es';
13-
import React, { Suspense } from 'react';
13+
import React from 'react';
1414
import { useTranslation } from 'react-i18next';
15-
import { graphql, useLazyLoadQuery } from 'react-relay';
16-
17-
// ---------------------------------------------------------------------------
18-
// Image canonical name resolver (for review step)
19-
// ---------------------------------------------------------------------------
20-
21-
const ImageCanonicalName: React.FC<{ imageId: string }> = ({ imageId }) => {
22-
'use memo';
23-
const data = useLazyLoadQuery<AdminDeploymentPresetReviewSummaryImageQuery>(
24-
graphql`
25-
query AdminDeploymentPresetReviewSummaryImageQuery($id: UUID!) {
26-
adminImagesV2(filter: { id: { equals: $id } }, limit: 1) {
27-
edges {
28-
node {
29-
identity {
30-
canonicalName
31-
}
32-
}
33-
}
34-
}
35-
}
36-
`,
37-
{ id: imageId },
38-
{ fetchPolicy: 'store-or-network' },
39-
);
40-
const canonicalName =
41-
data.adminImagesV2?.edges?.[0]?.node?.identity?.canonicalName ?? imageId;
42-
return (
43-
<Typography.Text
44-
code
45-
style={{ wordBreak: 'break-all' }}
46-
copyable={{ text: canonicalName }}
47-
>
48-
{canonicalName}
49-
</Typography.Text>
50-
);
51-
};
5215

5316
// ---------------------------------------------------------------------------
5417
// PresetReviewSummary — read-only summary of all form fields on the review step
@@ -85,6 +48,7 @@ const PresetReviewSummary: React.FC<PresetReviewSummaryProps> = ({
8548
// enableMetadata) that have no registered Form.Item. The `true` overload
8649
// returns `any`; annotate the variable explicitly to restore type safety.
8750
const values: AdminDeploymentPresetFormValue = form.getFieldsValue(true);
51+
const imageCanonicalName = useAdminImageCanonicalName(values.imageId);
8852

8953
const basicInfoHasError = BASIC_INFO_FIELDS.some((f) =>
9054
errorFieldNames.includes(f),
@@ -145,16 +109,14 @@ const PresetReviewSummary: React.FC<PresetReviewSummaryProps> = ({
145109
</Descriptions.Item>
146110
)}
147111
<Descriptions.Item label={t('adminDeploymentPreset.Image')}>
148-
{values.imageId ? (
149-
<Suspense
150-
fallback={
151-
<Typography.Text code style={{ wordBreak: 'break-all' }}>
152-
{values.imageId}
153-
</Typography.Text>
154-
}
112+
{imageCanonicalName ? (
113+
<Typography.Text
114+
code
115+
style={{ wordBreak: 'break-all' }}
116+
copyable={{ text: imageCanonicalName }}
155117
>
156-
<ImageCanonicalName imageId={values.imageId} />
157-
</Suspense>
118+
{imageCanonicalName}
119+
</Typography.Text>
158120
) : (
159121
'-'
160122
)}

react/src/components/AdminDeploymentPresetSettingPageContent.tsx

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import {
3434
Input,
3535
InputNumber,
3636
Select,
37+
Skeleton,
3738
Steps,
3839
Typography,
3940
theme,
@@ -794,6 +795,7 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
794795
<Form.Item
795796
name="replicaCount"
796797
label={t('adminDeploymentPreset.Replicas')}
798+
tooltip={t('adminDeploymentPreset.ReplicasTooltip')}
797799
style={{ flex: 1, minWidth: 120 }}
798800
rules={[{ required: true }]}
799801
>
@@ -806,6 +808,7 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
806808
<Form.Item
807809
name="revisionHistoryLimit"
808810
label={t('adminDeploymentPreset.RevisionHistoryLimit')}
811+
tooltip={t('adminDeploymentPreset.RevisionHistoryLimitTooltip')}
809812
style={{ flex: 1, minWidth: 120 }}
810813
>
811814
<InputNumber
@@ -817,7 +820,11 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
817820
/>
818821
</Form.Item>
819822
</BAIFlex>
820-
<Form.Item name="openToPublic" valuePropName="checked">
823+
<Form.Item
824+
name="openToPublic"
825+
valuePropName="checked"
826+
tooltip={t('adminDeploymentPreset.OpenToPublicTooltip')}
827+
>
821828
<Checkbox>{t('adminDeploymentPreset.OpenToPublic')}</Checkbox>
822829
</Form.Item>
823830
</BAICard>
@@ -828,13 +835,15 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
828835
{currentStepKey === 'review' && (
829836
<Form.Item noStyle shouldUpdate>
830837
{() => (
831-
<PresetReviewSummary
832-
form={form}
833-
mode={mode}
834-
onGoToStep={goToStep}
835-
runtimeVariants={runtimeVariants}
836-
errorFieldNames={errorFieldNames}
837-
/>
838+
<Suspense fallback={<Skeleton active />}>
839+
<PresetReviewSummary
840+
form={form}
841+
mode={mode}
842+
onGoToStep={goToStep}
843+
runtimeVariants={runtimeVariants}
844+
errorFieldNames={errorFieldNames}
845+
/>
846+
</Suspense>
838847
)}
839848
</Form.Item>
840849
)}

0 commit comments

Comments
 (0)