Loyal-Young opened a new pull request, #6451:
URL: https://github.com/apache/rocketmq-dashboard/pull/6451

   ### Which Issue(s) This PR Fixes
   
   Fixes #6450
   
   ### Brief Description
   
   Require each unit in an alert duration at most once, in descending order, 
matching [Prometheus's duration 
parser](https://github.com/prometheus/common/blob/main/model/time.go). 
Previously `1s1m` and `1m1m` passed request validation and were exported 
verbatim into an unusable rule file.
   
   The exporter already shares this pattern, so legacy values with invalid unit 
order now use its existing `5m` fallback. Native reminder-interval parsing is 
unchanged. This change enforces unit order; it does not add numeric-range 
validation for Prometheus durations.
   
   ### How Did You Test This Change?
   
   - Java 21 Maven tests: 
`AlertRuleRequestDTOTest,AlertServiceTest,AlertRuleTransferDTOTest`: **103 
passed**, no failures/errors/skips.
   - Regression run before the fix: six failures (five invalid-order request 
cases and the legacy export regression).
   - Controls include all supported units, mixed minute/millisecond suffixes, 
zero, valid compounds, empty text and fractional syntax.
   - Checkstyle: 0 violations; `git diff --check`: passed.
   
   No live Prometheus or full Maven suite was run. The snapshot contains no 
ArchitectureTest class; no ArchUnit execution is claimed.
   
   ### Checklist
   
   - [x] One coherent fix and regression tests
   - [x] No new files, dependencies or UI strings
   
   ### AI Assistance
   
   AI assistance was used to compare the input pattern with Prometheus's 
parser, draft the fix and regression cases, and execute the listed checks.
   


-- 
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]

Reply via email to