You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "tju-yxq (via GitHub)" <gi...@apache.org> on 2026/09/03 18:24:47 UTC
[PR] fix(alert): normalize native metric rule inputs [rocketmq-dashboard]
tju-yxq opened a new pull request, #3050:
URL: https://github.com/apache/rocketmq-dashboard/pull/3050
## What is the purpose of the change
Native alert rule metrics are compared with raw strings in some paths and trimmed strings in others. A metric copied with surrounding whitespace could bypass native policy validation, then be filtered out by the test service's exact sample match, while notification formatting and semantic fingerprints used the non-canonical value.
## What changed
- trim the metric when converting `AlertRuleRequestDTO` to the rule VO so create, update, and test requests enter validation with a canonical key
- normalize metric, instance ID, and operator in `NativeAlertRuleTestService` before policy validation and sample filtering; this also handles rules copied from older stored data
- trim imported metric keys before transfer-import catalog validation
- add regressions for DTO normalization and end-to-end native rule testing with padded metric, instance, and operator values
## Verification
- before the fix, the DTO regression returned `" consumer.lag.total "`, and the native test regression returned zero samples
- focused tests: `AlertRuleRequestDTOTest,NativeAlertRuleTestServiceTest,AlertRuleTransferServiceTest,NativeAlertRulePolicyTest,NativeAlertMetricCatalogServiceTest,AlertRuleEvaluatorTest` (30 tests) passed
- Checkstyle: 0 violations
- full server suite: `mvn -DskipTests=false test` (1,962 tests, 0 failures, 0 errors)
Closes #3049
--
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): normalize native metric rule inputs [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #3050:
URL: https://github.com/apache/rocketmq-dashboard/pull/3050
--
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): normalize native metric rule inputs [rocketmq-dashboard]
Posted by "tju-yxq (via GitHub)" <gi...@apache.org>.
tju-yxq commented on PR #3050:
URL: https://github.com/apache/rocketmq-dashboard/pull/3050#issuecomment-5530245331
The repository CI run for head `b73f30c2` ended as `startup_failure` before creating any jobs, so it did not run Backend Build, Frontend Build, or Frontend Docker Build. I am not describing that as either a remote CI pass or a code-test failure.
Local verification remains:
- focused tests: 30 passed
- Checkstyle: 0 violations
- full server suite: 1,962 tests, 0 failures/errors
CI run: https://github.com/apache/rocketmq-dashboard/actions/runs/33790340773
--
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