Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 71 additions & 20 deletions data/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,25 @@ type ActiveResourceOverview
input AddRevisionInput
@join__type(graph: STRAWBERRY)
{
name: String = null

"""
Added in 26.4.2. DeploymentRevisionPreset ID. When specified, preset values are used as defaults and can be overridden by explicitly provided fields.
"""
revisionPresetId: UUID = null
deploymentId: ID!
clusterConfig: ClusterConfigInput!
resourceConfig: ResourceConfigInput!
image: ImageInput!
modelRuntimeConfig: ModelRuntimeConfigInput!

"""Cluster configuration"""
clusterConfig: ClusterConfigInput = null

"""Resource configuration"""
resourceConfig: ResourceConfigInput = null

"""Container image"""
image: ImageInput = null

"""Runtime configuration"""
modelRuntimeConfig: ModelRuntimeConfigInput = null

"""Model mount configuration"""
modelMountConfig: ModelMountConfigInput!

"""
Expand Down Expand Up @@ -3843,8 +3851,6 @@ Added in 25.19.0. Input for specifying revision configuration within a deploymen
input CreateRevisionInput
@join__type(graph: STRAWBERRY)
{
name: String = null

"""
Added in 26.4.2. DeploymentRevisionPreset ID. When specified, preset values are used as defaults and can be overridden by explicitly provided fields.
"""
Expand Down Expand Up @@ -6772,6 +6778,11 @@ type ExtraVFolderMountInfoGQL
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).
"""
mountPerm: MountPermission!

"""
Added in UNRELEASED. Subpath within the vfolder. ``None`` means the vfolder root.
"""
subpath: String
}

"""Added in 25.19.0. """
Expand All @@ -6780,6 +6791,11 @@ input ExtraVFolderMountInput
{
vfolderId: ID!
mountDestination: String

"""
Added in UNRELEASED. Subpath within the vfolder. ``null`` (default) mounts the vfolder root.
"""
subpath: String = null
}

"""
Expand Down Expand Up @@ -9350,6 +9366,11 @@ Added in 25.19.0. Contains metadata information for a model deployment including
type ModelDeploymentMetadata
@join__type(graph: STRAWBERRY)
{
"""
Added in UNRELEASED. The resource group this deployment runs in, resolved via DataLoader.
"""
resourceGroup: ResourceGroup

"""The project of this entity."""
project: GroupNode @deprecated(reason: "Use project_v2 instead.")

Expand All @@ -9370,6 +9391,7 @@ type ModelDeploymentMetadata
name: String!
status: DeploymentStatus!
tags: [String!]!
resourceGroupName: String!
createdAt: DateTime!
updatedAt: DateTime!
}
Expand All @@ -9380,6 +9402,7 @@ input ModelDeploymentMetadataInput
{
projectId: ID!
domainName: String!
resourceGroupName: String!
name: String = null
tags: [String!] = null
}
Expand Down Expand Up @@ -9550,6 +9573,11 @@ type ModelMountConfig
vfolderId: ID!
mountDestination: String!
definitionPath: String!

"""
Added in UNRELEASED. Subpath within the model vfolder. ``None`` means the vfolder root.
"""
subpath: String
}

"""Added in 25.19.0. """
Expand All @@ -9559,6 +9587,11 @@ input ModelMountConfigInput
vfolderId: ID!
mountDestination: String!
definitionPath: String = null

"""
Added in UNRELEASED. Subpath within the model vfolder. ``null`` (default) mounts the vfolder root.
"""
subpath: String = null
}

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

"""
Added in UNRELEASED. Provisioning status of the replica (mirrors the underlying route status).
"""
status: ReplicaStatus!

"""Added in UNRELEASED. Traffic status of the replica."""
trafficStatus: TrafficStatus!

"""Added in UNRELEASED. Health check status of the replica."""
healthStatus: ReplicaHealthStatus!

"""Timestamp when the replica was created."""
createdAt: DateTime!

Expand Down Expand Up @@ -9771,7 +9815,6 @@ input ModelRuntimeConfigInput
@join__type(graph: STRAWBERRY)
{
runtimeVariantId: UUID!
inferenceRuntimeConfig: JSON = null

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

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

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

"""
Added in UNRELEASED. This enum represents the health check status of a replica.
"""
enum ReplicaHealthStatus
@join__type(graph: STRAWBERRY)
{
NOT_CHECKED @join__enumValue(graph: STRAWBERRY)
HEALTHY @join__enumValue(graph: STRAWBERRY)
UNHEALTHY @join__enumValue(graph: STRAWBERRY)
DEGRADED @join__enumValue(graph: STRAWBERRY)
}

"""Added in 25.19.0. """
input ReplicaOrderBy
@join__type(graph: STRAWBERRY)
Expand Down Expand Up @@ -14893,8 +14948,6 @@ type ResourceConfig
input ResourceConfigInput
@join__type(graph: STRAWBERRY)
{
resourceGroup: ResourceGroupInput!

"""Added in 26.1.0. Resources allocated for the deployment."""
resourceSlots: ResourceSlotInput!

Expand Down Expand Up @@ -14998,13 +15051,6 @@ input ResourceGroupFilter
NOT: [ResourceGroupFilter!] = null
}

"""Added in 25.19.0. """
input ResourceGroupInput
@join__type(graph: STRAWBERRY)
{
name: String!
}

"""Added in 26.2.0. Metadata for a resource group."""
type ResourceGroupMetadata
@join__type(graph: STRAWBERRY)
Expand Down Expand Up @@ -17066,6 +17112,11 @@ input SessionMountItemInput

"""Mount permission ('rw' or 'ro')."""
permission: String = null

"""
Added in UNRELEASED. Subpath within the vfolder to mount. Null mounts the vfolder root.
"""
subpath: String = null
}

"""Added in 25.13.0."""
Expand Down
7 changes: 0 additions & 7 deletions packages/backend.ai-ui/src/components/BAISelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ export interface BAISelectProps<
footer?: React.ReactNode;
endReached?: () => void; // New prop for endReached
searchAction?: (value: string) => Promise<void>;
// antd v6 made `role` required on SelectProps. We Omit it from the
// extended props and re-add it as optional with a sensible default so
// callers don't have to spell it out at every call site. Override
// (e.g. `role="listbox"`) when a specific ARIA role is needed.
role?: SelectProps<ValueType, OptionType>['role'];
}

function BAISelect<
Expand All @@ -128,7 +123,6 @@ function BAISelect<
footer,
endReached, // Destructure the new prop
searchAction,
role = 'combobox',
...selectProps
}: BAISelectProps<ValueType, OptionType>): React.ReactElement {
const { value, options, onChange } = selectProps;
Expand Down Expand Up @@ -202,7 +196,6 @@ function BAISelect<
<Tooltip title={tooltip}>
<Select<ValueType, OptionType>
{...selectProps}
role={role}
loading={isPending || selectProps.loading}
showSearch={composedShowSearch}
ref={ref}
Expand Down
1 change: 0 additions & 1 deletion react/src/components/AdminDeploymentPresetNodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ const AdminDeploymentPresetNodes: React.FC<AdminDeploymentPresetNodesProps> = ({
deploymentStrategy
}
createdAt
...DeploymentPresetDetailModalFragment
}
`,
presetsFrgmt,
Expand Down
58 changes: 10 additions & 48 deletions react/src/components/AdminDeploymentPresetReviewSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,16 @@
@license
Copyright (c) 2015-2026 Lablup Inc. All rights reserved.
*/
import type { AdminDeploymentPresetReviewSummaryImageQuery } from '../__generated__/AdminDeploymentPresetReviewSummaryImageQuery.graphql';
import { useAdminImageCanonicalName } from '../hooks/hooksUsingRelay';
import { ResourceNumbersOfSession } from '../pages/SessionLauncherPage';
import type { AdminDeploymentPresetFormValue } from './AdminDeploymentPresetFormTypes';
import SourceCodeView from './SourceCodeView';
import { Button, Descriptions, Space, Tag, Typography, theme } from 'antd';
import type { FormInstance } from 'antd';
import { BAICard, BAIFlex, toLocalId } from 'backend.ai-ui';
import * as _ from 'lodash-es';
import React, { Suspense } from 'react';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { graphql, useLazyLoadQuery } from 'react-relay';

// ---------------------------------------------------------------------------
// Image canonical name resolver (for review step)
// ---------------------------------------------------------------------------

const ImageCanonicalName: React.FC<{ imageId: string }> = ({ imageId }) => {
'use memo';
const data = useLazyLoadQuery<AdminDeploymentPresetReviewSummaryImageQuery>(
graphql`
query AdminDeploymentPresetReviewSummaryImageQuery($id: UUID!) {
adminImagesV2(filter: { id: { equals: $id } }, limit: 1) {
edges {
node {
identity {
canonicalName
}
}
}
}
}
`,
{ id: imageId },
{ fetchPolicy: 'store-or-network' },
);
const canonicalName =
data.adminImagesV2?.edges?.[0]?.node?.identity?.canonicalName ?? imageId;
return (
<Typography.Text
code
style={{ wordBreak: 'break-all' }}
copyable={{ text: canonicalName }}
>
{canonicalName}
</Typography.Text>
);
};

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

const basicInfoHasError = BASIC_INFO_FIELDS.some((f) =>
errorFieldNames.includes(f),
Expand Down Expand Up @@ -145,16 +109,14 @@ const PresetReviewSummary: React.FC<PresetReviewSummaryProps> = ({
</Descriptions.Item>
)}
<Descriptions.Item label={t('adminDeploymentPreset.Image')}>
{values.imageId ? (
<Suspense
fallback={
<Typography.Text code style={{ wordBreak: 'break-all' }}>
{values.imageId}
</Typography.Text>
}
{imageCanonicalName ? (
<Typography.Text
code
style={{ wordBreak: 'break-all' }}
copyable={{ text: imageCanonicalName }}
>
<ImageCanonicalName imageId={values.imageId} />
</Suspense>
{imageCanonicalName}
</Typography.Text>
) : (
'-'
)}
Expand Down
25 changes: 17 additions & 8 deletions react/src/components/AdminDeploymentPresetSettingPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
Input,
InputNumber,
Select,
Skeleton,
Steps,
Typography,
theme,
Expand Down Expand Up @@ -794,6 +795,7 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
<Form.Item
name="replicaCount"
label={t('adminDeploymentPreset.Replicas')}
tooltip={t('adminDeploymentPreset.ReplicasTooltip')}
style={{ flex: 1, minWidth: 120 }}
rules={[{ required: true }]}
>
Expand All @@ -806,6 +808,7 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
<Form.Item
name="revisionHistoryLimit"
label={t('adminDeploymentPreset.RevisionHistoryLimit')}
tooltip={t('adminDeploymentPreset.RevisionHistoryLimitTooltip')}
style={{ flex: 1, minWidth: 120 }}
>
<InputNumber
Expand All @@ -817,7 +820,11 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
/>
</Form.Item>
</BAIFlex>
<Form.Item name="openToPublic" valuePropName="checked">
<Form.Item
name="openToPublic"
valuePropName="checked"
tooltip={t('adminDeploymentPreset.OpenToPublicTooltip')}
>
<Checkbox>{t('adminDeploymentPreset.OpenToPublic')}</Checkbox>
</Form.Item>
</BAICard>
Expand All @@ -828,13 +835,15 @@ const AdminDeploymentPresetSettingPageContent: React.FC<
{currentStepKey === 'review' && (
<Form.Item noStyle shouldUpdate>
{() => (
<PresetReviewSummary
form={form}
mode={mode}
onGoToStep={goToStep}
runtimeVariants={runtimeVariants}
errorFieldNames={errorFieldNames}
/>
<Suspense fallback={<Skeleton active />}>
<PresetReviewSummary
form={form}
mode={mode}
onGoToStep={goToStep}
runtimeVariants={runtimeVariants}
errorFieldNames={errorFieldNames}
/>
</Suspense>
)}
</Form.Item>
)}
Expand Down
Loading
Loading