You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] New registrar path never propagates namespaceId — multi-namespace support broken in @EnableClientRegister path #6664
Location: shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/register/registrar/UriApiRegistrarImplImpl.java:44-52,57-65; MateDataApiRegistrarImpl.java:50-68,72-90; ApiDocRegistrarImpl.java:65-82; shenyu-client/shenyu-client-core/src/main/java/org/apache/shenyu/client/core/register/ClientRegisterConfig.java:22-66 (interface lacks namespace accessor); ClientRegisterConfigImpl.java:49-62 (has ShenyuClientConfig but never reads getNamespace())
Description:
The old path (AbstractContextRefreshedEventListener) loops over all namespaces: for (String namespaceId : namespaceIds) and sets .namespaceId(namespaceId) on every DTO (SpringMvcClientEventListener.buildURIRegisterDTO:159, ApacheDubboServiceBeanListener:127, handleClass:312, handleMethod:327). The new registrar path publishes DTOs with no .namespaceId(...) call at all. ClientRegisterConfig has no namespace accessor, and ClientRegisterConfigImpl receives ShenyuClientConfig but never reads getNamespace(). AbstractApiRegistrar.register / BaseApiRegistrarImpl.register also do not loop over namespaces.
Impact:
When the ApiBean-based registrar path is active, all URI/MetaData/ApiDoc registrations carry null namespaceId, breaking multi-namespace support entirely; registrations land in the default namespace regardless of shenyu.namespace configuration. Compounds FUNC-B1 (when processors are fixed, namespace is still missing).
Suggested fix:
Add List<String> getNamespace() to ClientRegisterConfig; extract in ClientRegisterConfigImpl from shenyuClientConfig.getNamespace() (with the same default fallback the old path uses). Have BaseApiRegistrarImpl.register or the doRegisterApi/doRegisterBean methods loop over namespaces and set .namespaceId(...).
Activity
github-actions commentedon Aug 3, 2026
👋 Hello @yuluo-yx
A new issue has been opened by @Aias00:
Please review when you have time. Thank you! 🙏