Mulavar commented on a change in pull request #1565: URL: https://github.com/apache/dubbo-go/pull/1565#discussion_r744645735
########## File path: registry/nacos/service_discovery.go ########## @@ -330,22 +328,21 @@ func (n *nacosServiceDiscovery) String() string { } // newNacosServiceDiscovery will create new service discovery instance -func newNacosServiceDiscovery() (registry.ServiceDiscovery, error) { - metadataReportConfig := config.GetMetadataReportConfg() - url := common.NewURLWithOptions( - common.WithParams(make(url.Values)), - common.WithPassword(metadataReportConfig.Password), - common.WithUsername(metadataReportConfig.Username), - common.WithParamsValue(constant.RegistryTimeoutKey, metadataReportConfig.Timeout)) - url.Location = metadataReportConfig.Address - client, err := nacos.NewNacosClientByUrl(url) +func newNacosServiceDiscovery(url *common.URL) (registry.ServiceDiscovery, error) { + discoveryUrl := common.NewURLWithOptions( + common.WithParams(url.GetParams()), + common.WithParamsValue(constant.NacosUsername, url.Username), + common.WithParamsValue(constant.NacosPassword, url.Password), + common.WithParamsValue(constant.NacosNamespaceID, url.GetParam(constant.NamespaceKey, ""))) Review comment: 这里改了服务发现使用 nacos 的 namespace 问题,但 nacos 在配置中心的问题好像还没有解决,因为配置中心创建 nacos client 是另一个入口,可以看一下 NewNacosConfigClientByUrl,这里会调用 GetNacosConfig,获取 namespace 的时候还是拿的 key 还是有问题。 -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org