The GitHub Actions job "CI" on 
rocketmq-dashboard.git/fix/consumer-delay-unavailable has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
67ec90b7ab7e60b3425b34164376001c83977a2a / unbridled-41 
<[email protected]>
fix(consumer): stop presenting an unmeasurable consume delay as 0 seconds

The apache provider leaves delaySeconds at its zero default and says why 
through a
second field:

    int delaySeconds = 0;
    boolean timestampAvailable = false;
    if (newestConsumedTimestamp > 0) { ... timestampAvailable = true; }
    // No consume stats (e.g. POP-only group without an offset table): keep 
zeros.
    ConsumerGroupVO.consumptionTimestampAvailable =
        "Whether broker consume stats include a consumed-message timestamp for 
delay calculation."

The console never read that flag (grep: no usage in web/src), so the 消费延迟 column
and the group drawer rendered `formatDelay(0)` = "0秒" for a group whose delay 
was
never measured - a claim that the group is fully caught up - and the column 
sorted
it next to the genuinely caught-up groups (first in an ascending scan). The
sibling lag and client-count columns already carry a "not measured" state
(totalLag/onlineInstances = -1) and render 不可用 for it.

Read the flag: render 不可用 when it is false, and give the column a
direction-aware sort key so unmeasured rows stay after measured ones in both
orders (the pattern the other columns of this page use).

Tests (web/): npx vitest run src/pages/instance/__tests__/ConsumerPage.test.tsx
- new case "reports a group without a consumed-message timestamp as an unknown
  delay" fails before this change (the row and the drawer show 0秒) and passes
  after it; it also asserts the descending order keeps the row last.
- 48 tests pass; npx eslint reports no errors; npx tsc -b passes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37969711986

With regards,
GitHub Actions via GitBox

Reply via email to