89799969 opened a new pull request, #4456:
URL: https://github.com/apache/rocketmq-dashboard/pull/4456

   ### Which Issue(s) This PR Fixes
   
   - Fixes #4361
   
   ### Brief Description
   
   Consumer-group inventory responses previously left primitive lag and delay 
fields at zero when broker consume statistics failed, were null, or contained 
no offsets. That made unavailable telemetry look like a healthy zero backlog.
   
   This change:
   
   - marks failed, null, and empty live statistics unavailable and uses the 
existing unknown-lag sentinel;
   - preserves valid zero lag and delay values;
   - carries the availability flags through the frontend API and mock contracts;
   - renders unavailable delay explicitly in list and detail views and sorts it 
after known values; and
   - adds backend and frontend regression coverage for unavailable, unknown, 
and valid-zero cases.
   
   ### How Did You Test This Change?
   
   - `cd server && mvn -B -ntp 
-Dmaven.repo.local=D:\projects\oss-contributions\m2-rocketmq 
-Dtest=RocketMQMetadataProviderTest test`
     - 47 tests passed; Checkstyle reported 0 violations.
   - `cd web && vitest run src/pages/instance/__tests__/ConsumerPage.test.tsx 
-t "distinguishes unavailable live stats from available zero lag and delay"`
     - 1 test passed.
   - `cd web && eslint src/api/metadata.ts src/mock/consumers.ts 
src/pages/instance/consumer.tsx 
src/pages/instance/__tests__/ConsumerPage.test.tsx`
     - passed.
   - `cd web && prettier --check src/api/metadata.ts src/mock/consumers.ts 
src/pages/instance/consumer.tsx 
src/pages/instance/__tests__/ConsumerPage.test.tsx`
     - passed.
   - `cd web && npm run build`
     - TypeScript and Vite production build passed.
   
   The complete `ConsumerPage.test.tsx` file run passed 32 of 33 tests; the 
pre-existing unrelated `keeps the latest client stack when an older request 
resolves last` test timed out while waiting for `LatestClientThread`. The 
focused regression test above passes independently.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
— N/A; this reuses the existing unavailable label
   - [x] Architecture constraints stay green — no package or 
dependency-boundary changes; focused backend build and Checkstyle pass
   - [x] New source files carry the ASF license header — N/A; no new source 
files
   - [x] Documentation touched where behaviour changed — N/A; the behavior and 
API contract are covered inline and by regression tests
   


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