You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/01 15:13:50 UTC
[PR] fix(alert): tolerate malformed silence domain values [rocketmq-dashboard]
yyqdbngt opened a new pull request, #2886:
URL: https://github.com/apache/rocketmq-dashboard/pull/2886
## Summary
- parse stored silence domains through a guarded helper in `MybatisPlusAlertSilenceRepository.toVo`
- trim and root-locale uppercase the value; blank domains stay unscoped, unknown values fall back to `BUSINESS`
## Why
`toVo` called `AlertDomain.valueOf(entity.getDomain())` directly on the raw database value. The write path always stores the canonical enum name, but a legacy row (for example a lowercase `business`) or a manually edited value made `valueOf` throw `IllegalArgumentException` inside `findAll()`. That single row broke both the silence listing endpoint and `AlertSilenceService.activeUntil`, which reads every silence on every notification enqueue and dispatch — so one bad row silently disabled silence matching for all alerts. The fallback follows the existing convention in `MybatisPlusAlertRepository.parseDomain`, which maps unrecognized rule domains to `BUSINESS`.
## Testing
- `cd server && mvn -q -Dtest=MybatisPlusAlertSilenceRepositoryTest,AlertSilenceServiceTest test` — all tests pass, including the new `MybatisPlusAlertSilenceRepositoryTest` covering stored ` business ` → `BUSINESS`, `LEGACY` → `BUSINESS`, `CLUSTER` → `CLUSTER`, and `null` → unscoped
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(alert): tolerate malformed silence domain values [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2886:
URL: https://github.com/apache/rocketmq-dashboard/pull/2886#issuecomment-5593761535
This pull request has been automatically closed because there has been no activity for 7 days. If you would like to continue working on this, please reopen the PR with updated changes.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(alert): tolerate malformed silence domain values [rocketmq-dashboard]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #2886: fix(alert): tolerate malformed silence domain values
URL: https://github.com/apache/rocketmq-dashboard/pull/2886
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org