You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zjncs (via GitHub)" <gi...@apache.org> on 2026/10/06 05:50:33 UTC

[I] cluster: upgradeNameServer sends `version` but UpgradeNameServerDTO requires `targetVersion` — the request is always rejected with 400 [rocketmq-dashboard]

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

   ## Description
   
   The frontend's nameserver upgrade call declares and posts the wrong field (`web/src/api/cluster.ts:308-314`, passthrough `web/src/services/clusterService.ts:372-384`):
   
   ```ts
   export async function upgradeNameServer(data: {
     clusterId: string;
     addr: string;
     version: string;      // <-- the DTO field is targetVersion
   }) {
     await client.post('/nameservers/upgrade', data);
   }
   ```
   
   The backend contract is unambiguous:
   
   - `UpgradeNameServerDTO` declares `@NotBlank(message = "targetVersion is required") private String targetVersion;`
   - `NameServerController.upgradeNameServer` consumes it with `@Valid`
   - the Java service reads `command.getTargetVersion()` (`ClusterService.java:611`)
   
   So any caller following the function's declared type sends `version`, Jackson silently drops the unknown key, and the `@NotBlank` validation rejects the request with **400 "targetVersion is required"** — the API function can never succeed.
   
   First-hand demonstration on master (calling the function per its declared signature, asserting the posted body):
   
   ```
   expect(seen.targetVersion).toBe('5.3.1')
   // AssertionError: expected undefined to be '5.3.1'  (body carries `version` instead)
   ```
   
   No page currently calls the function (it is exported API surface), which is why the break went unnoticed.
   
   ## Expected behavior
   
   The function (both layers) declares and sends `targetVersion`, matching the DTO.
   
   ## Environment
   
   - branch: master (0228dad5)
   - files: `web/src/api/cluster.ts`, `web/src/services/clusterService.ts`


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] cluster: upgradeNameServer sends `version` but UpgradeNameServerDTO requires `targetVersion` — the request is always rejected with 400 [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5619:
URL: https://github.com/apache/rocketmq-dashboard/issues/5619#issuecomment-6159436097

   This issue has been automatically closed because there has been no activity for 7 days. If you believe this issue is still relevant, please reopen it with updated information.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] cluster: upgradeNameServer sends `version` but UpgradeNameServerDTO requires `targetVersion` — the request is always rejected with 400 [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #5619: cluster: upgradeNameServer sends `version` but UpgradeNameServerDTO requires `targetVersion` — the request is always rejected with 400
URL: https://github.com/apache/rocketmq-dashboard/issues/5619


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org