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/09/09 04:50:39 UTC
[PR] fix(ai): accept unavailable topology counts in the dashboard summary tool [rocketmq-dashboard]
zjncs opened a new pull request, #4184:
URL: https://github.com/apache/rocketmq-dashboard/pull/4184
## Motivation
`rmq.dashboard.summary` fails with `IllegalStateException` on every real V5 or multi-instance deployment.
The tool's output schema (from #642) declares `cluster.proxies`, `stats.totalProxies` and `stats.totalNameServers` as required plain integers. But #2419 (`e9f5df9a`, "preserve unavailable dashboard topology counts") deliberately made those counts nullable on the provider side, and the handler was never updated:
- `RocketMQDashboardProvider.collectDashboardData` sets `.proxies(V4_DIRECT ? 0 : null)` for every V5 proxy cluster and `.totalProxies(V4_DIRECT ? 0 : null)` in stats;
- `unavailableInstanceCluster` does the same for unreachable instances;
- `aggregateInstances` sets `.totalProxies(null)` **unconditionally** — so any deployment with registered Apache instances hits it;
- `unavailableTopologyDashboard` sets both `totalProxies` and `totalNameServers` to null.
`DashboardSummaryToolHandler` passes the values straight through and `ToolGatewayService.validateOutput` rejects the result:
```
IllegalStateException: Tool output validation failed for rmq.dashboard.summary:
[/cluster/proxies: null found, integer expected,
/stats/totalNameServers: null found, integer expected,
/stats/totalProxies: null found, integer expected]
```
The existing gateway test masked this by stubbing `.proxies(1)`/`.totalProxies(1)`, so the production wiring was never exercised.
## Modification
Allow `null` for the three topology-count fields in `tool-catalog/rmq-tools.yaml` using the same type-list convention the nameserver config diff tool already uses (`type: [string, 'null']`). This keeps #2419's semantics — null means "unknown/unavailable", not zero — for AI consumers, and requires no handler change since the handler already passes the counts through.
## Verification
Fail-before (schema change stashed, test kept):
```
[ERROR] Tests run: 33, Errors: 1
ToolGatewayServiceTest.executesDashboardSummaryWhenTopologyCountsAreUnavailable »
IllegalStateException: Tool output validation failed for rmq.dashboard.summary:
[/cluster/proxies: null found, integer expected, /stats/totalNameServers: null found,
integer expected, /stats/totalProxies: null found, integer expected]
```
This is exactly the failure every V5/multi-instance deployment hits in production.
Pass-after (fix applied):
```
ToolGatewayServiceTest Tests run: 33, Failures: 0, Errors: 0
ToolCatalogTest Tests run: 6, Failures: 0, Errors: 0
```
New test `executesDashboardSummaryWhenTopologyCountsAreUnavailable` drives the full gateway (schema validation included) with a V5 proxy cluster whose proxy counts are unavailable, and asserts the tool succeeds with `proxies`/`totalProxies`/`totalNameServers` present as null.
--
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: [PR] fix(ai): accept unavailable topology counts in the dashboard summary tool [rocketmq-dashboard]
Posted by "zjncs (via GitHub)" <gi...@apache.org>.
zjncs closed pull request #4184: fix(ai): accept unavailable topology counts in the dashboard summary tool
URL: https://github.com/apache/rocketmq-dashboard/pull/4184
--
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: [PR] fix(ai): accept unavailable topology counts in the dashboard summary tool [rocketmq-dashboard]
Posted by "zjncs (via GitHub)" <gi...@apache.org>.
zjncs commented on PR #4184:
URL: https://github.com/apache/rocketmq-dashboard/pull/4184#issuecomment-5634482405
Closing as superseded: #4115 (206314b9) already made `cluster.proxies`, `stats.totalProxies` and `stats.totalNameServers` `type: [integer, 'null']` in `rmq-tools.yaml` and landed the equivalent `executesDashboardSummaryWhenTopologyCountsAreUnavailable` gateway test, so this change is now fully covered by `rocketmq-studio` — the same fold-in that closed #4117/#4134/#4135/#4137.
Nothing further is needed from this branch; #4185 (which was stacked on it) has been rebased directly onto current `rocketmq-studio` with only its own key-query truncation change.
--
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: [PR] fix(ai): accept unavailable topology counts in the dashboard summary tool [rocketmq-dashboard]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on PR #4184:
URL: https://github.com/apache/rocketmq-dashboard/pull/4184#issuecomment-5606938602
⚠️ **Merge conflict detected**
This PR has conflicts with the base branch and cannot be merged. Please rebase or merge the base branch into your branch and resolve the conflicts:
```bash
git fetch origin
git checkout fix/dashboard-summary-nullable-topology
git rebase origin/develop
# resolve conflicts, then:
git push --force-with-lease
```
This is a one-time reminder. Feel free to @mention me for a re-review after conflicts are resolved.
---
*Automated notification by github-manager-bot*
--
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