iloveeyjafjalla opened a new issue, #6408:
URL: https://github.com/apache/rocketmq-dashboard/issues/6408

   ### 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: 779b8c0e (failure handling read on 6c9f74a7, re-verified on 
779b8c0e)
   deployed as: built from source (frontend `npm run dev`, backend from the 
Maven build)
   
   ### Runtime Environment
   
   OS: Windows 11 (backend and frontend run on the host)
   MySQL: 8.0.46 container from deploy/docker-compose.yml
   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
   (The page under test does not talk to the cluster - the certificate records 
are Studio-local metadata.)
   
   ### Build Toolchain
   
   JDK: Temurin 21.0.12
   Maven: 3.9.9
   Node.js: 20.19.5
   
   ### Describe the Bug
   
   `web/src/pages/cluster/certs.tsx` loads the certificate inventory once on 
mount and answers a failure with a transient toast only:
   
   ```
   useEffect(() => {
     listK8sCerts().then(...).catch((error) => 
message.error(describeThrownMessage(error) || DEFAULT_REQUEST_ERROR));
   }, []);
   ```
   
   The rows stay empty, so once the toast fades the page renders the header `共 
${filteredCerts.length} 个证书` - i.e. **共 0 个证书** - together with the table's 
empty state, no error state and no retry (the effect never re-runs). An 
operator auditing certificate expiry therefore reads a failed read as "this 
deployment has no certificates"; the only recovery is a full page reload.
   
   The page is the odd one out: `components/GrafanaDashboardList.tsx` already 
keeps a `loadError` state, renders an `Alert type="error"` and offers a 
`common.retry` that re-runs its load - the same shape the maintainers have 
applied to the other lists (#6113/#6144 session details, #6077/#6078 instance 
list, #6089 cluster registry, #6095 proxy list).
   
   ### Steps to Reproduce
   
   1. Open 集群管理 → K8s 证书配置 with at least one certificate stored.
   2. In the browser devtools add a request-blocking rule for `*/api/k8s-certs` 
and reload the page.
   3. The table is empty, the header reads 共 0 个证书, and there is no retry 
control.
   
   ### What Did You Expect to See?
   
   A failed read is a state on the page: the count is not asserted as a 
measured zero, and an error banner offers a retry that re-runs the load.
   
   ### What Did You See Instead?
   
   共 0 个证书 + an empty table + a transient toast, with no retry and no way to 
tell the failure from an empty inventory.
   
   ### Additional Context
   
   Verified on rocketmq-studio@779b8c0e. A fix with a regression case in 
`K8sCertsPage.test.tsx` is submitted: the case rejects `listK8sCerts`, asserts 
the banner, the unavailable header and a retry that recovers the rows. It fails 
on the previous code ("Unable to find an element with the text: 获取数据失败"), and 
the suite is 12/12 with the fix (also `eslint` + `prettier --check` + `tsc -b` 
clean).
   
   AI assistance: prepared with AI assistance (OpenAI Codex / ZCode); every 
statement was checked against the code and the test suite 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]

Reply via email to