unbridled-41 commented on PR #4889:
URL:
https://github.com/apache/rocketmq-dashboard/pull/4889#issuecomment-5773793006
### Evidence record for the closed branch (for whoever reads this later)
Closing as a duplicate, but the defect was verified real on this branch
before it was closed, and the reproduction is kept here so it does not have to
be rediscovered. Note that #4690 implements the **identical** fallback; #4574
fixes the same 500 by making `id` optional in the schemas instead.
**Why it is real**
- `TencentAclService.toRule` / `.toUser` build the projections without an id
(`provider/tencent/TencentAclService.java`), and `AclService.listRules` /
`listUsers` / `getRule` / `getUser` dispatch to them for a role-backed instance.
- `AclRuleItem` / `AclUserItem` are `@JsonInclude(Include.NON_NULL)` and
filled `id` from the numeric primary key only, so the key was **omitted** from
the payload.
- The tool catalog requires it: `tool-catalog/tools/acl.yaml`
(`rmq.acl.list` item `required: [id, principal, resource]`) and `user.yaml`
(item `required: [id, username, admin, clusters]`), and
`ToolSchemaValidator.validateOutput` throws on a violation — mapped by
`ToolExecutionService` to `UNEXPECTED_EXECUTION_FAILURE` (HTTP 500 /
`INTERNAL_ERROR`).
- Reachability is not blocked by gating: both tools need `ACL_MANAGEMENT`,
which `TencentInstanceProvider.capabilities()` declares, and an empty role list
validates fine — the failure appears exactly when there is something to list.
**Reproduced on this branch (test kept, main sources reverted)**
```
java.lang.IllegalStateException: Tool output validation failed for
rmq.acl.list:
[/items/0: required property 'id' not found]
java.lang.IllegalStateException: Tool output validation failed for
rmq.user.get:
[: required property 'id' not found]
Tests run: 2, Failures: 2, Errors: 0
```
Also confirmed independently of the tests:
`ObjectMapper.convertValue(Map.of("instanceId","x"),
AclListInput.class).page()` returns `PageRequest[page=1, pageSize=20]` (the
compact constructor defaults it), which is why the sibling "missing page"
hypothesis for these handlers does not hold.
The two new regression tests on this branch
(`AclListToolHandlerTest.executeShouldIdentifyARuleThatHasNoNumericId`,
`UserGetToolHandlerTest.executeShouldIdentifyAUserThatHasNoNumericId`) pass
with the fallback; they are redundant with #4690's
`CloudAclIdentifierProjectionTest`, which is why this branch is not kept open.
--
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]