unbridled-41 opened a new issue, #5472:
URL: https://github.com/apache/rocketmq-dashboard/issues/5472
### Studio Version
branch: `rocketmq-studio` @ `6a68042f` (the revision verified; the branch is
based on it)
deployed as: built from source (unit test)
### Runtime Environment
Not environment-specific: frontend failure state.
### Connected RocketMQ Cluster
Any instance where a detail request fails transiently.
### Describe the Bug
Opening a topic's detail awaited the consumer page **before** the route
lookup inside one `try`, so a failing consumers request skipped the route
request entirely. The render then derived everything from the empty fallback:
`analyzeTopicRoutes([])` returns the critical `NO_ROUTE`, and the alert's
action is gated only on `routes.length === 0`, so **在 Broker 上重建** is offered
for a topic that exists — clicking it calls `createTopic`, which the server
implements as `admin.createAndUpdateTopicConfig`, i.e. it rewrites the existing
topic's queue counts/perm. The consumer table used the same fallback and
rendered an empty "no consumers" table with only a transient toast for the
failure.
### Steps to Reproduce
1. Open the topic page and click 详情 while `GET
/topics/{name}/consumers/page` or `GET /topics/{name}/routes` returns a 5xx.
2. Observe the route verdict and the rebuild button for a topic that exists
on the broker.
### What Did You Expect to See?
A failed request is reported as a failure, and the rebuild action appears
only when the topic really has no route.
### What Did You See Instead?
A transient failure is presented as a definitive broker-state verdict next
to an action that rewrites a live topic's configuration.
### Evidence
- `web/src/pages/instance/topic.tsx` (`openDetail`, the route alert's action
gate, the consumer table's fallback).
- `cd web && npx vitest run src/pages/instance/__tests__/TopicPage.test.tsx`
— two added cases fail before the change (`getTopicRoutes` never called when
the consumer page fails; `Unable to find an element with the text: 路由诊断:加载失败`)
and pass after (`Tests 36 passed`).
### Impact
A transient failure looks like a broker-state verdict and invites a
destructive-looking repair of an existing topic.
### Acceptance Criteria
- The two loads are independent; a failed route lookup offers a retry
instead of the rebuild action; the consumer table labels its failure.
- Regression tests pin both.
**Corresponding PR:** #5442
--
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]