chstercc opened a new pull request, #6351: URL: https://github.com/apache/rocketmq-dashboard/pull/6351
### Which Issue(s) This PR Fixes - Fixes #6331 ### Brief Description Mock-mode Topic, Consumer Group, and alert-rule deletes previously resolved successfully when the selected record did not exist. Reject these operations with the existing resource-specific not-found errors so callers can report failure and batch Topic/Consumer Group deletes classify missing records as failed. Add eight regression cases covering absent resources, repeated deletes, instance/domain isolation, unchanged stores after rejected deletes, and mixed batch results that continue past a missing item. Adjust an existing consumer-group test cleanup to delete only remaining records under the stricter contract. AI assistance was used for investigation, implementation, and validation; the final diff was reviewed. ### How Did You Test This Change? Validated against upstream `rocketmq-studio@779b8c0e7aed2396d3cc72743dcd544ea48e9ae6`, using Linux Node.js 22.20.0 and the committed dependency lockfile. From `web`: - Before the fix, the three service test files reported **8 new regression failures and 44 existing passes**. - `npm test -- src/services/topicService.test.ts src/services/consumerService.test.ts src/services/opsService.test.ts src/services/topicService.batchDelete.test.ts`: **4 files passed, 53 tests passed**. - `npm test`: **159 files passed, 1612 tests passed**. - `npm run lint`: passed with **0 errors and 10 existing warnings in unchanged files**. - `npm run build`: passed, including TypeScript compilation, Vite production bundling, and the license gate (**133 actual components, 140 license files**). - Prettier checks for all six changed files and `git diff --check`: passed. Backend/ArchUnit and live browser or broker integration tests were not run; this change only affects frontend Mock service branches and their tests. ### Checklist - [x] One coherent change; unrelated modifications are not bundled in - [x] Commit subject follows Conventional Commits - [x] Tests added or updated for non-trivial changes, new test descriptions end in `Test` - [x] New UI text has both Chinese and English entries — no new UI text - [ ] Architecture constraints stay green — backend/ArchUnit tests not run (frontend-only change) - [x] New source files carry the ASF license header — no new files; existing headers retained - [ ] Documentation touched where behaviour changed — no documentation changes; Mock behavior now follows the existing delete contract -- 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]
