Mulavar commented on a change in pull request #1560:
URL: https://github.com/apache/dubbo-go/pull/1560#discussion_r743358781
##########
File path: config/config_center_config.go
##########
@@ -132,11 +132,19 @@ func (c *CenterConfig) toURL() (*common.URL, error) {
// it will prepare the environment
func startConfigCenter(rc *RootConfig) error {
cc := rc.ConfigCenter
- strConf, err := cc.prepareEnvironment()
+ dynamicConfig, err := cc.GetDynamicConfiguration()
if err != nil {
- return errors.WithMessagef(err, "start config center error!")
+ logger.Errorf("Start dynamic configuration center error, error
message is %v", err)
+ return err
}
+ envInstance := conf.GetEnvInstance()
+ envInstance.SetDynamicConfiguration(dynamicConfig)
+ strConf, err := dynamicConfig.GetProperties(cc.DataId,
config_center.WithGroup(cc.Group))
+ if err != nil {
+ logger.Warnf("Dynamic onfig center has started, but config may
not be initialized, because %s", err)
+ return nil
Review comment:
https://github.com/apache/dubbo-go/issues/1559
You should not force the user to publish the configuration when starting the
configuration center.
--
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]