<chore>[sdk]: Update sdk for TagPatternInventory resourceType#3385
Open
MatheMatrix wants to merge 11 commits into5.5.6from
Open
<chore>[sdk]: Update sdk for TagPatternInventory resourceType#3385MatheMatrix wants to merge 11 commits into5.5.6from
MatheMatrix wants to merge 11 commits into5.5.6from
Conversation
…isk offering Resolves: ZSTAC-74683 Change-Id: Id0339ed0221e92e506f60745cde972cc3ee6d9ae
When anti-split-brain check selects a disconnected MDS node, the HTTP call now times out after 30s instead of 5+ minutes, and automatically retries the next available MDS via tryNext mechanism. Resolves: ZSTAC-80595 Change-Id: I1be80f1b70cad1606eb38d1f0078c8f2781e6941
When MN restarts during a destroy operation, the hypervisor may report the VM as Stopped. Without this transition, the state machine throws an exception and the VM stays stuck in Destroying state forever. Resolves: ZSTAC-80620 Change-Id: I037edba70d145a44a88ce0d3573089182fedb162
Resolves: ZSTAC-82153 Change-Id: Ib51c2e21553277416d1a9444be55aca2aa4b2fc4
<fix>[vm]: add Destroying->Stopped state transition See merge request zstackio/zstack!9156
<fix>[i18n]: improve snapshot error message for unattached volume See merge request zstackio/zstack!9192
<fix>[zbs]: reduce mds connect timeout and enable tryNext for volume clients See merge request zstackio/zstack!9153
<fix>[vm]: use max of virtual and actual size for root disk allocation See merge request zstackio/zstack!9155
Resolves: ZSTAC-74908 Change-Id: I48054139babb1e8092ab81e4367743ae3fd8aefb
- Add Javadoc: NULL resourceType = universal (backward compatible) - Add resourceType to TagPatternVO_ metamodel and TagPatternInventory - Add groovy integration test (3 scenarios: universal/scoped/combined filter) Resolves: ZSTAC-74908 Change-Id: I6fc05535ae688e50290759f1e129501f0240696c
add resourceType field to TagPatternInventory Resolves: ZSTAC-74908 Change-Id: I34f60a714fa6f6be302d3e15cb8149321a1badc4
概览本PR向标签模式功能添加资源类型过滤支持,包括数据库模式升级、模型层扩展,同时对虚机规格、状态转换和存储控制器进行了调整和测试覆盖。 变更
评估代码审查工作量🎯 3 (中等) | ⏱️ ~25 分钟 诗
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 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.
🧹 Nitpick comments (1)
test/src/test/groovy/org/zstack/test/integration/configuration/systemTag/TagPatternResourceTypeCase.groovy (1)
13-23: 类级 Javadoc 中第 3 点提到了prepareDbInitialValue()回填行为,但测试中未覆盖该场景。注释中提到"Upgraded old AI tags get backfilled with resourceType = 'ModelVO' on next
prepareDbInitialValue()run",但当前测试用例中并没有针对此回填逻辑的验证。建议后续考虑补充该场景的测试,或移除该注释以避免误导。🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/src/test/groovy/org/zstack/test/integration/configuration/systemTag/TagPatternResourceTypeCase.groovy` around lines 13 - 23, The class-level Javadoc claims backfill occurs on the next prepareDbInitialValue() run but the test TagPatternResourceTypeCase does not exercise that; either add a focused test in TagPatternResourceTypeCase that creates legacy TagPatternVO rows with resourceType == null, invokes the code path that triggers prepareDbInitialValue(), then asserts those records receive resourceType == "ModelVO", or remove/clarify the Javadoc line about prepareDbInitialValue() to avoid misleading consumers; reference TagPatternVO, prepareDbInitialValue(), and the TagPatternResourceTypeCase test when making the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@test/src/test/groovy/org/zstack/test/integration/configuration/systemTag/TagPatternResourceTypeCase.groovy`:
- Around line 13-23: The class-level Javadoc claims backfill occurs on the next
prepareDbInitialValue() run but the test TagPatternResourceTypeCase does not
exercise that; either add a focused test in TagPatternResourceTypeCase that
creates legacy TagPatternVO rows with resourceType == null, invokes the code
path that triggers prepareDbInitialValue(), then asserts those records receive
resourceType == "ModelVO", or remove/clarify the Javadoc line about
prepareDbInitialValue() to avoid misleading consumers; reference TagPatternVO,
prepareDbInitialValue(), and the TagPatternResourceTypeCase test when making the
change.
ℹ️ Review info
Configuration used: Path: http://open.zstack.ai:20001/code-reviews/zstack-cloud.yaml (via .coderabbit.yaml)
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
conf/i18n/globalErrorCodeMapping/global-error-en_US.jsonis excluded by!**/*.jsonconf/i18n/globalErrorCodeMapping/global-error-zh_CN.jsonis excluded by!**/*.jsonsdk/src/main/java/org/zstack/sdk/TagPatternInventory.javais excluded by!sdk/**
📒 Files selected for processing (8)
conf/db/upgrade/V5.5.6__schema.sqlheader/src/main/java/org/zstack/header/tag/TagPatternInventory.javaheader/src/main/java/org/zstack/header/tag/TagPatternVO.javaheader/src/main/java/org/zstack/header/tag/TagPatternVO_.javaheader/src/main/java/org/zstack/header/vm/VmInstanceSpec.javaheader/src/main/java/org/zstack/header/vm/VmInstanceState.javaplugin/zbs/src/main/java/org/zstack/storage/zbs/ZbsStorageController.javatest/src/test/groovy/org/zstack/test/integration/configuration/systemTag/TagPatternResourceTypeCase.groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add resourceType field to TagPatternInventory SDK
Resolves: ZSTAC-74908
sync from gitlab !9231