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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6126
   
   ### Brief Description
   
   A cloud consumer-group row reported `onlineInstances = 0` and `totalLag = 0` 
because neither provider mapped
   them and `ConsumerGroupVO`'s defaults are 0. Neither list API returns those 
numbers
   (`ListConsumerGroupsResponseBody.List` has no such field, and the Tencent 
provider documents
   `DescribeConsumerGroupList` as exposing limited fields), so the group list, 
the group detail and the CSV export
   presented 0 clients and 0 backlog as measurements — the leak #5449 fixed for 
the topic consumer VO and #4902 for
   cloud queue offsets.
   
   The rows now start as unavailable — `-1`, which `ConsumerGroupVO`'s javadoc 
declares for an unavailable
   connection inventory and which the console and the CSV already render as 
unknown
   (`consumerGroupDiagnostics.ts:302`, `isLagAvailable`) — and Tencent's 
enrichment fills both from the
   `DescribeConsumerGroup` response it already fetches for the creation 
timestamp and consume model (no additional
   API call). A missing or negative detail value stays unavailable.
   
   User-visible change: cloud consumer-group rows no longer show `0` online 
clients and `0` backlog; they show the
   unavailable/`unknown` rendering the web client already implements, and a 
Tencent row shows the client count and
   backlog the vendor reports. No API field was added or removed.
   
   ### How Did You Test This Change?
   
   ```
   cd server && mvn -B -ntp test -DforkCount=1 
-Dsurefire.failIfNoSpecifiedTests=false \
     -Dtest=AliyunConvertersTest,TencentInstanceProviderTest
   [INFO] --- checkstyle:3.6.0:check (validate) @ rocketmq-studio ---
   [INFO] Tests run: 68, Failures: 0, Errors: 0, Skipped: 0
   [INFO] BUILD SUCCESS
   
   mvn -B -ntp test ... 
-Dtest=MetadataServiceTest,ConsumerGroupControllerTest,AliyunInstanceProviderTest,\
   TencentInstanceProviderTest,AliyunConvertersTest,ApacheInstanceProviderTest
   [INFO] Tests run: 175, Failures: 0, Errors: 0, Skipped: 0
   ```
   
   The three new cases fail without the fix, with only the two product files 
reverted:
   
   ```
   [ERROR] Tests run: 11, Failures: 1, Errors: 0, Skipped: 0
   toConsumerGroupVoShouldReportUnmeasurableClientAndLagCountsAsUnknownTest -- 
<<< FAILURE!
   expected: -1
    but was: 0
   
   [ERROR] Tests run: 57, Failures: 2, Errors: 0, Skipped: 0
   listConsumerGroupsShouldReportUnmeasurableCountsAsUnknownTest -- <<< FAILURE!
   expected: -1
    but was: 0
   listConsumerGroupsShouldUseTheDetailClientAndLagCountsTest -- <<< FAILURE!
   expected: 3
    but was: 0
   ```
   
   The two Tencent cases are independent: one pins the detail mapping, the 
other that a failing or absent detail
   lookup keeps the row unavailable instead of falling back to a measured zero.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / 
`refactor:` / `chore:` / `docs:` / `perf:`)
   - [x] Tests added or updated for non-trivial changes, test methods named 
`...Test`
   - [ ] New UI text has both Chinese and English entries under `web/src/i18n/`
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit 
checks)
   - [ ] New source files carry the ASF license header
   - [ ] Documentation touched where behaviour changed (README / `docs` / 
in-app help)
   


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