iloveeyjafjalla opened a new issue, #6347: URL: https://github.com/apache/rocketmq-dashboard/issues/6347
### 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 `master` branch, or I have stated the exact version I am running below. ### Studio Version branch: rocketmq-studio git commit id: 6c9f74a793641c15ef4ff0c2a4934408fdb79bd9 deployed as: built from source (frontend `npm run dev`, backend run from the Maven build), MySQL 8.0.46 container from deploy/docker-compose.yml ### Runtime Environment OS: Windows 11 (backend and frontend run on the host) MySQL: 8.0.46 (container, schema loaded from server/src/main/resources/db/schema.sql) browser (for UI issues): in-app Chromium at 1280x720 ### Connected RocketMQ Cluster RocketMQ version: 5.3.2 (official apache/rocketmq:5.3.2 image) access mode: Direct to NameServer (127.0.0.1:9876) deployment: single NameServer + single broker started from the official image ### Build Toolchain JDK: Temurin 21.0.12 Maven: 3.9.9 Node.js: 20.19.5 ### Describe the Bug Two pages load the instance list with a handler that turns a failure into an empty selection plus a transient toast: - `web/src/pages/ops/alerts.tsx:388-391` (the alert-rule dialog's instance picker, on both 集群告警 and 业务告警): `listInstances().then(setInstances).catch(() => message.error(...))`. Once the toast fades the picker is empty, carries no error status and offers no retry, so the operator cannot tell "the request failed" from "this deployment has no instances" - and cannot create or test a rule until the page is reloaded. - `web/src/pages/studio/BrokerCluster.tsx:226-247` (集群管理 → RocketMQ 集群): its `catch` additionally calls `clearData()`, discarding the broker / NameServer / proxy tables already on screen, although an instance-list failure says nothing about the topology. It also only toasts. Both are the shape that has already been fixed elsewhere - #4700 for the notification-deliveries filter, #4953 for the instance pages through the shared `InstanceSelect`, #6078 for four more pages (dashboard, data sources, producer, lite topic) and the session-details variant folded into #6144: "a failure becomes a state on the page, the picker goes into its error status, and a retry re-runs the load". These two pages are not in any of those scopes. ### Steps to Reproduce 1. Start Studio against any registered instance (the pages only need `GET /api/instances`). 2. In the browser devtools add a request-blocking rule for `*/api/instances`, then open 集群管理 → RocketMQ 集群: only a transient toast appears, the broker table is cleared, and nothing offers a retry. 3. With the same blocking rule, open 集群告警 → 新建规则: the instance picker is empty with no error status, and the toast from the page load is long gone. ### What Did You Expect to See? Both pages keep the options they already had, mark the picker as errored, and render the failure with a retry that re-runs the load - the shape the pages listed above already use. ### What Did You See Instead? An empty instance picker with only a transient toast and no retry (both pages), and on the broker-cluster page the already-loaded broker/NameServer/proxy topology is discarded as well. ### Additional Context Verified on `rocketmq-studio@6c9f74a7` against the real stack (MySQL 8.0.46 + RocketMQ 5.3.2 + frontend and backend from source). A fix with two regression cases (`AlertsPage.test.tsx`, `BrokerCluster.test.tsx`) is submitted: each case blocks `listInstances`, asserts the failure text and a retry that reaches the wire twice, clears the message and (on the cluster page) recovers the topology. Both cases fail on the previous code - "Unable to find an accessible element with the role button and name 重试" and "Unable to find an element with the text: 实例列表加载失败,请稍后重试" - and the two suites are 50/50 green with the fix. AI assistance: the reproduction, the fix and the tests were prepared with AI assistance (OpenAI Codex / ZCode); every statement above was verified against the running stack before it was written down. ### 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]
