zjncs opened a new issue, #5776: URL: https://github.com/apache/rocketmq-dashboard/issues/5776
## Summary While renaming the nameserver upgrade field in #5620, a second DTO-contract mismatch turned up on the update path. `UpdateNameServerDTO` (server/src/main/java/org/apache/rocketmq/studio/cluster/nameserver/UpdateNameServerDTO.java) declares only `clusterId`, `addr` and `version` — it has no `newAddr` field. However, the frontend's `updateNameServer` layers declare and send one: - `web/src/api/cluster.ts:327` — `newAddr?: string` posted to `/nameservers/update` - `web/src/services/clusterService.ts:413` — the service layer forwards it (and its mock mode relies on it to rewrite the address) Because the DTO has no matching field, Jackson silently drops `newAddr` on the server, so a nameserver address update can never take effect against the real backend — the request binds without it and the old address is kept. The existing test at `web/src/api/cluster.test.ts` (`/nameservers/update` case) currently pins the `newAddr` key, so the mismatch is invisible to the suite. ## Suggested fix Either add a `newAddr` field to `UpdateNameServerDTO` (and make the controller/service apply it), or align the frontend callers with the DTO's actual fields. The mock-mode address rewrite in `clusterService.ts` needs to follow whichever contract wins. Found during review of #5620 (reported there by @lizhimins); kept out of that PR to leave it single-purpose. -- 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]
