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

   ### Before Creating the Bug Report
   
   - [x] Searched open and closed issues/PRs and checked related diffs.
   - [x] This concerns RocketMQ Studio.
   - [x] The exact inspected version and runtime scope are stated below.
   
   ### Studio Version
   
   `rocketmq-studio` at `4c697f07acde460e2344375cb1f82669f5b270fd`.
   
   ### Runtime Environment
   
   Source inspection of the frontend test fixtures against the backend sources; 
no live backend
   required.
   
   ### Summary
   
   Two test-only fixtures pin values the backend never sends, so the tests 
assert a contract the API
   does not have (and mock mode offers filter options for operations that 
cannot exist):
   
   1. **`web/src/mock/audit.ts`** carries `RESTART_BROKER` rows (no producer 
anywhere in
      `server/src/main/java` — the operation is absent from 
`OperationAuditConstants` and from every
      `auditService.record(...)` call), `UPDATE_ACL` + resourceType `TOPIC` 
(ACL changes are recorded
      as `*_ACL_RULE` against `ACL_RULE`, `AclService.java:117,158,172`), and
      `UPDATE_BROKER_CONFIG` + resourceType `CLUSTER` (recorded against 
`BROKER`,
      `RocketMQBrokerConfigService.java:94`). `getMockAuditFilterOptions` 
derives the audit page's
      filter options from these rows, so mock mode offers filters for 
operations nothing can produce.
   2. **`web/src/api/clusterContract.test.ts`** pins `status: 'RUNNING'` on the 
cluster, broker,
      proxy and NameServer, while `ClusterStatus` serializes as
      `healthy/warning/error/offline` and `BrokerStatus` as 
`running/readonly/maintenance` — the
      contract test pins a value the API never serializes.
   
   ### Expected
   
   Test fixtures and mocks should pin the values the backend actually 
records/serializes, per the
   same rationale as #4733 (mock fixtures teaching the old contract kept the 
rendering bug alive).
   
   ### Reproduction
   
   `grep -n "RESTART_BROKER" web/src/mock/audit.ts` (fixture rows) vs
   `grep -rn "RESTART_BROKER" server/src/main/java` (zero hits); same for 
`UPDATE_ACL` and
   `'RUNNING'` in the two fixture files.
   
   Fix: PR #4787.
   


-- 
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