Skip to content

Commit c902af9

Browse files
committed
feat(FR-2451): add auto scaling rule management feature spec (#6356)
> [!NOTE] > This is for v26.5.0 Resolves #6357 ([FR-2451](https://lablup.atlassian.net/browse/FR-2451)) ## Summary - Add full-scope draft spec for Auto Scaling Rule management feature - Admin Serving page: Prometheus Query Preset CRUD for superadmins (create/read/update/delete via dedicated tab) - Service detail page: single/range condition mode selector, Prometheus preset-based metric selection, query result preview - Updated to reflect schema changes: - Query APIs are user-accessible (`prometheusQueryPresets`, `prometheusQueryPreset`, `prometheusQueryPresetResult`), mutations remain admin-only - `AutoScalingRule.queryPreset: QueryDefinition` field added (26.4.3) — enables direct preset resolution without ID roundtrip - `QueryDefinition.category: QueryPresetCategory` field added (26.4.3) — preset grouping in UI dropdowns - New category-related queries/mutations (`prometheusQueryPresetCategories`, `adminCreatePrometheusQueryPresetCategory`, etc.) - `QueryDefinition` extended with `description`, `rank`, `categoryId` fields ## Notes - This is the broader draft spec. The reduced, implementation-focused spec is in the parent PR #6486. - **TODO(needs-backend)**: `metric_source` field may need version-based branching once the backend core auto scaling PR lands. ## Spec See \`.specs/draft-auto-scaling-rule-management/spec.md\` [FR-2451]: https://lablup.atlassian.net/browse/FR-2451?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent c68eddb commit c902af9

1 file changed

Lines changed: 60 additions & 121 deletions

File tree

  • .specs/draft-auto-scaling-rule-ux

.specs/draft-auto-scaling-rule-ux/spec.md

Lines changed: 60 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 개요
44

5-
서비스 디테일 페이지의 Auto Scaling Rule 편집/목록 UI를 개선한다. 비교 연산자 표시 방향을 정규화하고, 단일/범위 조건 모드를 추가하며, 백엔드 >=26.4.0에서 Prometheus Query Preset 기반 메트릭 선택을 지원한다.
5+
서비스 디테일 페이지의 Auto Scaling Rule 편집/목록 UI를 개선한다. 비교 연산자 표시 방향을 정규화하고, Scale In / Scale Out / Scale In & Out 세 가지 조건 방향 선택을 추가하며, 백엔드 >=26.4.0에서 Prometheus Query Preset 기반 메트릭 선택을 지원한다.
66

77
## 문제 정의
88

@@ -22,11 +22,11 @@
2222

2323
| 저장된 상태 | 표시 형태 |
2424
|---|---|
25-
| `maxThreshold`만 설정 (상한) | `[metric_name] < [maxThreshold]` |
26-
| `minThreshold`만 설정 (하한) | `[minThreshold] < [metric_name]` |
27-
| 둘 다 설정 (범위) | `[minThreshold] < [metric_name] < [maxThreshold]` |
25+
| `minThreshold`만 설정 (Scale In) | `[metric_name] < [minThreshold]` |
26+
| `maxThreshold`만 설정 (Scale Out) | `[maxThreshold] < [metric_name]` |
27+
| 둘 다 설정 (Scale In & Out) | `[metric_name] < [minThreshold]` + `[maxThreshold] < [metric_name]` (두 줄) |
2828

29-
**Graphene API (<26.4.0)**: `comparator` + 단일 `threshold`로 조건을 표현한다.
29+
**Legacy API (<26.4.0)**: `comparator` + 단일 `threshold`로 조건을 표현한다.
3030

3131
| 저장된 comparator | 표시 형태 |
3232
|---|---|
@@ -35,53 +35,60 @@
3535

3636
에디터 모달의 비교 연산자 드롭다운은 **Legacy 단일 모드에서만** 표시하며, `<` (LESS_THAN)과 `>` (GREATER_THAN) 두 가지만 제공한다. 스키마에는 `LESS_THAN_OR_EQUAL`, `GREATER_THAN_OR_EQUAL`도 존재하지만, UI에서는 사용하지 않는다.
3737

38-
#### 2. 조건 모드 선택 (단일/범위)
38+
#### 2. 조건 모드 선택 (Scale In / Scale Out / Scale In & Out)
3939

40-
Auto Scaling Rule 에디터 모달에 Ant Design `Segmented` 컴포넌트를 추가하여 "단일" / "범위" 모드를 전환한다.
40+
Auto Scaling Rule 에디터 모달에 Ant Design `Radio.Group` (버튼형) 컴포넌트를 추가하여 세 가지 조건 방향을 선택한다. 비교 연산자는 항상 `<` (strict less than)만 사용하며, `` 선택 UI는 제공하지 않는다.
4141

42-
- **단일 모드** (기본): "상한" 또는 "하한" 방향을 선택하고 threshold 값을 입력
43-
- 상한 (`metric < threshold`): `maxThreshold`만 설정, `minThreshold`는 null
44-
- 하한 (`threshold < metric`): `minThreshold`만 설정, `maxThreshold`는 null
45-
- **범위 모드**: `[하한값]` ~ `[상한값]` 범위를 지정 (`minThreshold` + `maxThreshold` 동시 사용)
42+
- **Scale In** (`metric < threshold`): `minThreshold`만 설정, `maxThreshold`는 null
43+
- UI: `Metric < [입력값]`
44+
- **Scale Out** (`threshold < metric`): `maxThreshold`만 설정, `minThreshold`는 null
45+
- UI: `[입력값] < Metric`
46+
- 기본 선택값
47+
- **Scale In & Out** (범위): `minThreshold` + `maxThreshold` 동시 설정
48+
- UI: `Metric < [하한값]` + `[상한값] < Metric` 두 행으로 표시
4649
- 하한값 >= 상한값이면 validation 에러를 표시
4750

48-
> **참고**: Strawberry API (>=26.4.0) 전용. Legacy (<26.4.0)에서는 Graphene `comparator` + 단일 `threshold`를 그대로 사용하며, 범위 모드는 지원하지 않는다.
51+
스텝 사이즈 필드의 prefix 기호는 조건 모드에 따라 자동으로 변경된다:
52+
- Scale In: `` (minus)
53+
- Scale Out: `+` (plus)
54+
- Scale In & Out: `±`
4955

50-
#### 3. Prometheus Preset 기반 메트릭 선택
56+
> **참고**: Strawberry API (>=26.4.0) 전용. Legacy (<26.4.0)에서는 `comparator` + 단일 `threshold`를 그대로 사용하며, Scale In & Out(범위) 모드는 지원하지 않는다.
5157
52-
- `baiClient.supports('prometheus-auto-scaling-rule')` (또는 >=26.4.0 대응 키)로 기능 게이팅
53-
- **>=26.4.0**: `AutoScalingMetricSource.PROMETHEUS`가 추가됨. Condition 영역에서 metric source로 `PROMETHEUS`를 선택하면, `prometheusQueryPresets` 기반 Select로 preset을 선택할 수 있도록 함. Preset 선택 시 `queryTemplate``timeWindow`가 자동 적용되고, `prometheusQueryPresetId`가 Rule에 저장됨
54-
- **<26.4.0**: 기존 방식 유지 (metric source `KERNEL`/`INFERENCE_FRAMEWORK` 선택 + metric name 수동 입력)
58+
#### 3. Prometheus Preset 기반 메트릭 선택
5559

56-
##### Metric Source별 UI 분기 (>=26.4.0 전용)
60+
`baiClient.supports('prometheus-auto-scaling-rule')` (`isSupportPrometheusAutoScalingRule`)로 기능 게이팅한다.
5761

58-
`<26.4.0`에서는 `KERNEL`/`INFERENCE_FRAMEWORK`만 표시되며, `PROMETHEUS`는 노출하지 않는다.
62+
**버전별 metric source 드롭다운 구성:**
5963

60-
| metricSource | Preset 선택 UI | prometheusQueryPresetId | metric name |
64+
| metricSource | `<26.4.0` | `>=26.4.0` | metric name 입력 |
6165
|---|---|---|---|
62-
| `KERNEL` | 숨김 | `null` | AutoComplete (자동완성 목록: `cpu_util`, `mem`, `net_rx`, `net_tx` + 자유 입력 가능) |
63-
| `INFERENCE_FRAMEWORK` | 숨김 | `null` | AutoComplete (자동완성 목록 없음, 자유 입력) |
64-
| `PROMETHEUS` | 표시 (필수) | 필수 | preset의 `metricName`에서 자동 채움 (입력 불필요) |
66+
| `KERNEL` | 표시 | 표시 | AutoComplete (`cpu_util`, `mem`, `net_rx`, `net_tx` + 자유 입력) |
67+
| `INFERENCE_FRAMEWORK` | 표시 | **숨김** | AutoComplete (자유 입력) |
68+
| `PROMETHEUS` | **숨김** | 표시 | preset 선택 시 자동 채움 (숨김 필드) |
69+
70+
`>=26.4.0`에서는 `INFERENCE_FRAMEWORK`가 드롭다운에서 제거되고 `KERNEL` / `PROMETHEUS` 두 가지만 표시된다.
6571

6672
##### Preset 선택 UI 동작
6773

6874
1. metric source 드롭다운에서 `PROMETHEUS` 선택 시 Prometheus Query Preset Select가 추가로 노출
69-
2. Preset 목록은 `prometheusQueryPresets` query로 로드하여 `name`을 드롭다운에 표시
75+
2. Preset 목록은 `prometheusQueryPresets` query로 로드하여 `rank` 오름차순으로 정렬한 뒤, 카테고리가 있는 항목은 `category.name`으로 그룹핑하고, 카테고리 없는 항목은 그룹 뒤에 평탄하게 나열한다
7076
3. Preset 선택 시:
7177
- `prometheusQueryPresetId`에 선택된 preset의 UUID 저장 (Relay global ID를 디코딩한 raw UUID)
72-
- `metricName`은 preset의 `metricName`에서 자동으로 채움 (사용자 입력 불필요)
73-
- `queryTemplate`을 읽기 전용으로 표시하여 사용자가 쿼리 내용 확인 가능
74-
- `timeWindow`가 자동 적용 (preset의 `timeWindow`가 null이면 사용자 입력)
78+
- `metricName`은 preset의 `metricName`에서 자동으로 채움 (사용자 입력 불필요, 숨김 필드)
79+
- `timeWindow`가 자동 적용 (preset의 `timeWindow`가 유효한 숫자값이면 적용, null이면 기존값 유지)
7580

7681
##### Rule 목록에서 Prometheus preset 표시
7782

78-
`metricSource``PROMETHEUS`인 rule은 목록에서 preset 이름을 표시한다. `prometheusQueryPresetId``prometheusQueryPreset(id)` query를 호출하거나, preset 목록을 한 번 로드하여 클라이언트 사이드에서 매칭한다.
83+
`metricSource``PROMETHEUS`인 rule은 목록에서 metric name 대신 preset 이름을 표시한다. 구현 방식: `prometheusQueryPresets` 쿼리로 전체 preset 목록을 로드한 뒤 `(raw UUID → name)` 맵을 만들고, rule의 `prometheusQueryPresetId`로 이름을 조회한다. 조회 실패 시 `metricName`을 fallback으로 표시한다.
84+
85+
> **참고**: `AutoScalingRule.queryPreset` 필드(>=26.4.3)가 스키마에 존재하지만, 현재 구현에서는 사용하지 않고 별도 쿼리 맵 방식을 사용한다.
7986
8087
##### Rule 수정 시 주의사항
8188

8289
- `updateAutoScalingRule`은 partial update — 변경할 필드만 전달
8390
- `prometheusQueryPresetId: null`은 "미변경"(UNSET) 의미이며, 명시적으로 null로 설정할 수 없음
84-
- `metricSource``KERNEL`로 변경해도 `prometheusQueryPresetId`가 자동 클리어되지 않음 — UI에서 `KERNEL`/`INFERENCE_FRAMEWORK` 때 preset 필드를 숨기는 것으로 처리
91+
- `metricSource``KERNEL`로 변경해도 `prometheusQueryPresetId`가 자동 클리어되지 않음 — UI에서 `PROMETHEUS`가 아닐 때 preset 필드를 숨기는 것으로 처리
8592

8693
### 선택 (Nice to Have)
8794

@@ -91,136 +98,68 @@ Prometheus Preset 모드(>=26.4.0)에서 메트릭 설정 form item의 `extra`
9198

9299
- `timeRange` 없이 instant query로 호출하여 현재 값 1개를 표시
93100
- 로딩 스피너 → 결과값 텍스트 + 새로고침 아이콘 버튼
94-
- `options` 파라미터(`ExecuteQueryDefinitionOptionsInput`)로 `filterLabels`/`groupLabels` 전달
95-
- `groupLabels`는 빈 배열 `[]`이라도 반드시 전달해야 함 (생략 시 validation error)
96-
- `filterLabels``key`는 preset의 `options.filterLabels`에 정의된 것만 허용됨
101+
- `options` 파라미터(`ExecuteQueryDefinitionOptionsInput`)로 `filterLabels: []`, `groupLabels: []`를 고정 전달 (현재 구현은 빈 배열 고정, 동적 레이블 필터링은 미지원)
97102
- range query (시계열 차트)는 이번 범위에 포함하지 않음
98103

99104
## 인수 조건 (Acceptance Criteria)
100105

101106
**공통 (양쪽 모두)**
102107
- [ ] Rules 목록 테이블에서 모든 조건이 `<` 방향으로 통일되어 표시된다
103108

104-
**Legacy (<26.4.0, Graphene)**
109+
**Legacy (<26.4.0)**
105110
- [ ] GREATER_THAN으로 저장된 Rule은 threshold와 metric_name이 교환되어 `[threshold] < [metric]`로 표시된다
106111
- [ ] 에디터 모달에서 비교 연산자 드롭다운(`<`, `>`)과 단일 threshold 입력이 동작한다
107112
- [ ] 기존 KERNEL/INFERENCE_FRAMEWORK metric source 수동 입력이 동작한다
108113

109114
**Strawberry (>=26.4.0)**
110-
- [ ] 에디터 모달에서 Segmented로 "단일"/"범위" 모드를 전환할 수 있다
111-
- [ ] 단일 모드에서 "상한"(`maxThreshold`만) 또는 "하한"(`minThreshold`만) 방향을 선택할 수 있다
112-
- [ ] 범위 모드에서 `minThreshold` + `maxThreshold`를 동시에 입력하고, `[min] < [metric] < [max]`로 표시된다
113-
- [ ] 범위 모드에서 하한값 >= 상한값이면 validation 에러가 표시된다
114-
- [ ] metric source에 `PROMETHEUS` 옵션이 추가되고, 선택 시 Prometheus Preset Select가 표시된다
115-
- [ ] Prometheus preset 선택 시 `metricName`이 자동으로 채워지고, `queryTemplate`이 읽기 전용으로 표시된다
115+
- [ ] 에디터 모달에서 Radio.Group 버튼으로 "Scale In" / "Scale Out" / "Scale In & Out" 세 가지 조건 방향을 선택할 수 있다
116+
- [ ] Scale In 선택 시 `minThreshold`만 설정되고, `Metric < [값]` UI가 표시된다
117+
- [ ] Scale Out 선택 시 `maxThreshold`만 설정되고, `[값] < Metric` UI가 표시된다 (기본값)
118+
- [ ] Scale In & Out 선택 시 `minThreshold` + `maxThreshold`를 동시에 입력하고, 두 행으로 표시된다
119+
- [ ] Scale In & Out 모드에서 하한값 >= 상한값이면 validation 에러가 표시된다
120+
- [ ] Step Size 필드의 prefix가 조건 모드에 따라 ``/`+`/`±`로 자동 변경된다
121+
- [ ] metric source 드롭다운에 `KERNEL``PROMETHEUS`만 표시된다 (`INFERENCE_FRAMEWORK` 숨김)
122+
- [ ] metric source에 `PROMETHEUS` 선택 시 Prometheus Preset Select가 표시된다
123+
- [ ] Prometheus preset 선택 시 `metricName`이 자동으로 채워진다 (숨김 필드)
116124
- [ ] Prometheus preset 선택 시 `prometheusQueryPresetId` (raw UUID)가 Rule에 저장된다
117-
- [ ] `KERNEL`/`INFERENCE_FRAMEWORK` 선택 시 preset 선택 UI가 숨겨진다
125+
- [ ] `KERNEL` 선택 시 preset 선택 UI가 숨겨진다
118126
- [ ] Rule 목록에서 `PROMETHEUS` source인 rule은 preset 이름이 표시된다
119127
- [ ] Rule 목록은 `ModelDeployment.autoScalingRules` nested connection으로 조회된다
120128

121129
## 버전 게이팅 전략
122130

123-
| 기능 | <26.4.0 (Legacy) | >=26.4.0 (Strawberry) |
124-
|---|---|---|
125-
| 비교 연산자 표시 정규화 | 적용 (LESS_THAN/GREATER_THAN 반전) | 적용 (min/maxThreshold 기반) |
126-
| 조건 모드 (단일/범위) | 단일만 지원 (Graphene에 범위 필드 없음) | 단일 + 범위 모두 지원 |
127-
| Metric Source: PROMETHEUS | 미표시 (KERNEL/INFERENCE_FRAMEWORK만) | PROMETHEUS 추가, Preset 기반 Select |
128-
| 쿼리 결과값 미리보기 | 미표시 | 표시 (Nice to Have) |
131+
| 기능 | <26.4.0 (Legacy) | >=26.4.0 (Strawberry) | >=26.4.3 |
132+
|---|---|---|---|
133+
| 비교 연산자 표시 정규화 | 적용 (LESS_THAN/GREATER_THAN 반전) | 적용 (min/maxThreshold 기반, 항상 `<`) | 동일 |
134+
| 조건 모드 UI | 단일만 지원 (Legacy에 범위 필드 없음) | Radio.Group 3-way: Scale In / Scale Out / Scale In & Out | 동일 |
135+
| Metric Source: INFERENCE_FRAMEWORK | 표시 | 숨김 (`isSupportPrometheusAutoScalingRule`) | 동일 |
136+
| Metric Source: PROMETHEUS | 미표시 | 추가, Preset 기반 Select (카테고리별 그룹핑) | 동일 |
137+
| Step Size prefix | 없음 | ``/`+`/`±` (조건 모드 연동) | 동일 |
138+
| Rule 목록 preset 이름 표시 | 미표시 | `prometheusQueryPresets` 별도 쿼리 맵 기반 | 동일 (`queryPreset` 필드 미사용) |
139+
| 쿼리 결과값 미리보기 | 미표시 | 표시 (Nice to Have) | 동일 |
129140

130141
## 구현 전략: 파일 분리
131142

132-
Strawberry API 마이그레이션과 UX 개선을 동시에 진행하므로, 기존 Graphene 기반 컴포넌트를 legacy로 이동하고 새 파일을 정식 이름으로 생성한다.
143+
Strawberry API 마이그레이션과 UX 개선을 동시에 진행하므로, 기존 Legacy 기반 컴포넌트를 legacy로 이동하고 새 파일을 정식 이름으로 생성한다.
133144

134145
### 파일 구조
135146

136147
| 파일 | API | 설명 |
137148
|---|---|---|
138149
| `AutoScalingRuleEditorModal.tsx` | Strawberry (>=26.4.0) | **신규**. 범위 모드, Prometheus preset, 정규화 포함 |
139-
| `AutoScalingRuleEditorModalLegacy.tsx` | Graphene (<26.4.0) | **기존 파일 rename**. 비교 연산자 정규화만 적용 |
150+
| `AutoScalingRuleEditorModalLegacy.tsx` | Legacy (<26.4.0) | **기존 파일 rename**. 비교 연산자 정규화만 적용 |
140151
| `AutoScalingRuleList.tsx` | Strawberry (>=26.4.0) | **신규**. EndpointDetailPage에서 추출. 정규화된 조건 표시, 범위 표시 포함 |
141-
| `AutoScalingRuleListLegacy.tsx` | Graphene (<26.4.0) | **EndpointDetailPage에서 추출**. 비교 연산자 정규화만 적용 |
152+
| `AutoScalingRuleListLegacy.tsx` | Legacy (<26.4.0) | **EndpointDetailPage에서 추출**. 비교 연산자 정규화만 적용 |
142153

143154
### 분기 방식
144155

145156
`EndpointDetailPage.tsx`에서 `baiClient.supports('prometheus-auto-scaling-rule')` (또는 대응 키)로 분기:
146157
- **>=26.4.0**: `AutoScalingRuleList` + `AutoScalingRuleEditorModal` (Strawberry query/mutation)
147-
- **<26.4.0**: `AutoScalingRuleListLegacy` + `AutoScalingRuleEditorModalLegacy` (Graphene query/mutation)
158+
- **<26.4.0**: `AutoScalingRuleListLegacy` + `AutoScalingRuleEditorModalLegacy` (Legacy query/mutation)
148159

149160
### Strawberry 마이그레이션 범위
150161

151162
이 spec에서 함께 처리하는 마이그레이션 항목:
152163
- Query: `endpoint_auto_scaling_rule_nodes(endpoint)``ModelDeployment.autoScalingRules` (nested connection)
153164
- Mutation: `create_endpoint_auto_scaling_rule_node``createAutoScalingRule`, `modify_endpoint_auto_scaling_rule_node``updateAutoScalingRule`, `delete_endpoint_auto_scaling_rule_node``deleteAutoScalingRule`
154165
- 필드: snake_case → camelCase, `threshold`+`comparator``minThreshold`/`maxThreshold`, `cooldown_seconds``timeWindow`, `endpoint``modelDeploymentId`
155-
156-
## 참조
157-
158-
### 현재 코드
159-
160-
| 파일 | 설명 |
161-
|---|---|
162-
| `react/src/components/AutoScalingRuleEditorModal.tsx` | 기존 Rule 추가/편집 모달 (Graphene). rename → `AutoScalingRuleEditorModalLegacy.tsx` |
163-
| `react/src/pages/EndpointDetailPage.tsx` | Rules 목록 테이블 (line 697-926), `baiClient.supports('auto-scaling-rule')` (line 170) |
164-
165-
### GraphQL API
166-
167-
#### Auto Scaling Rule (Strawberry, >=26.4.0)
168-
169-
| 쿼리/뮤테이션 | 설명 |
170-
|---|---|
171-
| `ModelDeployment.autoScalingRules(filter, orderBy, ...)` | Rule 목록 조회 — `ModelDeployment` type의 nested connection |
172-
| `createAutoScalingRule(input: CreateAutoScalingRuleInput!)` | Rule 생성 (`modelDeploymentId` 필수) |
173-
| `updateAutoScalingRule(input: UpdateAutoScalingRuleInput!)` | Rule 수정 (partial update) |
174-
| `deleteAutoScalingRule(input: DeleteAutoScalingRuleInput!)` | Rule 삭제 |
175-
176-
#### Prometheus Query Preset (Read only, 모든 인증된 사용자)
177-
178-
| 쿼리 | 설명 |
179-
|---|---|
180-
| `prometheusQueryPresets(filter, orderBy, limit, offset)` | Preset 목록 조회 |
181-
| `prometheusQueryPreset(id: ID!)` | Preset 단건 조회 |
182-
| `prometheusQueryPresetResult(id, timeRange, options, timeWindow)` | Preset 기반 쿼리 실행 결과 (Nice to Have) |
183-
184-
#### ID 변환 주의사항
185-
186-
- Preset 목록 조회 (`prometheusQueryPresets`) 응답의 `id`는 Relay global ID (base64 인코딩)
187-
- Rule 생성/수정 시 `prometheusQueryPresetId`에는 `toLocalId(globalId)`로 디코딩한 raw UUID를 전달
188-
- Rule 조회 응답의 `prometheusQueryPresetId`는 raw UUID로 반환됨
189-
- Preset 목록의 Relay global ID에서 `toLocalId()`로 변환한 값과 매칭하여 preset 정보를 표시
190-
191-
### 주요 타입 (스키마 기준)
192-
193-
#### AutoScalingMetricComparator (enum)
194-
`LESS_THAN`, `LESS_THAN_OR_EQUAL`, `GREATER_THAN`, `GREATER_THAN_OR_EQUAL`
195-
196-
#### AutoScalingMetricSource (enum)
197-
`KERNEL`, `INFERENCE_FRAMEWORK`, `PROMETHEUS` (PROMETHEUS는 >=26.4.0)
198-
199-
#### AutoScalingRule (type, added 25.19.0)
200-
`id`, `metricSource`, `metricName`, `minThreshold: Decimal`, `maxThreshold: Decimal`, `stepSize`, `timeWindow`, `minReplicas`, `maxReplicas`, `prometheusQueryPresetId: ID` (added 26.4.1), `createdAt`, `lastTriggeredAt`
201-
202-
#### CreateAutoScalingRuleInput
203-
`modelDeploymentId: ID!`, `metricSource: AutoScalingMetricSource!`, `metricName: String!`, `minThreshold: Decimal`, `maxThreshold: Decimal`, `stepSize: Int!`, `timeWindow: Int!`, `minReplicas: Int`, `maxReplicas: Int`, `prometheusQueryPresetId: ID`
204-
205-
#### UpdateAutoScalingRuleInput
206-
`id: ID!`, `metricSource`, `metricName`, `minThreshold`, `maxThreshold`, `stepSize`, `timeWindow`, `minReplicas`, `maxReplicas`, `prometheusQueryPresetId: ID`
207-
208-
#### QueryDefinition (type, added 26.3.0)
209-
`id`, `name`, `metricName`, `queryTemplate`, `timeWindow: String`, `options: QueryDefinitionOptions!` (`filterLabels: [String!]!`, `groupLabels: [String!]!`), `createdAt`, `updatedAt`
210-
211-
#### QueryDefinitionExecuteResult (type, added 26.3.0)
212-
`status: String!`, `resultType: String!`, `result: [QueryDefinitionMetricResult!]!`
213-
- **QueryDefinitionMetricResult**: `metric: [MetricLabelEntry!]!`, `values: [QueryDefinitionMetricResultValue!]!`
214-
- **QueryDefinitionMetricResultValue**: `timestamp: Float!`, `value: String!`
215-
216-
#### ExecuteQueryDefinitionOptionsInput
217-
`filterLabels: [MetricLabelEntryInput!]`, `groupLabels: [String!]`
218-
219-
#### QueryTimeRangeInput (added 26.3.0)
220-
`start: DateTime!`, `end: DateTime!`, `step: String!`
221-
222-
## 범위 외 (Out of Scope)
223-
224-
- Admin Prometheus Query Preset CUD (`adminCreatePrometheusQueryPreset`, `adminModifyPrometheusQueryPreset`, `adminDeletePrometheusQueryPreset`) — 별도 Spec
225-
- Auto Scaling Rule CRUD 자체 (이미 구현됨, 이 spec에서는 Strawberry API로 마이그레이션)
226-
- Graphene legacy 코드 완전 제거 (백엔드 최소 버전 올린 후 별도 진행)

0 commit comments

Comments
 (0)