iloveeyjafjalla opened a new issue, #6832:
URL: https://github.com/apache/rocketmq-dashboard/issues/6832
### Studio Version
branch: `rocketmq-studio` @ `a92c2314` (the revision this was verified on)
### Runtime Environment
The repository's own stack (backend on 8888 against its MySQL, two clusters
discovered from the NameServer at 9876/9877). No RocketMQ cluster problem is
involved: this is the console's own contract.
### Describe the Bug
`GET /api/clusters` puts two keys on every cluster that the endpoint's
contract does not have, both always `null`:
```json
{
"id": "DefaultCluster",
"gmtCreate": null,
"gmtModified": null,
"name": "DefaultCluster",
"nsClusterName": null,
"type": "V4_DIRECT",
"endpoint": null,
"status": "healthy",
...
}
```
`docs/api-spec.md` defines the response as `ClusterInfo[]` with the fields
`id`, `name`, `nsClusterName`, `type`, `endpoint`, `status`, `version`,
`brokers`, `proxies`, `nameServers`, `config`, `topicCount`, `groupCount`,
`tpsHistory` — no `gmtCreate` / `gmtModified`. The console reads neither field
(`grep -rn "gmtCreate\|gmtModified" web/src/pages/cluster/index.tsx` is empty;
`web/src/api/cluster.ts` only carries them in the type).
### Root Cause
`cluster/broker/ClusterVO` declares the two bookkeeping columns of its own
(`ClusterVO.java:44-45`), and **nothing ever fills them**: a cluster in this
list is discovered from the NameServer (`ClusterService` / the provider probes)
rather than read from a registry row, and there is no builder call, setter call
or entity copy that assigns either field. So they serialize as an always-null
pair on every entry.
This is the same shape as #6759 on the audit feed, a different endpoint and
a different view.
### Expected Behavior
The cluster list serializes the fourteen documented fields and nothing else.
The columns can stay on the view class for whatever internal use wants them;
only this endpoint's wire shape changes.
--
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]