yyqdbngt opened a new pull request, #5877: URL: https://github.com/apache/rocketmq-dashboard/pull/5877
## Why `MybatisPlusAlertSilenceRepository.toVo` maps the stored `domain` / `recurrence` columns with raw `AlertDomain.valueOf` / `AlertSilenceRecurrence.valueOf`. A single row holding a value this build does not know (written by a newer console build, restored from a backup, or hand-edited) throws `IllegalArgumentException`, which 500s the entire silence list page and also breaks `findActiveCandidates` — i.e. one bad row disables silence evaluation for everything. The sister repository `MybatisPlusAlertRepository` already parses unknown domains leniently (`parseDomain` falls back to `BUSINESS`); only the silence reader lacked that guard. ## What changed - Unknown/blank-adjacent stored domain values now fall back to `BUSINESS` (same default the alert repository uses); unknown recurrence values fall back to `ONCE` (same default pre-recurrence rows already get). ## Validation - Red first: new tests in `MybatisPlusAlertSilenceRepositoryTest` (`findAllShouldKeepUnknownStoredDomainAndRecurrenceFromBreakingTheInventoryTest`, `findActiveCandidatesShouldNotFailOnAnUnknownStoredDomainTest`) failed with `IllegalArgumentException: No enum constant AlertDomain.SOME_FUTURE_DOMAIN` before the fix. - After the fix: `mvn test -Dtest=MybatisPlusAlertSilenceRepositoryTest,AlertSilenceServiceTest,AlertSilenceControllerTest` — all green. -- 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]
