Skip to content

<fix>[baremetal2]: ZSTAC-87803 add DPU network validation error codes - #4705

Open
ZStack-Robot wants to merge 1 commit into
feature-5.5.38-dpu2from
sync/xiangheng.zhao/fix/feature-5.5.38-dpu2/ZSTAC-87803@@2
Open

<fix>[baremetal2]: ZSTAC-87803 add DPU network validation error codes#4705
ZStack-Robot wants to merge 1 commit into
feature-5.5.38-dpu2from
sync/xiangheng.zhao/fix/feature-5.5.38-dpu2/ZSTAC-87803@@2

Conversation

@ZStack-Robot

Copy link
Copy Markdown
Collaborator

Root Cause:
Baremetal2 DPU network parameter validation reuses an IP-version-specific error code for invalid parameter combinations, missing L3 networks, and network parameters unsupported by non-DPU chassis, producing incorrect error semantics and translations.

Solution:
Add dedicated error codes for invalid DPU network parameter combinations, nonexistent L3 networks, and unsupported create-network parameters, with mappings for all supported languages.

Test:
Not run as requested. Verified all mapping files parse successfully, each new code is present in all ten language files, no duplicate constants exist, and git diff --check passes.

Resolves: ZSTAC-87803

Change-Id: I256bbd56d6374f1d7d9b753b5192adc24dbe38aa

sync from gitlab !10756

Root Cause:
Baremetal2 DPU network parameter validation reuses an IP-version-specific error code for invalid parameter combinations, missing L3 networks, and network parameters unsupported by non-DPU chassis, producing incorrect error semantics and translations.

Solution:
Add dedicated error codes for invalid DPU network parameter combinations, nonexistent L3 networks, and unsupported create-network parameters, with mappings for all supported languages.

Test:
Not run as requested. Verified all mapping files parse successfully, each new code is present in all ten language files, no duplicate constants exist, and git diff --check passes.

Resolves: ZSTAC-87803

Change-Id: I256bbd56d6374f1d7d9b753b5192adc24dbe38aa
@coderabbitai

coderabbitai Bot commented Aug 21, 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: 3bfd3823-7238-45d5-a2fc-f59724d31b29

📥 Commits

Reviewing files that changed from the base of the PR and between bf84e53 and 7e3423b.

⛔ Files ignored due to path filters (10)
  • conf/i18n/globalErrorCodeMapping/global-error-de-DE.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-en_US.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-fr-FR.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-id-ID.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-ja-JP.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-ko-KR.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-ru-RU.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-th-TH.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-zh_CN.json is excluded by !**/*.json
  • conf/i18n/globalErrorCodeMapping/global-error-zh_TW.json is excluded by !**/*.json
📒 Files selected for processing (1)
  • utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java

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


Walkthrough

本次变更在 CloudOperationsErrorCode 中新增三个 BareMetal2 实例错误码常量,编号为 100991010010101

Changes

BareMetal2 错误码

Layer / File(s) Summary
错误码常量声明
utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java
新增三个 BareMetal2 实例错误码 public 字符串常量。

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 7e342

This PR adds dedicated DPU network validation error codes and localized messages without any identified merge-blocking correctness or production risk; it is merge-ready after normal checks and review.

Suggested reviewers: ruansteve

Poem

我是兔子,蹦过代码田,
三枚错误码排成线。
10099、10100、10101,
BareMetal2 更齐全。
胡萝卜旁,测试安眠。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题清晰说明了新增 Baremetal2 DPU 网络校验错误码的主要变更,并包含关联问题编号。
Description check ✅ Passed 描述说明了根因、解决方案、语言映射验证结果和测试状态,与变更内容直接相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 too large.)
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sync/xiangheng.zhao/fix/feature-5.5.38-dpu2/ZSTAC-87803@@2

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.45.1)
utils/src/main/java/org/zstack/utils/clouderrorcode/CloudOperationsErrorCode.java

ast-grep timed out on this file


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

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.

1 participant