fix(alert): preserve recurring maintenance boundaries across DST - #4090
Open
yuluo-yx wants to merge 1 commit into
Open
fix(alert): preserve recurring maintenance boundaries across DST#4090yuluo-yx wants to merge 1 commit into
yuluo-yx wants to merge 1 commit into
Conversation
Resolve recurring start and end boundaries independently and preserve explicit seed offsets. Cover gap, overlap, weekly and notification deferral behavior. [skip ci]
RockteMQ-AI
approved these changes
Sep 8, 2026
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Summary
Fixes recurring alert silence boundaries across DST transitions. Uses ZoneId and ZonedDateTime for proper DST handling instead of fixed-offset calculations. Comprehensive tests cover spring-forward and fall-back scenarios.
LGTM.
Automated review by github-manager-bot
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.
变更目的
修复周期维护窗口在夏令时切换时错误延迟或提前发送告警的问题。
-05:00偏移时,旧实现重新解析为-04:00,导致有效窗口被跳过。修改内容
首个窗口保留请求指定的确切起止瞬间;后续窗口从名义当地时间分别解析开始与结束边界。保留原有后续重复时段的偏移选择规则、星期限制和周期截止时间。没有新增依赖、配置或数据库字段。
13 个时间边界测试覆盖一小时/半小时缺口、秋季重复时段、跨日每周窗口与亚秒边界;6 个服务组合测试覆盖创建、UTC 存储、维护窗口计算和三种通知渠道入队时间。新增中文行为与回滚说明。
验证
基线:
d6dee7d7ccfcf4886f02466ec51452a6928b2cc8,Java 21。mvn -B -ntp -Dtest=AlertSilenceScheduleTest,AlertSilenceDstTest,AlertSilenceServiceTest,RecurringSilenceNotificationTest,NotificationOutboxServiceTest test:65 个测试通过,Checkstyle 通过。mvn -B -ntp -DskipTests package:构建通过。AuthCorsIntegrationTest两项、AliyunInstanceProviderTest#getGroupProgressShouldMapLagRowsTest一项。git diff --check:通过。4 个文件,416 行新增、18 行删除。未运行真实集群 E2E、压力和混沌测试。本次时间计算仍只检查最多 8 个候选日期,通知测试不向外发送消息。上游既有依赖漏洞尚未由本 PR 处理,不能据此声称项目级漏洞门槛通过。
按贡献指南 #2107 将同一维护窗口语义的缺陷与验证合并。已核对 #3070 的原始功能、#3303 的七天周窗口修复和 #3415 的配置边界测试,本次处理的夏令时缺口与明确偏移不与其重复。
本地执行验证,提交使用
[skip ci],不会自动运行push/pull_request工作流。无迁移,直接替换;回滚本提交即可。