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

   ### Which Issue(s) This PR Fixes
   
   - Fixes #6097
   
   ### Brief Description
   
   `TopicVO.messageCount`, `.tps` and `.consumerGroupCount` are declared, 
serialized and rendered, but
   no provider assigns them: all nine `TopicVO` construction sites 
(`RocketMQMetadataProvider:198`,
   `RocketMQAdminClientImpl:119`, `TencentInstanceProvider:1001`, 
`AliyunConverters:120`,
   `CreateTopicDTO`, `UpdateTopicDTO`, `TopicController:82`, `TopicInput`, 
`TopicUpdateInput`) omit the
   three fields, so every topic reports 0 messages, 0 TPS and 0 consumer groups.
   
   Following #5600, which dropped the fabricated NameServer "Connections" 
column instead of filling it
   with a guess, the three statistics are removed together with everything 
built on them:
   
   - `TopicVO` fields, the `Message Count` / `TPS` / `Consumer Groups` columns 
of
     `MetadataService.buildTopicCsv`, and the `Message Count` / `Consumer 
Groups` columns of the web CSV
     export in `topicService.ts` (plus the `messageCount: 0, tps: 0, 
consumerGroupCount: 0` it invented
     for a locally created topic);
   - the 今日消息量 / TPS / 消费者组数 rows of the topic detail drawer, the `Topic` 
TypeScript contract
     and the mock data that was the only producer;
   - `TopicListItem` and `TopicDetailOutput` and their 
`tool-catalog/tools/topic.yaml` schemas, with
     `catalog_gen.go` regenerated, so `rmq.topic.list` / `rmq.topic.detail` no 
longer report the zeros
     as measured values;
   - the three `docs/api-spec.md` response rows.
   
   User-visible change: the topic detail drawer no longer shows 今日消息量 / TPS / 
消费者组数, and the two
   topic CSV exports no longer contain those columns. Nothing that was ever 
computed is lost — the
   values were `0` for every topic on every vendor.
   
   ### How Did You Test This Change?
   
   ```
   cd server && mvn -B -ntp test -DforkCount=1 \
     
-Dtest='MetadataServiceTest,TopicMutationPlanTest,TopicDetailToolHandlerTest,ToolOutputSchemaContractTest,TopicControllerTest'
   Tests run: 90, Failures: 0, Errors: 0, Skipped: 0
   BUILD SUCCESS          (checkstyle: 0 violations)
   
   make -C rmqctl catalog-verify            ✓  (topic.yaml ↔ catalog_gen.go)
   
   npx eslint <the seven changed web files>          ✓
   npx prettier --check <the same files>             ✓
   npx tsc -b                                        ✓
   npx vitest run src/pages/instance/__tests__/TopicPage.test.tsx 
--maxWorkers=1 --fileParallelism=false
     Tests  42 passed (58.4s)
   npx vitest run src/components/__tests__/TopicConfigComparisonDrawer.test.tsx 
--maxWorkers=1 --fileParallelism=false   ✓
   npx vitest run src/api/metadata.test.ts --maxWorkers=1 
--fileParallelism=false    ✓
   npx vitest run src/utils/topicConfigComparison.test.ts --maxWorkers=1 
--fileParallelism=false   ✓
   ```
   
   The new tests fail without the fix (the two cases were re-applied to a clean 
`5e4c39b0` checkout,
   with no product change):
   
   ```
   $ mvn -B -ntp test -Dtest=MetadataServiceTest
   [ERROR] 
MetadataServiceTest.exportTopicsShouldNotPublishStatisticsNoProviderComputesTest:656
   Expecting actual:
     ""Name","Namespace","Type","Cluster ID","Write Queues","Read 
Queues","Permission","Message Count","TPS","Consumer Groups","Remark","Created 
At","Updated At"
      
"orders","default","NORMAL","cluster-a","8","8","RW","100","2.5","3","remark","2026-08-27T10:00","2026-08-27T11:00""
   not to contain:
     "Message Count"
   Tests run: 60, Failures: 1, Errors: 0, Skipped: 0
   
   $ npx vitest run src/pages/instance/__tests__/TopicPage.test.tsx 
--maxWorkers=1 --fileParallelism=false
    FAIL  TopicPage > does not present topic statistics that no provider 
computes
          expect(labels).not.toContain('今日消息量');
          expect(labels).not.toContain('TPS');
          expect(labels).not.toContain('消费者组数');
    Tests  1 failed | 41 passed (42)
   ```
   
   ### 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
   - [x] 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