<fix>[sdk,db]: add PodInventory request fields#3811
<fix>[sdk,db]: add PodInventory request fields#3811zstack-robot-2 wants to merge 1 commit into5.5.16from
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml) Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
Walkthrough向 Changes
Sequence Diagram(s)(无) 代码审查工作量评估🎯 2 (Simple) | ⏱️ ~12 分钟 诗歌
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@conf/db/upgrade/V5.5.16__schema.sql`:
- Around line 352-355: The UPDATE currently overwrites existing columns when
only one side is NULL; modify the PodVO/ VmInstanceVO update to only fill NULL
fields by using per-column COALESCE/IFNULL semantics (e.g., set p.requestCpu =
COALESCE(p.requestCpu, v.cpuNum) and p.requestMemory = COALESCE(p.requestMemory,
v.memorySize)) and keep the WHERE checking p.requestCpu IS NULL OR
p.requestMemory IS NULL so the statement is idempotent and won’t overwrite
non-NULL values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ 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: e6e0a7a3-277c-4bd7-b407-c9cfdea2509b
⛔ Files ignored due to path filters (1)
sdk/src/main/java/org/zstack/sdk/PodInventory.javais excluded by!sdk/**
📒 Files selected for processing (1)
conf/db/upgrade/V5.5.16__schema.sql
|
Comment from zhong.xian: Code Review本 MR 与 premium
结论: BLOCK 🚫 回归风险: 中高
必修项:
建议项:
其它(没问题的地方不展开):
|
cc25c39 to
e8b3e06
Compare
Expose requestCpu/requestMemory on the generated PodInventory so SDK callers can deserialize the fields returned by ZQL. Upgrade script adds matching columns on PodVO and backfills existing pods with request=limit for legacy-equivalent behaviour. Resolves: ZSTAC-80103 Change-Id: I5b2a9d4e8c6f3b7a1d0e9c5b4a8f2d7e6c1b3a9f
e8b3e06 to
3696498
Compare
|
Comment from ye.zou: Code Review配套审了 premium 本 MR 主要补了:
本轮没看到阻塞合入的问题。 结论: APPROVE ✅ 说明:
测试:
T7/commit-split: 通过,当前 MR 变更边界清晰 |
Expose requestCpu/requestMemory on the generated PodInventory so
SDK callers can deserialize the fields returned by ZQL.
Upgrade script adds matching columns on PodVO and backfills
existing pods with request=limit for legacy-equivalent behaviour.
Resolves: ZSTAC-80103
Change-Id: I5b2a9d4e8c6f3b7a1d0e9c5b4a8f2d7e6c1b3a9f
sync from gitlab !9682