Skip to content

<fix>[sdk]: add shareType field to GPU query APIs#3614

Open
zstack-robot-1 wants to merge 1 commit into5.5.12from
sync/zhong.xian/fix/ZSTAC-82599@@2
Open

<fix>[sdk]: add shareType field to GPU query APIs#3614
zstack-robot-1 wants to merge 1 commit into5.5.12from
sync/zhong.xian/fix/ZSTAC-82599@@2

Conversation

@zstack-robot-1
Copy link
Copy Markdown
Collaborator

Resolves: ZSTAC-82599

Change-Id: I7576776a706d6571756e727165776163736e676b

sync from gitlab !9475

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)

Review profile: CHILL

Plan: Pro

Run ID: bb7a154b-66e2-4f6f-8a9e-e2f260134d16

📥 Commits

Reviewing files that changed from the base of the PR and between 0399f4b and cf32ef0.

⛔ Files ignored due to path filters (4)
  • sdk/src/main/java/org/zstack/sdk/MdevDeviceInventory.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/MdevDeviceSpecInventory.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/PciDeviceInventory.java is excluded by !sdk/**
  • sdk/src/main/java/org/zstack/sdk/PciDeviceSpecInventory.java is excluded by !sdk/**
📒 Files selected for processing (1)
  • testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy
🚧 Files skipped from review as they are similar to previous changes (1)
  • testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy

Walkthrough

三个 BareMetal2 相关的 ApiHelper DSL 方法的实现体被重排,使得每个方法现在实例化并委托给与方法名一致的 org.zstack.sdk.*Action 类;跟踪 apipath 的控制流和返回行为未改变,只有少量空白格式调整。

Changes

Cohort / File(s) Summary
BareMetal2 方法重排
testlib/src/main/java/org/zstack/testlib/ApiHelper.groovy
调整 addBareMetal2GatewayaddBareMetal2DpuChassisaddBareMetal2IpmiChassis 三个 DSL 方法的实现体,使每个方法实例化并使用与其注解类型一致的 org.zstack.sdk.AddBareMetal2*Action 类;保留原有会话、closure 委托、apiId 默认与 ApiPathTracker 逻辑,仅有轻微空白变更。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

诗歌

🐰✨
方法换了舞伴,尾巴轻轻摆,
Gateway、Dpu、Ipmi 各就各位来,
代码里跳步,逻辑仍然在,
小小重排,秩序更分明,
我啃萝卜庆贺,笑得耳朵开!


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
Title check ❌ Error 拉取请求标题与实际变更内容不符。标题声称添加 GPU 查询 API 的 shareType 字段,但实际变更是修复 ApiHelper.groovy 中三个 BareMetal2* 方法的实现错误。 应修改标题以反映实际变更:例如 '[testlib]: Fix BareMetal2 method implementations' 或类似描述正确的变更内容的标题。
Description check ⚠️ Warning 拉取请求描述与实际代码变更内容没有直接关系。描述仅包含问题编号和同步信息,未说明实际的 API Helper 方法修复内容。 应在描述中添加具体的变更说明,解释为什么需要修复这些方法以及修复的内容,确保描述与代码变更保持一致。
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/zhong.xian/fix/ZSTAC-82599@@2

Comment @coderabbitai help to get the list of available commands and usage tips.

@ZStack-Robot
Copy link
Copy Markdown
Collaborator

Comment from ye.zou:

Code Review: ZSTAC-82599 (R1)

进度: 0/10 resolved (0%)

完整 review 见: http://dev.zstack.io:9080/zstackio/premium/-/merge_requests/13343

Resolves: ZSTAC-82599

Change-Id: I7576776a706d6571756e727165776163736e676b
@MatheMatrix MatheMatrix force-pushed the sync/zhong.xian/fix/ZSTAC-82599@@2 branch from 0399f4b to cf32ef0 Compare April 2, 2026 03:02
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.

2 participants