Frun1na opened a new pull request, #4875:
URL: https://github.com/apache/rocketmq-dashboard/pull/4875
## Which Issue(s) This PR Fixes
- Fixes PENDING_BACKFILL
## Brief Description
In the alerts rules effect, `listAlertRuleRuntime(domain)` was the only
request without the `cancelled` guard. After the domain (BUSINESS/CLUSTER)
switches, a slow runtime response for the previous domain still called
`setRuntime`, so the runtime column rendered another domain's runtime states.
The fix checks `cancelled` before setting the state, matching the guard
every other request in the same effect already has.
## How Did You Test This Change?
New test in `web/src/pages/ops/__tests__/AlertsPage.test.tsx`: render with
`CLUSTER`, hold the runtime request open, rerender with `BUSINESS`, then
resolve the stale response with a FIRING state. On the base revision the stale
state is committed and the row shows `触发 1`; with the fix the cell stays `未采集`:
```
$ npx vitest run src/pages/ops/__tests__/AlertsPage.test.tsx
Test Files 1 passed (1)
Tests 29 passed (29)
```
`npx eslint` on the changed files reports 0 errors (5 pre-existing warnings,
untouched lines).
--
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]