Skip to content

Conversation

ZStack-Robot
Copy link
Collaborator

Resolves: ZSV-9789

Change-Id: I74656b756a74716e6a697a6875766c766e73766e

sync from gitlab !8395

Resolves: ZSV-9789

Change-Id: I74656b756a74716e6a697a6875766c766e73766e
Copy link

coderabbitai bot commented Sep 11, 2025

Walkthrough

本次变更在卷实例化流程中补充根卷系统标签的传递;新增 EphemeralPatternSystemTag 类;调整 TagManagerImpl 初始化流程以专门处理 EphemeralPatternSystemTag,并在初始化时去除前缀后重建并替换原字段。

Changes

Cohort / File(s) Change Summary
卷实例化系统标签传播
storage/src/main/java/org/zstack/storage/volume/InstantiateVolumeForNewCreatedVmExtension.java
在根卷创建的两条路径(基于模板与默认路径)中,将 VM 规格中的根卷系统标签设置到相应的 InstantiateRootVolumeMsg/InstantiateVolumeMsg,上队列前携带系统标签。
新增:EphemeralPatternSystemTag
tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java
新增公开类 EphemeralPatternSystemTag,继承 PatternedSystemTag;构造时为 tagFormat 增加“ephemeral”前缀;提供获取去除前缀的原始格式方法。
系统标签初始化流程调整
tag/src/main/java/org/zstack/tag/TagManagerImpl.java
在 initSystemTags 中新增对 EphemeralPatternSystemTag 的优先分支:以去前缀后的格式与原资源类重建实例,复制校验器,替换静态字段并加入注册列表;该分支置于 PatternedSystemTag 分支之前。

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Orchestrator as VM创建编排
  participant Ext as InstantiateVolumeForNewCreatedVmExtension
  participant Bus as MessageBus
  participant Storage as StorageService

  Orchestrator->>Ext: 准备根卷实例化
  alt RootVolumeTemplate 路径
    Ext->>Bus: InstantiateRootVolumeMsg(含模板与systemTags)
  else 默认根卷路径
    Ext->>Bus: InstantiateVolumeMsg(含systemTags)
  end
  Bus->>Storage: 分发实例化消息
  Storage-->>Bus: 完成/失败响应
  Bus-->>Ext: 返回结果
Loading
sequenceDiagram
  autonumber
  participant TM as TagManagerImpl
  participant Fields as 静态系统标签字段
  participant Registry as systemTags 列表

  TM->>Fields: 反射读取字段
  alt 字段类型为 EphemeralPatternSystemTag
    TM->>TM: 去除前缀获取原始tagFormat
    TM->>Fields: 用新 EphemeralPatternSystemTag 替换原字段
    TM->>Registry: 注册替换后的实例
  else 字段类型为 PatternedSystemTag
    TM->>Registry: 注册 PatternedSystemTag
  else 字段类型为 EphemeralSystemTag / SystemTag
    TM->>Registry: 常规注册
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks (1 passed, 2 warnings)

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title Check ⚠️ Warning PR 标题 “[fix][storage]: support specifying the initial size of LV” 与变更摘要不匹配;实际代码变更主要是将 VM 规格的 root-volume 系统标签传递到卷实例化消息以及新增 EphemeralPatternSystemTag 并在 TagManagerImpl 中处理该类型,而不是“支持指定 LV 初始大小”。因此该标题容易误导审阅者并不能准确反映本次变更的核心目的。基于上述不一致性,标题检查未通过。 建议把标题改为能够直接反映主要改动,例如 “[storage]: 在卷实例化时传递 root-volume 系统标签并新增 EphemeralPatternSystemTag”。保持标题简短聚焦主变更,避免列出文件、使用模糊词或与实际修改无关的功能描述。如需关联工单,可在 PR 描述中保留 ZSV-9789 以便追踪。
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed 当前 PR 描述仅包含关联工单号、Change-Id 和“sync from gitlab”说明,虽然非常简短但并未完全脱离本次提交(表明了来源与关联工单),因此按本检查的宽松标准认为描述与变更存在关联并通过检查。描述的详细程度不足以替代变更摘要或变更说明,但不属于完全无关或完全离题。

Poem

我把标签揣进根卷包,轻轻跳
临时前缀拨开云雾,格式乖巧
管理器换新衣,字段亮相笑
消息排成队,存储听号召
代码田里风一吹——胡萝卜更好找 🥕✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sync/tao.gan/fff-4.10.17-ZSV-9789@@2

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
storage/src/main/java/org/zstack/storage/volume/InstantiateVolumeForNewCreatedVmExtension.java (1)

214-217: 默认根卷路径也设置 systemTags:一致性 OK

两条根卷分支现已对齐,便于后端读取标签驱动初始化逻辑。为健壮性,可考虑在 set 前做空列表回退(避免下游 NPE):

-            rmsg.setSystemTags(spec.getRootVolumeSystemTags());
+            rmsg.setSystemTags(Optional.ofNullable(spec.getRootVolumeSystemTags()).orElse(Collections.emptyList()));
tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java (2)

10-12: 去前缀操作缺少前置校验,建议断言或回退

若 tagFormat 未包含前缀会产生错误截断。加一道断言更安全。

-    public String getTagFormatWithoutEphemeralPrefix() {
-        return tagFormat.substring(String.format("%s::", TagConstant.EPHEMERAL_TAG_PREFIX).length());
-    }
+    public String getTagFormatWithoutEphemeralPrefix() {
+        String prefix = String.format("%s::", TagConstant.EPHEMERAL_TAG_PREFIX);
+        // 亦可改为返回原值:return tagFormat.startsWith(prefix) ? tagFormat.substring(prefix.length()) : tagFormat;
+        DebugUtils.Assert(tagFormat.startsWith(prefix),
+                String.format("EphemeralPatternSystemTag tagFormat[%s] must start with prefix[%s]", tagFormat, prefix));
+        return tagFormat.substring(prefix.length());
+    }

如需避免新依赖,可将断言替换为 startsWith 判定的安全回退。


6-7: 构造函数签名与既有约定不一致,请确认设计

先前约定的实现仅接收 tagFormat,并固定 resourceClass=SystemTagVO.class。本实现允许自定义 resourceClass,行为更灵活,但与既有约定不一致。请确认这是一项明确的设计调整,并评估对基于 resourceType 的匹配与校验路径的影响。

需要我帮助全仓扫描调用点并给出影响面清单吗?

tag/src/main/java/org/zstack/tag/TagManagerImpl.java (1)

98-104: 与 EphemeralPatternSystemTag 的 resourceClass 语义需统一

此处以 stag.getResourceClass() 构造新实例;若最终决定“短暂模式标签统一使用 SystemTagVO.class”,这里应改为固定类型以避免按资源类型拆分匹配/校验路径的差异。请与前述类的设计选择保持一致。

- EphemeralPatternSystemTag ptag = new EphemeralPatternSystemTag(((EphemeralPatternSystemTag) stag).getTagFormatWithoutEphemeralPrefix(), stag.getResourceClass());
+ EphemeralPatternSystemTag ptag = new EphemeralPatternSystemTag(
+         ((EphemeralPatternSystemTag) stag).getTagFormatWithoutEphemeralPrefix(),
+         /* 若确认走统一类型策略则替换为 */ SystemTagVO.class /* 或保留现状以资源类型区分 */
+ );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ffddc29 and 8628d6a.

📒 Files selected for processing (3)
  • storage/src/main/java/org/zstack/storage/volume/InstantiateVolumeForNewCreatedVmExtension.java (1 hunks)
  • tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java (1 hunks)
  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.java

⚙️ CodeRabbit configuration file

**/*.java: ## 1. API 设计要求

  • API 命名:
    • API 名称必须唯一,不能重复。
    • API 消息类需要继承 APIMessage;其返回类必须继承 APIReplyAPIEvent,并在注释中用 @RestResponse 进行标注。
    • API 消息上必须添加注解 @RestRequest,并满足如下规范:
      • path:
        • 针对资源使用复数形式。
        • 当 path 中引用消息类变量时,使用 {variableName} 格式。
      • HTTP 方法对应:
        • 查询操作 → HttpMethod.GET
        • 更新操作 → HttpMethod.PUT
        • 创建操作 → HttpMethod.POST
        • 删除操作 → HttpMethod.DELETE
    • API 类需要实现 __example__ 方法以便生成 API 文档,并确保生成对应的 Groovy API Template 与 API Markdown 文件。

2. 命名与格式规范

  • 类名:

    • 使用 UpperCamelCase 风格。
    • 特殊情况:
      • VO/AO/EO 类型类除外。
      • 抽象类采用 AbstractBase 前缀/后缀。
      • 异常类应以 Exception 结尾。
      • 测试类需要以 TestCase 结尾。
  • 方法名、参数名、成员变量和局部变量:

    • 使用 lowerCamelCase 风格。
  • 常量命名:

    • 全部大写,使用下划线分隔单词。
    • 要求表达清楚,避免使用含糊或不准确的名称。
  • 包名:

    • 统一使用小写,使用点分隔符,每个部分应是一个具有自然语义的英文单词(参考 Spring 框架的结构)。
  • 命名细节:

    • 避免在父子类或同一代码块中出现相同名字的成员或局部变量,防止混淆。
    • 命名缩写:
      • 不允许使用不必要的缩写,如:AbsSchedulerJobcondiFu 等。应使用完整单词提升可读性。

3. 编写自解释代码

  • 意图表达:

    • 避免使用布尔型参数造成含义不明确。例如:
      • 对于 stopAgent(boolean ignoreError),建议拆分为不同函数(如 stopAgentIgnoreError()),或使用枚举表达操作类型。
    • 命名应尽量用完整的单词组合表达意图,并在名称中体现数据类型或用途(例如在常量与变量名称中,将类型词放在末尾)。
  • 注释:

    • 代码应尽量做到自解释,对少于两行的说明可以直接写在代码中。
    • 对于较长的注释,需要仔细校对并随代码更新,确保内容正确。
    • 接口方法不应有多余的修饰符(例如 public),且必须配有有效的 Javadoc 注释。

4. 流程控制和结构优化

  • if...else 的使用:

    • 应尽量减少 if...else 结构的使用,建议:
      • 限制嵌套层级最多为两层,且内层不应再出现 else 分支。
      • 尽早返回(Early Return),将条件判断中的处理逻辑提前结束或抽成独立方法。
      • 使用 Java Stream 或 Lambda 表达式代替冗长的循环与条件判断。
  • 条件判断:

    • if 条件表达不宜过长或过于复杂,必要时可以将条件抽成 boolean 变量描述。
  • 代码块长度:

    • 单个 if 代码块不宜超过一屏显示,以提高可读性和后续维护性。

5. 异常处理与日志

  • 捕获异常的原则:
    • 对于可以通过预检查避免的 RuntimeException(如 NullPointerExceptionIndexOutOfBoundsException 等),不建议使用 try-catch 来进行处理。
    • 捕获异常应仅用于处理真正的意外情况,不应将异常逻辑当作正常流程控制。
    • 在必要时,应继续抛出异常,使上层业务处理者可以转换为用户友好的错误提示。
    • 使用 try-with-resources 语法管理资源,确保在 finally 块中正确关闭资源,并避免在 finally 中返回值。
      ...

Files:

  • storage/src/main/java/org/zstack/storage/volume/InstantiateVolumeForNewCreatedVmExtension.java
  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java
  • tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java
🧠 Learnings (7)
📓 Common learnings
Learnt from: MatheMatrix
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:99-105
Timestamp: 2025-09-08T07:48:04.582Z
Learning: EphemeralPatternSystemTag的构造函数故意只接受tagFormat参数,内部硬编码调用super(tagFormat, SystemTagVO.class),这意味着所有EphemeralPatternSystemTag实例都使用SystemTagVO.class作为resourceClass,而不是保留原始的stag.getResourceClass()。
Learnt from: zstack-robot-2
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:301-304
Timestamp: 2025-09-09T07:41:02.167Z
Learning: 在 ZStack 的 TagManagerImpl.createNonInherentSystemTag 方法中,tao.gan 确认使用 TagConstant.isEphemeralTag(tag) 进行短暂标签过滤,以保持与其他相关方法的一致性。
Learnt from: zstack-robot-1
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:340-343
Timestamp: 2025-09-09T07:40:35.148Z
Learning: 在 ZStack 的 TagManagerImpl 中,tao.gan 明确要求在短暂标签过滤的场景中统一使用 TagConstant.isEphemeralTag(tag),包括 createInherentSystemTag、createNonInherentSystemTag 和 createNonInherentSystemTags 等方法,以保持代码一致性。
Learnt from: MatheMatrix
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:845-847
Timestamp: 2025-09-09T05:20:05.275Z
Learning: 在 ZStack 的 TagManagerImpl 中,TagConstant.isEphemeralTag 和实例方法 isEphemeralTag 有不同的用途:TagConstant.isEphemeralTag 只识别不需要在拦截器中验证的 EphemeralSystemTag,而实例方法 isEphemeralTag 识别所有实现 EphemeralTag 接口的标签(包括 EphemeralSystemTag 和 EphemeralPatternSystemTag),用于持久化相关的逻辑判断。
Learnt from: zstack-robot-1
PR: MatheMatrix/zstack#2360
File: network/src/main/java/org/zstack/network/l3/L3BasicNetwork.java:449-490
Timestamp: 2025-08-04T04:48:19.103Z
Learning: ZStack项目在cherry-pick操作中,即使发现了性能优化机会(如IP地址批量保存的内存优化),也严格遵循不做额外修改的政策,优先保证cherry-pick的完整性和一致性。
Learnt from: ZStack-Robot
PR: MatheMatrix/zstack#2489
File: storage/src/main/java/org/zstack/storage/snapshot/VolumeTree.java:471-545
Timestamp: 2025-08-22T05:36:40.467Z
Learning: In ZStack项目中,对于核心逻辑相关的代码,团队倾向于暂时不进行重构,即使代码复杂度较高,优先保证核心功能的稳定性。
Learnt from: ZStack-Robot
PR: MatheMatrix/zstack#2325
File: compute/src/main/java/org/zstack/compute/vm/VmMigrateCallExtensionFlow.java:29-29
Timestamp: 2025-07-24T05:53:10.246Z
Learning: 在ZStack项目的重构过程中,团队采用务实的优先级策略:优先完成影响运行时功能的代码重构,对于注释中的旧引用等非功能性问题可以延后处理,因为这些不会影响系统的实际运行。
📚 Learning: 2025-09-09T05:18:02.159Z
Learnt from: zstack-robot-2
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:301-304
Timestamp: 2025-09-09T05:18:02.159Z
Learning: In ZStack's TagManagerImpl, when createNonInherentSystemTag returns null for ephemeral tags, the design choice is to maintain consistent return behavior rather than adding special handling in API handlers to filter out nulls or skip ephemeral tags.

Applied to files:

  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java
  • tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java
📚 Learning: 2025-09-09T05:20:05.275Z
Learnt from: MatheMatrix
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:845-847
Timestamp: 2025-09-09T05:20:05.275Z
Learning: 在 ZStack 的 TagManagerImpl 中,TagConstant.isEphemeralTag 和实例方法 isEphemeralTag 有不同的用途:TagConstant.isEphemeralTag 只识别不需要在拦截器中验证的 EphemeralSystemTag,而实例方法 isEphemeralTag 识别所有实现 EphemeralTag 接口的标签(包括 EphemeralSystemTag 和 EphemeralPatternSystemTag),用于持久化相关的逻辑判断。

Applied to files:

  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java
  • tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java
📚 Learning: 2025-09-09T07:41:02.167Z
Learnt from: zstack-robot-2
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:301-304
Timestamp: 2025-09-09T07:41:02.167Z
Learning: 在 ZStack 的 TagManagerImpl.createNonInherentSystemTag 方法中,tao.gan 确认使用 TagConstant.isEphemeralTag(tag) 进行短暂标签过滤,以保持与其他相关方法的一致性。

Applied to files:

  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java
  • tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java
📚 Learning: 2025-09-09T07:40:35.148Z
Learnt from: zstack-robot-1
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:340-343
Timestamp: 2025-09-09T07:40:35.148Z
Learning: 在 ZStack 的 TagManagerImpl 中,tao.gan 明确要求在短暂标签过滤的场景中统一使用 TagConstant.isEphemeralTag(tag),包括 createInherentSystemTag、createNonInherentSystemTag 和 createNonInherentSystemTags 等方法,以保持代码一致性。

Applied to files:

  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java
  • tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java
📚 Learning: 2025-09-08T07:48:04.582Z
Learnt from: MatheMatrix
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:99-105
Timestamp: 2025-09-08T07:48:04.582Z
Learning: EphemeralPatternSystemTag的构造函数故意只接受tagFormat参数,内部硬编码调用super(tagFormat, SystemTagVO.class),这意味着所有EphemeralPatternSystemTag实例都使用SystemTagVO.class作为resourceClass,而不是保留原始的stag.getResourceClass()。

Applied to files:

  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java
  • tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java
📚 Learning: 2025-09-08T06:42:42.852Z
Learnt from: ZStack-Robot
PR: MatheMatrix/zstack#2542
File: tag/src/main/java/org/zstack/tag/TagManagerImpl.java:840-843
Timestamp: 2025-09-08T06:42:42.852Z
Learning: In ZStack's TagManagerImpl, the disable-persist logic (isDisablePersistTag) is intentionally limited in scope - it should only apply to non-inherent system tag creation paths, not to inherent tag creation, tag copying operations, or the API interceptor validation logic.

Applied to files:

  • tag/src/main/java/org/zstack/tag/TagManagerImpl.java
🔇 Additional comments (2)
storage/src/main/java/org/zstack/storage/volume/InstantiateVolumeForNewCreatedVmExtension.java (1)

211-211: 为 RootVolumeTemplate 路径补齐 systemTags:赞

这保证了诸如“初始 LV 大小”等根卷标签能下传到创建消息。

请确认恢复场景(InstantiateRootVolumeForRecoveryMsg)同样需要这些根卷标签;若需要,可按下述方式一并设置:

-            InstantiateVolumeMsg cmsg = fillMsg(new InstantiateRootVolumeForRecoveryMsg(), spec.getDestRootVolume(), spec);
+            InstantiateVolumeMsg cmsg = fillMsg(new InstantiateRootVolumeForRecoveryMsg(), spec.getDestRootVolume(), spec);
             ((InstantiateRootVolumeForRecoveryMsg) cmsg).setSelectedBackupStorage(image.getSelectedBackupStorage());
+            cmsg.setSystemTags(spec.getRootVolumeSystemTags());
             msgs.add(cmsg);
tag/src/main/java/org/zstack/tag/TagManagerImpl.java (1)

98-104: 在 initSystemTags 中优先处理 EphemeralPatternSystemTag:方向正确

先于 PatternedSystemTag 分支处理并以新实例替换静态字段,保证运行期行为一致;同时保留校验器,符合期望。

Comment on lines +5 to +8
public class EphemeralPatternSystemTag extends PatternedSystemTag {
public EphemeralPatternSystemTag(String tagFormat, Class resourceClass) {
super(String.format("%s::%s", TagConstant.EPHEMERAL_TAG_PREFIX, tagFormat), resourceClass);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

应实现 EphemeralTag 标记接口,否则不会被判定为“短暂标签”

根据以往结论,实例方法 isEphemeralTag 通过 EphemeralTag 接口识别短暂标签。当前类未实现该接口,可能导致被误当作可持久化标签参与校验/持久化。

-public class EphemeralPatternSystemTag extends PatternedSystemTag {
+public class EphemeralPatternSystemTag extends PatternedSystemTag implements EphemeralTag {

(请补充正确的 EphemeralTag 导入路径)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public class EphemeralPatternSystemTag extends PatternedSystemTag {
public EphemeralPatternSystemTag(String tagFormat, Class resourceClass) {
super(String.format("%s::%s", TagConstant.EPHEMERAL_TAG_PREFIX, tagFormat), resourceClass);
}
public class EphemeralPatternSystemTag extends PatternedSystemTag implements EphemeralTag {
public EphemeralPatternSystemTag(String tagFormat, Class resourceClass) {
super(String.format("%s::%s", TagConstant.EPHEMERAL_TAG_PREFIX, tagFormat), resourceClass);
}
}
🤖 Prompt for AI Agents
In tag/src/main/java/org/zstack/tag/EphemeralPatternSystemTag.java around lines
5 to 8, the class EphemeralPatternSystemTag must implement the EphemeralTag
marker interface so it is recognized as an ephemeral (short-lived) tag; update
the class declaration to implement org.zstack.tag.EphemeralTag and add the
corresponding import (import org.zstack.tag.EphemeralTag;) so the type system
marks instances as ephemeral and they won’t be treated as persistent during
validation/persistence.

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