X-LightYear opened a new pull request, #4898:
URL: https://github.com/apache/rocketmq-dashboard/pull/4898

   ## Summary
   
   - keep instance-scoped cluster configuration resolution bound to the 
selected instance
   - prevent global repository fallback when an instance lookup cannot resolve 
a cluster
   - add deterministic regression coverage
   
   ## Root cause
   
   `ClusterService.resolveCluster(clusterId, instanceId)` fell back to the 
global `ClusterRepository` whenever the instance-scoped provider returned no 
cluster. The repository entries are not instance-bound, so this could produce a 
configuration preview or update for a cluster outside the requested instance.
   
   ## Fix
   
   Keep the existing global fallback only for clusterId-only lookups. For a 
nonblank `instanceId`, report cluster details unavailable when the 
instance-scoped provider cannot resolve the target.
   
   ## Testing
   
   - `mvn 
-Dtest=ClusterServiceTest#previewClusterConfigShouldNotUseGlobalClusterWhenInstanceScopedLookupFails
 test` — passed
   - `mvn -Dtest=ClusterServiceTest test` — 44 passed
   - `mvn 
-Dtest=ClusterServiceTest,ClusterControllerTest,BrokerConfigDiffServiceTest,NameServerConfigDiffServiceTest
 test` — 100 passed
   - `mvn -DskipTests package` — passed
   - Checkstyle — 0 violations
   
   Fixes #4897


-- 
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]

Reply via email to