yyqdbngt opened a new pull request, #2944: URL: https://github.com/apache/rocketmq-dashboard/pull/2944
## Summary `RocketMQDashboardProvider.clusterTypeFor` switched directly on `instance.getType()`. Instance rows persisted before the `type` column was introduced carry a null type (the repository explicitly maps a null type to null), and a null enum in a switch throws NPE. The null now normalizes to `PROXY_CLUSTER`, the same generic bucket the rest of the code path already assigns to non-DIRECT instances (`configuredNameServers` stays null, proxies render as "not discoverable" instead of "zero"). ## Why A single legacy type-less instance row 500ed the entire dashboard: in the aggregate path the NPE was raised inside the catch block that is supposed to degrade that instance to a warning row, so no per-instance isolation was left in place. The direct `?instanceId=` path had the same NPE. ## Testing ``` cd server && mvn -Dtest="RocketMQDashboardProviderTest" test ``` Tests run: 31, Failures: 0, Errors: 0, Skipped: 0 New regression tests `dashboardShouldTreatTypelessInstanceAsProxyCluster` (type-less instance renders a healthy V5_PROXY_CLUSTER row) and `dashboardShouldKeepAggregationAliveWhenTypelessInstanceFails` (type-less instance whose admin call fails degrades to a warning row instead of NPE-ing the whole page). -- 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]
