<fix>[ai]: regenerate sdk for unified model cache config API - #4700
<fix>[ai]: regenerate sdk for unified model cache config API#4700zstack-robot-2 wants to merge 1 commit into
Conversation
|
Warning
|
| Layer / File(s) | Summary |
|---|---|
SDK 操作与结果契约 sdk/src/main/java/org/zstack/sdk/UpdateAiModelCacheGlobalConfigAction.java, sdk/src/main/java/org/zstack/sdk/UpdateAiModelCacheGlobalConfigResult.java |
新增 UpdateAiModelCacheGlobalConfigAction。该操作使用 PUT 请求更新配置,支持同步和异步调用、会话校验、轮询、错误转换和结果封装。新增结果类并提供两个布尔配置字段。 |
测试辅助方法接入 testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy |
新增 updateAiModelCacheGlobalConfig 方法。该方法配置请求参数和会话 ID,并根据 apipath 选择 API 路径跟踪方式。 |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Merge Risk: ⚪ Minimal · up to 45c69
This PR adds the generated SDK and test helper artifacts for the unified model cache configuration API; no actionable merge-blocking risk remains beyond normal checks and review.
Sequence Diagram(s)
sequenceDiagram
participant Test as ApiHelper
participant SDK as UpdateAiModelCacheGlobalConfigAction
participant API as /ai/model-cache-global-config/actions
Test->>SDK: 配置 enabled 和 sessionId
SDK->>API: PUT 更新 AI 模型缓存全局配置
API-->>SDK: 返回 UpdateAiModelCacheGlobalConfigResult 或错误
SDK-->>Test: 返回 errorOut 处理结果
Poem
我是小兔,抱来新配置,
SDK 轻轻发出 PUT。
缓存开关落在云端,
结果字段闪闪发光。
测试助手同步跟上,
代码森林更整齐。
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | 标题准确说明了为统一模型缓存配置 API 重新生成 SDK 的主要变更。 |
| Description check | ✅ Passed | 描述明确说明了 SDK 和 ApiHelper 生成内容、生成方式及关联任务,与变更内容一致。 |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
sync/ye.zou/fix/ZSTAC-87756-unified-switch
Comment @coderabbitai help to get the list of available commands.
Generated by ./runMavenProfile sdk and ./runMavenProfile apihelper for APIUpdateAiModelCacheGlobalConfigMsg (premium fix/ZSTAC-87756-unified-switch). Resolves: ZSTAC-87756 Change-Id: I42613bd5ec2da3de6de4be6f5c7e3d8dc25cd0c7
45c694a to
fa922ab
Compare
配套 premium !15127(
<fix>[ai]: add unified global model cache config API)的 zstack 侧生成物:sdk/src/main/java/org/zstack/sdk/UpdateAiModelCacheGlobalConfigAction.java/Result.java(./runMavenProfile sdk生成;SourceClassMap.java 零变化,无新 inventory)testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy新增updateAiModelCacheGlobalConfig(./runMavenProfile apihelper生成)避免 premium MR CI 因"sdk 未更新"失败。生成自容器 verify-zstac-87756(zstack 5.5.32 + premium fix/ZSTAC-87756-unified-switch)。
Resolves: ZSTAC-87756
sync from gitlab !10751