AsperforMias opened a new pull request, #3851: URL: https://github.com/apache/dubbo-go/pull/3851
### Description Fixes #3849 A consumer that uses the config center only for dynamic rules logs two ERROR lines on every start, which is the setup used with Dubbo Admin: ```text [ConfigCenter][Nacos] failed to query rule, key= group=dubbo err=[client.GetConfig] param.dataId can not be empty [Router][Script] parse route config failed, error=EOF ``` - `nacosDynamicConfiguration.GetRule` returns an empty value for an empty key instead of sending it to Nacos, which rejects it. This happens when `data-id` is unset and `startGlobalConfigCenter` reads external configuration. The ZooKeeper implementation already returns an empty value here, and the existing "got empty config" warning is still logged. Apollo is not affected, since it treats an empty key as its default namespace. - When a provider application has no script rule, the script router now resets itself (as for a delete event) instead of parsing the empty value as an update. This also clears a rule left from a previous provider application. Verified with a Nacos consumer configured with `group: dubbo` and no `data-id`: neither line appears after this change. The new tests fail without the change. ### Checklist - [x] I confirm the target branch is `develop` - [x] I have run `make fmt` to format my code - [x] I have run `make test` to run local tests (all packages pass except `TestDubboProtocol_Refer` and `TestDubboProtocolReferNoConnect` in `protocol/dubbo`, which also fail on the base commit locally because port 20000 is taken by another process on my machine) - [x] I have added tests that prove my fix is effective or that my feature works -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
