poliglots opened a new pull request, #7031: URL: https://github.com/apache/shenyu/pull/7031
When the 'shenyu.apache.org/plugin-context-path-path' annotation is absent, annotations.get() returns null, and null + '/**' produced the literal string 'null/**' as a path pattern rule condition. This created phantom rules that never matched real traffic. - Add null guard: skip rule creation when context-path annotation is not set - Change getRuleConditionList and createRuleData to accept String params directly - Add test cases for missing annotation, present annotation, and empty string Fixes #6863 - [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`. Test results: ``` [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for shenyu 2.7.2-SNAPSHOT: [INFO] [INFO] shenyu ............................................. SUCCESS [ 2.256 s] [INFO] shenyu-common ...................................... SUCCESS [ 28.722 s] [INFO] shenyu-disruptor ................................... SUCCESS [ 3.224 s] [INFO] shenyu-register-center ............................. SUCCESS [ 0.161 s] [INFO] shenyu-register-common ............................. SUCCESS [ 0.510 s] [INFO] shenyu-alert ....................................... SUCCESS [ 0.738 s] [INFO] shenyu-admin-listener .............................. SUCCESS [ 0.117 s] [INFO] shenyu-admin-listener-api .......................... SUCCESS [ 2.147 s] [INFO] shenyu-admin-listener-consul ....................... SUCCESS [ 3.724 s] [INFO] shenyu-infra ....................................... SUCCESS [ 0.084 s] [INFO] shenyu-infra-common ................................ SUCCESS [ 0.354 s] [INFO] shenyu-infra-etcd .................................. SUCCESS [ 6.358 s] [INFO] shenyu-admin-listener-etcd ......................... SUCCESS [ 3.121 s] [INFO] shenyu-infra-nacos ................................. SUCCESS [ 1.569 s] [INFO] shenyu-admin-listener-nacos ........................ SUCCESS [ 3.475 s] [INFO] shenyu-admin-listener-polaris ...................... SUCCESS [ 4.204 s] [INFO] shenyu-infra-zookeeper ............................. SUCCESS [ 2.890 s] [INFO] shenyu-admin-listener-zookeeper .................... SUCCESS [ 3.522 s] [INFO] shenyu-spi ......................................... SUCCESS [ 1.566 s] [INFO] shenyu-registry .................................... SUCCESS [ 0.105 s] [INFO] shenyu-registry-api ................................ SUCCESS [ 1.634 s] [INFO] shenyu-registry-zookeeper .......................... SUCCESS [ 3.443 s] [INFO] shenyu-registry-etcd ............................... SUCCESS [ 4.077 s] [INFO] shenyu-registry-consul ............................. SUCCESS [ 3.031 s] [INFO] shenyu-registry-nacos .............................. SUCCESS [ 2.826 s] [INFO] shenyu-registry-polaris ............................ SUCCESS [ 2.860 s] [INFO] shenyu-registry-eureka ............................. SUCCESS [ 3.878 s] [INFO] shenyu-registry-kubernetes ......................... SUCCESS [ 3.175 s] [INFO] shenyu-registry-core ............................... SUCCESS [ 3.091 s] [INFO] shenyu-register-client ............................. SUCCESS [ 0.065 s] [INFO] shenyu-register-client-api ......................... SUCCESS [ 2.703 s] [INFO] shenyu-register-client-http ........................ SUCCESS [ 3.732 s] [INFO] shenyu-client ...................................... SUCCESS [ 0.084 s] [INFO] shenyu-client-api-docs-annotations ................. SUCCESS [ 0.163 s] [INFO] shenyu-client-core ................................. SUCCESS [ 7.109 s] [INFO] shenyu-client-mcp .................................. SUCCESS [ 0.179 s] [INFO] shenyu-client-mcp-common ........................... SUCCESS [ 0.463 s] [INFO] shenyu-admin ....................................... SUCCESS [ 53.398 s] [INFO] shenyu-admin-listener-apollo ....................... SUCCESS [ 6.226 s] [INFO] shenyu-sync-data-center ............................ SUCCESS [ 0.078 s] [INFO] shenyu-sync-data-api ............................... SUCCESS [ 3.214 s] [INFO] shenyu-plugin ...................................... SUCCESS [ 0.138 s] [INFO] shenyu-plugin-api .................................. SUCCESS [ 1.726 s] [INFO] shenyu-loadbalancer ................................ SUCCESS [ 11.369 s] [INFO] shenyu-plugin-base ................................. SUCCESS [ 6.113 s] [INFO] shenyu-web ......................................... SUCCESS [ 8.212 s] [INFO] shenyu-plugin-proxy ................................ SUCCESS [ 0.152 s] [INFO] shenyu-plugin-divide ............................... SUCCESS [ 5.112 s] [INFO] shenyu-spring-boot-starter ......................... SUCCESS [ 0.196 s] [INFO] shenyu-spring-boot-starter-plugin .................. SUCCESS [ 0.099 s] [INFO] shenyu-spring-boot-starter-plugin-divide ........... SUCCESS [ 2.194 s] [INFO] shenyu-plugin-httpclient ........................... SUCCESS [ 10.262 s] [INFO] shenyu-spring-boot-starter-plugin-httpclient ....... SUCCESS [ 3.078 s] [INFO] shenyu-plugin-global ............................... SUCCESS [ 3.082 s] [INFO] shenyu-spring-boot-starter-plugin-global ........... SUCCESS [ 2.760 s] [INFO] shenyu-plugin-context-path ......................... SUCCESS [ 4.305 s] [INFO] shenyu-spring-boot-starter-plugin-context-path ..... SUCCESS [ 2.327 s] [INFO] shenyu-plugin-response ............................. SUCCESS [ 5.060 s] [INFO] shenyu-spring-boot-starter-plugin-response ......... SUCCESS [ 2.275 s] [INFO] shenyu-plugin-uri .................................. SUCCESS [ 3.352 s] [INFO] shenyu-spring-boot-starter-plugin-uri .............. SUCCESS [ 2.166 s] [INFO] shenyu-plugin-rpc .................................. SUCCESS [ 0.138 s] [INFO] shenyu-plugin-transform ............................ SUCCESS [ 3.761 s] [INFO] shenyu-spring-boot-starter-plugin-transform ........ SUCCESS [ 2.269 s] [INFO] shenyu-spring-boot-starter-gateway ................. SUCCESS [ 4.797 s] [INFO] shenyu-plugin-fault-tolerance ...................... SUCCESS [ 0.142 s] [INFO] shenyu-plugin-hystrix .............................. SUCCESS [ 4.206 s] [INFO] shenyu-spring-boot-starter-plugin-hystrix .......... SUCCESS [ 2.448 s] [INFO] shenyu-plugin-cache ................................ SUCCESS [ 0.142 s] [INFO] shenyu-plugin-cache-spi ............................ SUCCESS [ 0.238 s] [INFO] shenyu-plugin-ai ................................... SUCCESS [ 0.063 s] [INFO] shenyu-plugin-ai-common ............................ SUCCESS [ 4.155 s] [INFO] shenyu-infra-redis ................................. SUCCESS [ 3.341 s] [INFO] shenyu-plugin-cache-redis .......................... SUCCESS [ 4.431 s] [INFO] shenyu-plugin-ratelimiter .......................... SUCCESS [ 5.758 s] [INFO] shenyu-spring-boot-starter-plugin-ratelimiter ...... SUCCESS [ 2.360 s] [INFO] shenyu-plugin-security ............................. SUCCESS [ 0.123 s] [INFO] shenyu-plugin-sign ................................. SUCCESS [ 4.680 s] [INFO] shenyu-spring-boot-starter-plugin-sign ............. SUCCESS [ 2.866 s] [INFO] shenyu-plugin-waf .................................. SUCCESS [ 3.789 s] [INFO] shenyu-spring-boot-starter-plugin-waf .............. SUCCESS [ 2.125 s] [INFO] shenyu-plugin-rewrite .............................. SUCCESS [ 3.468 s] [INFO] shenyu-spring-boot-starter-plugin-rewrite .......... SUCCESS [ 2.216 s] [INFO] shenyu-plugin-sentinel ............................. SUCCESS [ 4.211 s] [INFO] shenyu-spring-boot-starter-plugin-sentinel ......... SUCCESS [ 2.754 s] [INFO] shenyu-plugin-sofa ................................. SUCCESS [ 5.322 s] [INFO] shenyu-spring-boot-starter-plugin-sofa ............. SUCCESS [ 2.510 s] [INFO] shenyu-plugin-resilience4j ......................... SUCCESS [ 4.698 s] [INFO] shenyu-spring-boot-starter-plugin-resilience4j ..... SUCCESS [ 2.312 s] [INFO] shenyu-plugin-tars ................................. SUCCESS [ 0.529 s] [INFO] shenyu-spring-boot-starter-plugin-tars ............. SUCCESS [ 2.248 s] [INFO] shenyu-protocol .................................... SUCCESS [ 0.070 s] [INFO] shenyu-protocol-grpc ............................... SUCCESS [ 3.864 s] [INFO] shenyu-plugin-grpc ................................. SUCCESS [ 7.400 s] [INFO] shenyu-spring-boot-starter-plugin-grpc ............. SUCCESS [ 2.677 s] [INFO] shenyu-plugin-redirect ............................. SUCCESS [ 4.231 s] [INFO] shenyu-spring-boot-starter-plugin-redirect ......... SUCCESS [ 2.434 s] [INFO] shenyu-plugin-logging .............................. SUCCESS [ 0.140 s] [INFO] shenyu-plugin-logging-desensitize-api .............. SUCCESS [ 3.059 s] [INFO] shenyu-plugin-logging-common ....................... SUCCESS [ 4.949 s] [INFO] shenyu-plugin-logging-console ...................... SUCCESS [ 4.631 s] [INFO] shenyu-spring-boot-starter-plugin-logging-console .. SUCCESS [ 2.461 s] [INFO] shenyu-plugin-modify-response ...................... SUCCESS [ 4.088 s] [INFO] shenyu-spring-boot-starter-plugin-modify-response .. SUCCESS [ 2.574 s] [INFO] shenyu-plugin-request .............................. SUCCESS [ 4.713 s] [INFO] shenyu-spring-boot-starter-plugin-request .......... SUCCESS [ 2.495 s] [INFO] shenyu-plugin-oauth2 ............................... SUCCESS [ 3.832 s] [INFO] shenyu-spring-boot-starter-plugin-oauth2 ........... SUCCESS [ 2.706 s] [INFO] shenyu-plugin-jwt .................................. SUCCESS [ 4.916 s] [INFO] shenyu-spring-boot-starter-plugin-jwt .............. SUCCESS [ 2.743 s] [INFO] shenyu-plugin-param-mapping ........................ SUCCESS [ 5.628 s] [INFO] shenyu-spring-boot-starter-plugin-param-mapping .... SUCCESS [ 3.455 s] [INFO] shenyu-plugin-cryptor .............................. SUCCESS [ 5.432 s] [INFO] shenyu-spring-boot-starter-plugin-cryptor .......... SUCCESS [ 3.165 s] [INFO] shenyu-plugin-websocket ............................ SUCCESS [ 6.014 s] [INFO] shenyu-spring-boot-starter-plugin-websocket ........ SUCCESS [ 3.060 s] [INFO] shenyu-plugin-dubbo ................................ SUCCESS [ 0.159 s] [INFO] shenyu-plugin-dubbo-common ......................... SUCCESS [ 4.816 s] [INFO] shenyu-spring-boot-starter-plugin-dubbo ............ SUCCESS [ 0.087 s] [INFO] shenyu-spring-boot-starter-plugin-dubbo-common ..... SUCCESS [ 2.497 s] [INFO] shenyu-plugin-apache-dubbo ......................... SUCCESS [ 9.658 s] [INFO] shenyu-spring-boot-starter-plugin-apache-dubbo ..... SUCCESS [ 2.801 s] [INFO] shenyu-plugin-general-context ...................... SUCCESS [ 4.082 s] [INFO] shenyu-spring-boot-starter-plugin-general-context .. SUCCESS [ 2.364 s] [INFO] shenyu-protocol-mqtt ............................... SUCCESS [ 2.844 s] [INFO] shenyu-plugin-mqtt ................................. SUCCESS [ 2.227 s] [INFO] shenyu-spring-boot-starter-plugin-mqtt ............. SUCCESS [ 2.334 s] [INFO] shenyu-plugin-metrics .............................. SUCCESS [ 5.375 s] [INFO] shenyu-spring-boot-starter-plugin-metrics .......... SUCCESS [ 0.539 s] [INFO] shenyu-plugin-logging-rocketmq ..................... SUCCESS [ 5.992 s] [INFO] shenyu-spring-boot-starter-plugin-logging-rocketmq . SUCCESS [ 2.989 s] [INFO] shenyu-plugin-logging-rabbitmq ..................... SUCCESS [ 5.751 s] [INFO] shenyu-spring-boot-starter-plugin-logging-rabbitmq . SUCCESS [ 0.546 s] [INFO] shenyu-plugin-logging-kafka ........................ SUCCESS [02:05 min] [INFO] shenyu-spring-boot-starter-plugin-logging-kafka .... SUCCESS [ 3.218 s] [INFO] shenyu-plugin-logging-elasticsearch ................ SUCCESS [ 7.411 s] [INFO] shenyu-spring-boot-starter-plugin-logging-elasticsearch SUCCESS [ 4.636 s] [INFO] shenyu-plugin-cache-memory ......................... SUCCESS [ 1.884 s] [INFO] shenyu-plugin-cache-handler ........................ SUCCESS [ 6.886 s] [INFO] shenyu-spring-boot-starter-plugin-cache ............ SUCCESS [ 0.423 s] [INFO] shenyu-plugin-mock ................................. SUCCESS [ 3.365 s] [INFO] shenyu-spring-boot-starter-plugin-mock ............. SUCCESS [ 0.322 s] [INFO] shenyu-plugin-logging-aliyun-sls ................... SUCCESS [ 9.742 s] [INFO] shenyu-spring-boot-starter-plugin-logging-aliyun-sls SUCCESS [ 2.731 s] [INFO] shenyu-plugin-logging-pulsar ....................... SUCCESS [ 15.864 s] [INFO] shenyu-spring-boot-starter-plugin-logging-pulsar ... SUCCESS [ 3.816 s] [INFO] shenyu-plugin-logging-tencent-cls .................. SUCCESS [ 6.259 s] [INFO] shenyu-spring-boot-starter-plugin-logging-tencent-cls SUCCESS [ 2.734 s] [INFO] shenyu-plugin-logging-clickhouse ................... SUCCESS [ 5.464 s] [INFO] shenyu-spring-boot-starter-plugin-logging-clickhouse SUCCESS [ 2.929 s] [INFO] shenyu-plugin-casdoor .............................. SUCCESS [ 5.222 s] [INFO] shenyu-spring-boot-starter-plugin-casdoor .......... SUCCESS [ 0.348 s] [INFO] shenyu-plugin-key-auth ............................. SUCCESS [ 4.411 s] [INFO] shenyu-spring-boot-starter-plugin-key-auth ......... SUCCESS [ 2.339 s] [INFO] shenyu-protocol-tcp ................................ SUCCESS [ 4.509 s] [INFO] shenyu-plugin-tcp .................................. SUCCESS [ 3.697 s] [INFO] shenyu-spring-boot-starter-plugin-tcp .............. SUCCESS [ 0.307 s] [INFO] shenyu-plugin-logging-huawei-lts ................... SUCCESS [ 7.552 s] [INFO] shenyu-spring-boot-starter-plugin-logging-huawei-lts SUCCESS [ 2.683 s] [INFO] shenyu-plugin-basic-auth ........................... SUCCESS [ 4.645 s] [INFO] shenyu-spring-boot-starter-plugin-basic-auth ....... SUCCESS [ 0.314 s] [INFO] shenyu-plugin-ai-proxy ............................. SUCCESS [ 21.278 s] [INFO] shenyu-spring-boot-starter-plugin-ai-proxy ......... SUCCESS [ 0.334 s] [INFO] shenyu-plugin-ai-prompt ............................ SUCCESS [ 3.671 s] [INFO] shenyu-spring-boot-starter-plugin-ai-prompt ........ SUCCESS [ 0.320 s] [INFO] shenyu-plugin-ai-token-limiter ..................... SUCCESS [ 0.589 s] [INFO] shenyu-spring-boot-starter-plugin-ai-token-limiter . SUCCESS [ 0.428 s] [INFO] shenyu-plugin-ai-request-transformer ............... SUCCESS [ 6.151 s] [INFO] shenyu-spring-boot-starter-plugin-ai-request-transformer SUCCESS [ 0.451 s] [INFO] shenyu-plugin-ai-response-transformer .............. SUCCESS [ 5.821 s] [INFO] shenyu-spring-boot-starter-plugin-ai-response-transformer SUCCESS [ 0.382 s] [INFO] shenyu-plugin-mcp-server ........................... SUCCESS [ 10.232 s] [INFO] shenyu-spring-boot-starter-plugin-mcp-server ....... SUCCESS [ 0.410 s] [INFO] shenyu-sync-data-zookeeper ......................... SUCCESS [ 3.792 s] [INFO] shenyu-spring-boot-starter-sync-data-center ........ SUCCESS [ 0.092 s] [INFO] shenyu-spring-boot-starter-sync-data-zookeeper ..... SUCCESS [ 9.169 s] [INFO] shenyu-sync-data-websocket ......................... SUCCESS [ 7.612 s] [INFO] shenyu-spring-boot-starter-sync-data-websocket ..... SUCCESS [ 8.608 s] [INFO] shenyu-sync-data-http .............................. SUCCESS [ 8.857 s] [INFO] shenyu-spring-boot-starter-sync-data-http .......... SUCCESS [ 8.799 s] [INFO] shenyu-sync-data-nacos ............................. SUCCESS [ 1.931 s] [INFO] shenyu-spring-boot-starter-sync-data-nacos ......... SUCCESS [ 6.694 s] [INFO] shenyu-sync-data-etcd .............................. SUCCESS [ 3.548 s] [INFO] shenyu-spring-boot-starter-sync-data-etcd .......... SUCCESS [ 0.370 s] [INFO] shenyu-sync-data-consul ............................ SUCCESS [ 4.792 s] [INFO] shenyu-spring-boot-starter-sync-data-consul ........ SUCCESS [ 0.346 s] [INFO] shenyu-sync-data-apollo ............................ SUCCESS [ 5.553 s] [INFO] shenyu-spring-boot-starter-sync-data-apollo ........ SUCCESS [ 22.367 s] [INFO] shenyu-sync-data-polaris ........................... SUCCESS [ 3.851 s] [INFO] shenyu-spring-boot-starter-sync-data-polaris ....... SUCCESS [ 32.592 s] [INFO] shenyu-client-http ................................. SUCCESS [ 0.080 s] [INFO] shenyu-client-springmvc ............................ SUCCESS [ 5.648 s] [INFO] shenyu-spring-boot-starter-client .................. SUCCESS [ 0.084 s] [INFO] shenyu-spring-boot-starter-client-common ........... SUCCESS [ 4.594 s] [INFO] shenyu-client-autoconfig ........................... SUCCESS [ 0.285 s] [INFO] shenyu-spring-boot-starter-client-springmvc ........ SUCCESS [ 4.668 s] [INFO] shenyu-client-dubbo ................................ SUCCESS [ 0.064 s] [INFO] shenyu-client-dubbo-common ......................... SUCCESS [ 0.303 s] [INFO] shenyu-client-apache-dubbo ......................... SUCCESS [ 3.741 s] [INFO] shenyu-spring-boot-starter-client-apache-dubbo ..... SUCCESS [ 4.252 s] [INFO] shenyu-client-sofa ................................. SUCCESS [ 20.734 s] [INFO] shenyu-spring-boot-starter-client-sofa ............. SUCCESS [ 4.642 s] [INFO] shenyu-client-tars ................................. SUCCESS [ 4.105 s] [INFO] shenyu-spring-boot-starter-client-tars ............. SUCCESS [ 4.060 s] [INFO] shenyu-client-grpc ................................. SUCCESS [ 3.915 s] [INFO] shenyu-spring-boot-starter-client-grpc ............. SUCCESS [ 4.809 s] [INFO] shenyu-client-mcp-register ......................... SUCCESS [ 0.358 s] [INFO] shenyu-spring-boot-starter-client-mcp .............. SUCCESS [ 0.326 s] [INFO] shenyu-client-websocket ............................ SUCCESS [ 0.080 s] [INFO] shenyu-client-spring-websocket ..................... SUCCESS [ 4.471 s] [INFO] shenyu-spring-boot-starter-client-spring-websocket . SUCCESS [ 4.287 s] [INFO] shenyu-register-client-beat ........................ SUCCESS [ 4.532 s] [INFO] shenyu-spring-boot-starter-client-beat ............. SUCCESS [ 0.297 s] [INFO] shenyu-spring-boot-starter-registry ................ SUCCESS [ 0.611 s] [INFO] shenyu-sdk ......................................... SUCCESS [ 0.106 s] [INFO] shenyu-sdk-core .................................... SUCCESS [ 3.976 s] [INFO] shenyu-sdk-spring .................................. SUCCESS [ 5.724 s] [INFO] shenyu-sdk-okhttp .................................. SUCCESS [ 1.890 s] [INFO] shenyu-sdk-httpclient .............................. SUCCESS [ 4.332 s] [INFO] shenyu-spring-boot-starter-sdk ..................... SUCCESS [ 0.750 s] [INFO] shenyu-sdk-feign ................................... SUCCESS [ 6.976 s] [INFO] shenyu-spring-boot-starter-sdk-feign ............... SUCCESS [ 0.534 s] [INFO] shenyu-kubernetes-controller ....................... SUCCESS [ 6.372 s] [INFO] shenyu-spring-boot-starter-k8s ..................... SUCCESS [ 0.386 s] [INFO] shenyu-bootstrap ................................... SUCCESS [ 3.410 s] [INFO] shenyu-plugin-wasm-api ............................. SUCCESS [ 8.651 s] [INFO] shenyu-plugin-wasm-base ............................ SUCCESS [ 6.949 s] [INFO] shenyu-dist ........................................ SUCCESS [ 0.065 s] [INFO] shenyu-src-dist .................................... SUCCESS [ 0.071 s] [INFO] shenyu-admin-dist .................................. SUCCESS [ 1.151 s] [INFO] shenyu-bootstrap-dist .............................. SUCCESS [ 1.380 s] [INFO] shenyu-docker-compose-dist ......................... SUCCESS [ 0.076 s] [INFO] shenyu-registry-apollo ............................. SUCCESS [ 6.417 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 17:15 min [INFO] Finished at: 2026-09-04T09:52:39Z [INFO] ------------------------------------------------------------------------ ``` -- 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]
