btlqql opened a new pull request, #7136: URL: https://github.com/apache/rocketmq-dashboard/pull/7136
## What is the purpose of the change `AlertService.updateRule` answered with the request-derived rule, so the edit response never carried `lastTriggered`: `MybatisPlusAlertRepository` deliberately keeps the stored fire history instead of overwriting it with the request. The Alerts page replaces the edited row with that response, so a rule that had fired flipped to "Never Triggered" the moment its edit was saved, until the list reloaded — toggling the same rule brought the stamp back, because the toggle path answers with the stored row. `updateRule` now reads the stored rule back after the write and returns it (falling back to the request only if the row disappeared between the two statements). The audit call, the runtime purge and every other step of the update are unchanged. ## Brief changelog - `server/src/main/java/org/apache/rocketmq/studio/ops/alert/AlertService.java`: `updateRule` returns the stored rule from `findRuleById` instead of the request echo, so the response carries `lastTriggered` and the runtime fields the update cannot set. - `server/src/test/java/org/apache/rocketmq/studio/ops/alert/AlertServiceTest.java`: `updateRuleShouldReturnTheStoredRuleInsteadOfTheRequestTest` pins the stored `lastTriggered` on the update response (first read = pre-update row, second read = stored row). ## Verifying this change - red: `cd server; mvn -o -B -ntp test -Dtest='AlertServiceTest'` → `AlertServiceTest.updateRuleShouldReturnTheStoredRuleInsteadOfTheRequestTest:1199 expected: "2026-10-01T10:00:00" but was: null` (`Tests run: 102, Failures: 1, Errors: 0`) — log `alert-update-vo-red.log` - green: `cd server; mvn -o -B -ntp test -Dtest='AlertServiceTest,AlertRuleControllerTest'` → `Tests run: 124, Failures: 0, Errors: 0, Skipped: 0`, `BUILD SUCCESS` — log `alert-update-vo-green.log` - regressions run: `AlertServiceTest` (102 tests) and `AlertRuleControllerTest` (22 tests) in full, both green. Not verified: the full `mvn test` suite, CI, the web test suite, and a live broker/dashboard session (no cluster participates). ## Checklist - [x] one issue, one PR: Fixes #5988 - [x] regression test added - [x] targeted suites re-run -- 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]
