Frun1na opened a new issue, #6828: URL: https://github.com/apache/rocketmq-dashboard/issues/6828
### Before Creating the Bug Report - [x] I have searched the [open issues](https://github.com/apache/rocketmq-dashboard/issues) of this repository and believe that this is not a duplicate. - [x] This is a defect in RocketMQ Studio, not a usage question and not a defect in another Apache RocketMQ repository. - [x] I can reproduce this on the current `rocketmq-studio` branch, or I have stated the exact version I am running below. ### Studio Version branch: rocketmq-studio git commit id: a92c2314 deployed as: reproduced by a unit test against that commit ### Runtime Environment OS: Ubuntu on WSL2 (unit-test reproduction) MySQL: not applicable — the defect is in the web demo (mock) data source browser (for UI issues): not applicable — the defect is reproduced at the service layer ### Connected RocketMQ Cluster not applicable — reproduced with the bundled demo data source in a unit test ### Describe the Bug In demo-data mode the consumer-group import has no batch limit, while the endpoint rejects more than 100 groups per import. `web/src/services/consumerService.ts:319-344` (before the fix) loops over the submitted list and creates every entry one by one. The endpoint answers 400 instead — `MetadataService.importConsumerGroups` (`server/src/main/java/org/apache/rocketmq/studio/instance/topic/MetadataService.java:779-781`) rejects more than `MAX_IMPORT_GROUPS` (100) with "At most 100 consumer groups are allowed per import"; the topic-side import carries the same cap (`:881-883`). The console can build such a request: the consumer-group CSV import validates each row but has no row cap (`web/src/utils/resourceCsvImport.ts:319`), and the page submits every pending row in one call (`web/src/pages/instance/consumer.tsx:846-877`). ### Steps to Reproduce 1. Start the web console in demo (mock) data-source mode and open an instance's Consumer Groups tab. 2. Import a CSV with 101 valid rows (>100 unique group names). 3. Observe: every row is reported as created and the page toasts a successful import, although the backend would refuse the whole batch. At the service level: ``` $ cd web && npx vitest run src/services/consumerService.test.ts FAIL src/services/consumerService.test.ts > consumer group import batch contract > rejects an import above the backend batch cap AssertionError: promise resolved "{ imported: 101, failed: +0, …(2) }" instead of rejecting ``` ### What Did You Expect to See? The demo import rejects a list longer than 100 rows with the endpoint's own message ("At most 100 consumer groups are allowed per import") and adds none of them to the demo inventory, exactly like a real instance does (where the page marks every row as failed with that message). ### What Did You See Instead? `importConsumerGroups('instance-direct-1', <101 rows>)` resolves with `{ imported: 101, failed: 0, … }` and the demo inventory gains all 101 groups. ### Additional Context A fix with a regression test follows in a pull request. ### Are You Willing to Submit a Pull Request? - [x] Yes, I am willing to submit a pull request. -- 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]
