Skip to content

<fix>[ai]: regenerate sdk for unified model cache config API - #4700

Closed
zstack-robot-2 wants to merge 1 commit into
5.5.32from
sync/ye.zou/fix/ZSTAC-87756-unified-switch
Closed

<fix>[ai]: regenerate sdk for unified model cache config API#4700
zstack-robot-2 wants to merge 1 commit into
5.5.32from
sync/ye.zou/fix/ZSTAC-87756-unified-switch

Conversation

@zstack-robot-2

Copy link
Copy Markdown
Collaborator

配套 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

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Could not fetch remote config from http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml: TimeoutError: The operation was aborted due to timeout
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 067def0e-2575-42b1-bd73-bfc54cf9a5b4

📥 Commits

Reviewing files that changed from the base of the PR and between c820160 and 45c694a.

📒 Files selected for processing (3)
  • sdk/src/main/java/org/zstack/sdk/UpdateAiModelCacheGlobalConfigAction.java
  • sdk/src/main/java/org/zstack/sdk/UpdateAiModelCacheGlobalConfigResult.java
  • testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy

Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.


Walkthrough

新增 AI 模型缓存全局配置更新 SDK。该 SDK 支持同步和异步调用,并返回 virtiofsEnabledmodelCacheEnabled。测试辅助类新增对应调用方法和 API 路径跟踪逻辑。

Changes

AI 模型缓存全局配置

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 处理结果
Loading

Poem

我是小兔,抱来新配置,
SDK 轻轻发出 PUT。
缓存开关落在云端,
结果字段闪闪发光。
测试助手同步跟上,
代码森林更整齐。

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning 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
@MatheMatrix
MatheMatrix force-pushed the sync/ye.zou/fix/ZSTAC-87756-unified-switch branch from 45c694a to fa922ab Compare August 20, 2026 14:06
@MatheMatrix

Copy link
Copy Markdown
Owner

Comment from ye.zou:

跨仓 API 变更(premium 新 API + zstack SDK 生成物)按 CI 关联规则必须使用 @@2 同名分支,否则两侧 UTBuild 的 update_sdk 检查互相死锁。关闭本 MR,改用 fix/ZSTAC-87756-unified-switch@@2 重提。

@zstack-robot-2
zstack-robot-2 deleted the sync/ye.zou/fix/ZSTAC-87756-unified-switch branch August 20, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants