Skip to content

Commit a4937e7

Browse files
committed
feat(FR-2750): add deployment preset management UI feature spec (#7091)
Resolves #7090 ([FR-2750](https://lablup.atlassian.net/browse/FR-2750)) ## Summary - Add Korean feature spec at `.specs/FR-2750-deployment-revision-preset-ui/spec.md` for the Deployment Preset management UI: - First milestone: Superadmin CRUD UI as a new "Deployment Presets" tab on `/admin-serving`, covering creation, editing (name, description, image, cluster, resource, execution environment, deployment defaults, model definition, rank), and typed-confirmation deletion. - Second milestone: Read-only Drawer detail view (slides from the right) accessible via an ⓘ icon next to the preset selector in the deployment revision creation flow, showing runtime, image, cluster, resources, and deployment defaults. - Documents GQL API coverage gaps — `modelRuntimeConfig`, `modelMountConfig`, and `extraMounts` are intentionally out of scope as they are model-specific values set at revision creation time, not at the preset level. - Bump `data/schema.graphql` to reflect upstream backend schema additions, including: - `RoleInvitation` type, connection, filter, ordering, and state enum, along with `createRoleInvitation`, `acceptRoleInvitation`, `rejectRoleInvitation`, and `adminCancelRoleInvitation` mutations and related queries (`myRoleInvitations`, `mySentRoleInvitations`, `adminRoleInvitations`, `roleScopedRoleInvitations`). - `ScalingState` enum and `scalingState` field on `ModelDeployment`; `category` field on `DeploymentHistory`. - `DeploymentOptionsInfoGQL` / `DeploymentOptionsInput` and `DeploymentTimeoutsInfoGQL` / `DeploymentTimeoutsInput` types, plus `options` field on `ModelDeployment`. - `replaceResourceGroupDefaultDeploymentOptions` and `replaceResourceGroupDefaultSessionOptions` mutations with corresponding input/payload types and new `defaultDeploymentOptions` / `defaultSessionOptions` fields on `ResourceGroup`. - `DefaultSessionOptionsInfo/Input`, `DefaultSessionKernelExecutionSpecInfo/Input`, `DefaultSessionTimeoutsInfo/Input`, `DefaultSessionResourceOptsInfo/Input`, and `DefaultSessionHandlerTimeoutEntryInfo/Input` types. - `SchedulingHandlerNode`, `SchedulingHandlerCategory`, and `schedulingHandlers` query. - `SessionFailurePolicy`, `SessionAgentSelectionPolicy`, and `MountPermission` enums. - `HandlerTimeoutEntryInfoGQL` / `HandlerTimeoutEntryInput` types. - `CreateVFolderInScopeInput` and `createVFolderInProject` mutation. - `ModelRuntimeConfig.runtimeVariant` changed from `String!` to `RuntimeVariant` (nullable object) with an added `runtimeVariantId: UUID!` field; `ModelRuntimeConfigInput.runtimeVariant` replaced by `runtimeVariantId: UUID!`. - `ModelRevisionOrderField.RUNTIME_VARIANT` renamed to `RUNTIME_VARIANT_NAME`. - `ModelReplica.sessionId` changed from `ID!` to `ID` (nullable) and `session` deprecated field changed from `ComputeSessionNode!` to `ComputeSessionNode` (nullable). - `ExtraVFolderMountInfoGQL.mountPerm: MountPermission!` field added. - `ROLE_ASSIGNMENT` added to `RBACElementType` enum. ## Notes - The spec leaves open questions around the runtime variant list query, reuse of the existing image selector component for `imageId: UUID!` mapping, and backend behavior (cascade vs. rejection) when deleting a preset referenced by an active deployment revision. - Backend version **26\.4.2 or later** (including BA-5874) is required; tab visibility should be gated via `baiClient.supports('deployment-preset')`. ## Test plan - [ ] Spec renders correctly on GitHub - [ ] Schema diff compiles via `pnpm run relay` locally - [ ] Acceptance criteria are verifiable [FR-2750]: https://lablup.atlassian.net/browse/FR-2750?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 77fd99c commit a4937e7

1 file changed

Lines changed: 164 additions & 0 deletions

File tree

  • .specs/FR-2750-deployment-revision-preset-ui
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Deployment Preset 관리 UI Spec
2+
3+
> **상태**: In Review — Jira Epic: [FR-2750](https://lablup.atlassian.net/browse/FR-2750)
4+
5+
## 개요
6+
7+
Deployment Preset을 WebUI에서 직접 관리할 수 있도록 Admin CRUD 화면과 사용자용 상세 보기를 추가한다.
8+
9+
- **1차 마일스톤**: superadmin이 `/admin-serving`의 새 탭에서 preset을 생성·수정·삭제 (별도 페이지, step 기반 폼)
10+
- **2차 마일스톤**: deployment revision 생성 화면에서 일반 사용자가 preset 상세 내역 확인 (read-only Drawer)
11+
12+
### GQL API 지원 현황
13+
14+
> `imageId`는 Create 시 **필수**(`UUID!`).
15+
16+
| 필드 그룹 | GQL Create | GQL Update |
17+
|---|:---:|:---:|
18+
| `name`, `description` |||
19+
| `imageId` | ✅ (필수) ||
20+
| `runtimeVariantId` | ✅ (필수) | - |
21+
| `rank` | - ||
22+
| `clusterMode`, `clusterSize` |||
23+
| `resourceSlots`, `resourceOpts` |||
24+
| `startupCommand`, `bootstrapScript`, `environ` |||
25+
| `openToPublic`, `replicaCount`, `revisionHistoryLimit`, `deploymentStrategy` |||
26+
| `presetValues`, `modelDefinition` |||
27+
| `modelRuntimeConfig`, `modelMountConfig`, `extraMounts` |||
28+
29+
> `modelRuntimeConfig` · `modelMountConfig` · `extraMounts`는 Preset이 아닌 deployment revision 생성 시점에 지정하는 model-specific 값이므로 Preset 관리 UI 범위 밖.
30+
31+
## 배경
32+
33+
- CLI로만 preset을 관리할 수 있어 운영 부담이 크다.
34+
- 일반 사용자가 deployment revision 생성 시 preset 이름만 보고 선택해야 해서, 이미지·리소스·기본값을 미리 확인할 수 없다.
35+
36+
## 목표
37+
38+
1. Superadmin이 WebUI에서 deployment preset을 생성·조회·수정·삭제할 수 있다.
39+
2. 일반 사용자가 deployment revision 생성 화면에서 현재 선택한 preset의 상세 내역을 read-only Drawer로 확인할 수 있다.
40+
3. 일반 사용자는 admin 관리 페이지에 접근할 수 없다.
41+
42+
## 비목표
43+
44+
- Deployment revision 생성/배포 흐름 자체의 재설계
45+
- Runtime variant 자체의 CRUD
46+
- 벌크 작업 (다중 선택 삭제/수정)
47+
- `modelRuntimeConfig`, `modelMountConfig`, `extraMounts` 편집
48+
49+
## 사용자 스토리
50+
51+
- Superadmin으로서, preset의 전체 설정(이미지, 리소스, 클러스터, 실행 환경, replica 기본값 등)을 WebUI에서 직접 생성·수정하고 싶다.
52+
- Superadmin으로서, 더 이상 사용하지 않는 preset을 안전하게 삭제하고 싶다.
53+
- 일반 사용자로서, deployment revision 생성 시 preset 후보의 상세 내역을 선택 흐름을 끊지 않고 확인하고 싶다.
54+
55+
## UI 목업 — Selector 상세 보기 (2차 마일스톤)
56+
57+
```
58+
[Create Deployment Revision 화면]
59+
─────────────────────────────────────────────────────────
60+
Deployment Preset [ vLLM-GPU-Large ▼ ] [ⓘ]
61+
─────────────────────────────────────────────────────────
62+
↑ VFolderSelect의 Space.Compact 버튼 패턴과 동일.
63+
Select 오른쪽 Space.Compact 안에 ⓘ Button 배치.
64+
선택 전 disabled, 선택 후 클릭 → read-only Drawer
65+
66+
ⓘ 클릭 → 현재 선택된 preset 상세 Drawer (read-only, 우측에서 슬라이드):
67+
68+
┌─────────────────────────────────────┐
69+
│ vLLM-GPU-Large ✕ │
70+
│ Large GPU preset for vLLM inference│
71+
│ Rank: 1 │
72+
├─────────────────────────────────────┤
73+
│ Runtime vLLM │
74+
│ Image cr.backend.ai/vllm:... │
75+
├─────────────────────────────────────┤
76+
│ Cluster single-node × 1 │
77+
├─────────────────────────────────────┤
78+
│ Resources │
79+
│ CPU 4 Memory 16 GiB │
80+
│ GPU 1 shmem 2 GiB │
81+
├─────────────────────────────────────┤
82+
│ Deployment Defaults │
83+
│ Replicas 2 Limit 10 │
84+
│ Strategy ROLLING │
85+
│ Public No │
86+
└─────────────────────────────────────┘
87+
```
88+
89+
## 요구사항
90+
91+
### 1차 마일스톤 — Admin CRUD
92+
93+
**진입**
94+
- [ ] `/admin-serving`에 "Deployment Presets" 탭 추가 (superadmin 전용)
95+
- [ ] 비-superadmin이 탭에 직접 접근 시 기본 탭(`serving`)으로 폴백
96+
97+
**목록** (`/admin-serving?tab=deployment-presets`)
98+
- [ ] Name, Description, Runtime, Image, Cluster, Replicas(default), Strategy, Rank, Created at, Actions 컬럼
99+
- [ ] 컬럼 표시/숨김 설정 (`BAITable` `tableSettings` prop — Description, Cluster, Strategy, Rank 등은 기본 숨김 후보)
100+
- [ ] name 필터 (문자열 포함 검색), runtime variant UUID 필터; name · rank · 생성일 정렬
101+
- [ ] 새로고침 버튼
102+
- [ ] "Create Preset" 버튼 → 생성 페이지로 이동
103+
- [ ] 테이블 행 Actions → Edit 버튼 클릭 시 수정 페이지로 이동
104+
105+
**생성 / 수정 페이지**`SessionLauncherPage`와 동일한 step 기반 별도 페이지:
106+
107+
라우트:
108+
- 생성: `/admin-serving/deployment-presets/new`
109+
- 수정: `/admin-serving/deployment-presets/:presetId/edit`
110+
111+
Step 구성 (수직 `Steps` 사이드바 + 우측 폼 영역 + Previous/Next 네비게이션):
112+
113+
| Step | 필드 |
114+
|---|---|
115+
| 1. Basic Info | `name`(필수), `description`, `runtimeVariantId`(필수, 수정 시 read-only 텍스트로 표시), `imageId`(필수) |
116+
| 2. Cluster | `clusterMode`, `clusterSize` |
117+
| 3. Execution | `startupCommand`, `bootstrapScript`, `environ`, `modelDefinition` |
118+
| 4. Resources | `resourceSlots`, `resourceOpts` |
119+
| 5. Deployment | `replicaCount`, `revisionHistoryLimit`, `openToPublic`, `presetValues`, `rank`(수정 시만) |
120+
121+
- Previous / Next 버튼으로 step 간 이동
122+
- 마지막 step에서 Create / Update 버튼 노출
123+
- Cancel 또는 완료 시 목록 탭(`/admin-serving?tab=deployment-presets`)으로 복귀
124+
125+
**삭제**
126+
- [ ] 목록에서 Delete 아이콘 클릭 → `BAIDeleteConfirmModal` (preset 이름을 입력하는 typed-confirmation 방식)
127+
128+
### 2차 마일스톤 — Selector 상세 보기
129+
130+
- [ ] preset selector 오른쪽 ⓘ 아이콘 — 선택 전 비활성
131+
- [ ] ⓘ 클릭 시 read-only Drawer: 이름, 설명, 런타임, 이미지, 클러스터, 리소스, 배포 기본값
132+
- [ ] Drawer 내 편집·삭제 버튼 없음
133+
134+
### 권한
135+
136+
- [ ] "Deployment Presets" 탭은 superadmin만 표시
137+
- [ ] 목록 · 생성 · 수정 페이지 모두 superadmin 전용. 비-superadmin이 직접 URL로 접근하면 `/admin-serving`의 기본 탭(`serving`)으로 폴백 (탭 직접 접근 시 동작과 동일)
138+
- [ ] 일반 사용자는 selector 상세 보기(Drawer)만 접근 가능
139+
140+
## 인수 조건
141+
142+
- [ ] superadmin 로그인 시 `/admin-serving`에 "Deployment Presets" 탭 표시
143+
- [ ] 일반 사용자 로그인 시 탭 미표시
144+
- [ ] `name`, `runtimeVariantId`, `imageId` 미입력 시 생성 폼 제출 차단
145+
- [ ] Create Preset 버튼 → `/admin-serving/deployment-presets/new` 이동
146+
- [ ] Edit 버튼 → `/admin-serving/deployment-presets/:presetId/edit` 이동
147+
- [ ] 생성/수정 완료 및 Cancel 시 `/admin-serving?tab=deployment-presets` 복귀
148+
- [ ] preset 선택 전 ⓘ 비활성, 선택 후 클릭 시 상세 Drawer 열림
149+
- [ ] 상세 Drawer 내 편집·삭제 버튼 없음
150+
151+
## 의존성
152+
153+
- 백엔드 버전 **26.4.2 이상** (BA-5874 포함)
154+
- 백엔드 capability 키: `baiClient.supports('deployment-preset')`으로 탭 gating
155+
- 외부 데드라인: **2026-04-30(목) 또는 2026-05-04(월)** — 1차 마일스톤 완료
156+
157+
## 미해결 질문
158+
159+
1. **삭제 시 참조 처리**: 사용 중인 deployment revision이 있을 때 백엔드 동작 (cascade vs 거절)
160+
161+
## 출처
162+
163+
- 백엔드 스키마: [`request.py`](https://github.com/lablup/backend.ai/blob/main/src/ai/backend/common/dto/manager/v2/deployment_revision_preset/request.py), [`revision_preset.py`](https://github.com/lablup/backend.ai/blob/main/src/ai/backend/manager/api/gql/deployment/types/revision_preset.py)
164+
- 관련 이슈: [BA-5874](https://lablup.atlassian.net/browse/BA-5874)

0 commit comments

Comments
 (0)