The GitHub Actions job "CI" on rocketmq-dashboard.git/fix/consumer-unknown-sort-order has failed. Run started by GitHub user unbridled-41 (triggered by unbridled-41).
Head commit for run: e7575b3745ba4bd539b934422eb3bd1e46c5418f / unbridled-41 <[email protected]> fix(consumer): keep unmeasured rows out of the top of a descending sort The 总堆积量 and 在线客户端 columns sort with a one-sided key: lagSortValue = (lag) => (isLagAvailable(lag) ? lag : Number.MAX_SAFE_INTEGER) onlineInstancesSortValue = (value) => (isAvailable(value) ? value : Number.MAX_SAFE_INTEGER) Ant Design computes a descending column by negating the comparator's result (antd/es/table/hooks/useSorter: sortOrder === ASCEND ? result : -result), so the largest sentinel becomes the smallest comparison value once the direction flips. Clicking 总堆积量 twice therefore lists the groups whose backlog is 不可用 *above* the real largest backlog, and the same happens to 在线客户端 for groups whose connection inventory is unavailable (-1, the sentinel the backend documents for 5.0 gRPC/proxy groups: RocketMQMetadataProvider sets onlineInstances = -1). The instance page solved the same problem with a direction-aware comparator (compareResourceCounts: "Ant Design reverses the comparator for descending order, so invert this branch to keep unavailable counts after numeric values in either order", pinned by InstancePage.test.tsx). Make the two sort keys direction-aware the same way and pass the column's sortOrder through. Tests (web/): npx vitest run src/utils/consumerLag.test.ts src/utils/consumerConnections.test.ts \ src/pages/instance/__tests__/ConsumerPage.test.tsx -> Test Files 3 passed, Tests 56 passed. - new ConsumerPage case "keeps an unknown lag after known backlogs in the descending order too" fails before this change (expected ['known','unknown'], received ['unknown','known']) and passes after it; the two existing ascending cases still pass. - new util cases pin both directions for both sentinels. - npx eslint reports no errors; npx tsc -b passes. Report URL: https://github.com/apache/rocketmq-dashboard/actions/runs/37965727799 With regards, GitHub Actions via GitBox
