Aias00 opened a new pull request, #4158: URL: https://github.com/apache/rocketmq-dashboard/pull/4158
## Summary - inject the existing alerting retention configuration into `AlertService` - reject native alert aggregation windows longer than a positive snapshot retention - apply the check before repository mutation on both create and update paths - preserve equal-boundary, single-sample, non-native Prometheus, and cleanup-disabled behavior ## Scope The validation applies only to Studio-native metrics with `windowSeconds > 0`. A zero or negative snapshot retention retains the current cleanup-disabled semantics and does not impose a cap. Import already delegates to the same create path. Snapshot collection, cleanup, aggregation math, and existing-rule migration are unchanged. ## TDD evidence Before implementation, the create and update regressions completed repository writes without rejecting a 24-hour-plus-one-second window under the default 24-hour retention. After the minimal Service validation, both reject with business code 400 before persistence. ## Verification - `mvn -B -ntp -f server/pom.xml -Dtest=AlertRuleSnapshotRetentionTest,AlertServiceTest,AlertServiceDefaultRulesTest,NativeAlertRulePolicyTest,AlertRuleTransferServiceTest,AlertRuleControllerTest,ClusterAlertRuleControllerTest test` — 129 tests passed - `mvn -B -ntp -f server/pom.xml -Dtest=StudioApplicationTest test` — 2 tests passed - `mvn -B -ntp -f server/pom.xml -DskipTests package` - Checkstyle — 0 violations - `git diff --check` Closes #4157 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
