iloveeyjafjalla opened a new issue, #6940:
URL: https://github.com/apache/rocketmq-dashboard/issues/6940

   ## Summary
   
   When the alert-rules page cannot read the rules' runtime state, every rule's 
运行态 cell reads 未采集 ("Not collected") — a claim about each rule's collection 
being switched off — although what failed was the read.
   
   ## Why
   
   - The runtime read discards its error: `void 
listAlertRuleRuntime(domain).then(setRuntime).catch(() => undefined)` 
(`web/src/pages/ops/alerts.tsx:395-397`).
   - The cell renders `alerts.notCollected` whenever the rule has no runtime 
row (`:749-751`), and a failed read leaves no rows, so the failure and a 
genuinely empty runtime state are indistinguishable.
   - On a *refresh* that fails, the previous array is kept, so the column can 
instead keep showing firing/pending states that may no longer hold.
   
   ## Impact
   
   A transient failure of `/api/(business|cluster)-alert-rules/runtime` makes 
the whole table claim that no rule is collecting, with no error message and no 
retry, while the rules list itself loaded fine.
   
   ## Reproduction
   
   `web/src/pages/ops/__tests__/AlertsPage.test.tsx` → `does not present a 
failed runtime read as a rule that was never collected` rejects 
`listAlertRuleRuntime` while the rule list resolves:
   
   ```
   expect(screen.queryByText('未采集')).not.toBeInTheDocument()   → found 未采集
   ```
   
   ## Expected
   
   A failed read is shown as unknown ("-" with the reason), not as "not 
collected", and stale values are dropped.
   


-- 
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]

Reply via email to