juicewcode opened a new pull request, #6965:
URL: https://github.com/apache/shenyu/pull/6965

    Fixes #6865
   
   
    ## Summary
   - For a Dubbo/Sofa ingress that uses a zookeeper service name as the 
register address,
     `IngressReconciler.getZookeeperUrl` fetched `V1Endpoints` from the lister. 
When the service has no Endpoints yet,
     `v1Endpoints` is null and `v1Endpoints.getSubsets()` threw an NPE during 
reconcile, blocking route configuration. This PR
     adds a null check on `v1Endpoints`: when no Endpoints are found it logs a 
clear message and falls through to the
     existing `ShenyuException` fallback (the same path as empty subsets), so 
no NPE is thrown.
   
    - Added `IngressReconcilerZookeeperUrlTest` with two cases — 
`testReconcileWithoutZookeeperEndpoints` verifies
     the graceful `ShenyuException` fallback instead of an NPE (regression); 
`testReconcileWithZookeeperEndpoints` verifies
     the service name is still resolved to the Pod IP 
(`zookeeper://127.0.0.1:2181`) and written into the dubbo plugin config
     (normal path).
   
   
   <!-- Describe your PR here; e.g. Fixes #issueNo -->
   
   <!--
   Thank you for proposing a pull request. This template will guide you through 
the essential steps necessary for a pull request.
   -->
   Make sure that:
   
   - [x] You have read the [contribution 
guidelines](https://shenyu.apache.org/community/contributor-guide).
   - [x] You submit test cases (unit or integration tests) that back your 
changes.
   - [x] Your local test passed `./mvnw clean install 
-Dmaven.javadoc.skip=true`.
   


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