You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2020/05/31 04:02:13 UTC

[GitHub] [dubbo-go] lzp0412 opened a new pull request #548: 1.4

lzp0412 opened a new pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548


   **What this PR does:**
   
   1. update nacos-sdk-go version to v0.3.2, this version fix some bug;
   2. optimized nacos config  code


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks merged pull request #548: Update Nacos SDK version

Posted by GitBox <gi...@apache.org>.
AlexStocks merged pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zouyx commented on a change in pull request #548: Update Nacos SDK version

Posted by GitBox <gi...@apache.org>.
zouyx commented on a change in pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548#discussion_r434958752



##########
File path: config_center/nacos/client.go
##########
@@ -157,12 +136,24 @@ func newNacosClient(name string, nacosAddrs []string, timeout time.Duration) (*N
 		},
 	}
 
-	svrConfList := make([]nacosconst.ServerConfig, 0, len(n.NacosAddrs))
-	for _, nacosAddr := range n.NacosAddrs {
+	configClient, err := initNacosConfigClient(nacosAddrs, timeout, url)
+	if err != nil {
+		logger.Errorf("initNacosConfigClient(addr:%+v,timeout:%v,url:%v) = err %+v",
+			nacosAddrs, timeout.String(), url, err)
+		return n, perrors.WithMessagef(err, "newNacosClient(address:%+v)", url.Location)
+	}
+	n.SetClient(&configClient)
+
+	return n, nil
+}
+
+func initNacosConfigClient(nacosAddrs []string, timeout time.Duration, url common.URL) (config_client.IConfigClient, error) {
+	svrConfList := []nacosconst.ServerConfig{}
+	for _, nacosAddr := range nacosAddrs {
 		split := strings.Split(nacosAddr, ":")
 		port, err := strconv.ParseUint(split[1], 10, 64)
 		if err != nil {
-			logger.Warnf("convert port , source:%s , error:%v ", split[1], err)
+			logger.Warnf("strconv.ParseUint(nacos addr port:%+v) = error %+v", split[1], err)

Review comment:
       Should you change logger level to error?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on pull request #548: 1.4

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548#issuecomment-636435457


   @lzp0412 pls change the title. I can not understand what's the meaning of it.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #548: Update Nacos SDK version

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548#issuecomment-636449952


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=h1) Report
   > Merging [#548](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=desc) into [1.4](https://codecov.io/gh/apache/dubbo-go/commit/c50325bbbe03914eabb59cd5cd0634a44b1faa98&el=desc) will **decrease** coverage by `0.37%`.
   > The diff coverage is `51.16%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/548/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              1.4     #548      +/-   ##
   ==========================================
   - Coverage   67.24%   66.87%   -0.38%     
   ==========================================
     Files         174      174              
     Lines        9261     9259       -2     
   ==========================================
   - Hits         6228     6192      -36     
   - Misses       2428     2454      +26     
   - Partials      605      613       +8     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [common/url.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29tbW9uL3VybC5nbw==) | `70.71% <0.00%> (-0.45%)` | :arrow_down: |
   | [config\_center/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9saXN0ZW5lci5nbw==) | `68.18% <0.00%> (-11.82%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `65.74% <55.88%> (+8.47%)` | :arrow_up: |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `62.69% <100.00%> (+0.90%)` | :arrow_up: |
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `37.50% <0.00%> (-34.38%)` | :arrow_down: |
   | [protocol/dubbo/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vbGlzdGVuZXIuZ28=) | `57.52% <0.00%> (-5.38%)` | :arrow_down: |
   | [protocol/dubbo/codec.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY29kZWMuZ28=) | `72.50% <0.00%> (-5.00%)` | :arrow_down: |
   | [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `76.71% <0.00%> (-4.57%)` | :arrow_down: |
   | [protocol/dubbo/readwriter.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcmVhZHdyaXRlci5nbw==) | `68.29% <0.00%> (-2.44%)` | :arrow_down: |
   | [cluster/cluster\_impl/failback\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGJhY2tfY2x1c3Rlcl9pbnZva2VyLmdv) | `78.49% <0.00%> (-2.16%)` | :arrow_down: |
   | ... and [4 more](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=footer). Last update [c50325b...77e0765](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter commented on pull request #548: Update Nacos SDK version

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548#issuecomment-636449952


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=h1) Report
   > Merging [#548](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=desc) into [1.4](https://codecov.io/gh/apache/dubbo-go/commit/c50325bbbe03914eabb59cd5cd0634a44b1faa98&el=desc) will **decrease** coverage by `0.20%`.
   > The diff coverage is `56.41%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/548/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              1.4     #548      +/-   ##
   ==========================================
   - Coverage   67.24%   67.04%   -0.21%     
   ==========================================
     Files         174      174              
     Lines        9261     9258       -3     
   ==========================================
   - Hits         6228     6207      -21     
   - Misses       2428     2441      +13     
   - Partials      605      610       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [common/url.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29tbW9uL3VybC5nbw==) | `70.71% <0.00%> (-0.45%)` | :arrow_down: |
   | [config\_center/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9saXN0ZW5lci5nbw==) | `68.18% <0.00%> (-11.82%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `69.15% <63.33%> (+11.89%)` | :arrow_up: |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `62.69% <100.00%> (+0.90%)` | :arrow_up: |
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `62.50% <0.00%> (-9.38%)` | :arrow_down: |
   | [protocol/dubbo/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vbGlzdGVuZXIuZ28=) | `57.52% <0.00%> (-5.38%)` | :arrow_down: |
   | [protocol/dubbo/codec.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY29kZWMuZ28=) | `72.50% <0.00%> (-5.00%)` | :arrow_down: |
   | [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `76.71% <0.00%> (-4.57%)` | :arrow_down: |
   | [protocol/dubbo/readwriter.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcmVhZHdyaXRlci5nbw==) | `68.29% <0.00%> (-2.44%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `57.00% <0.00%> (-1.87%)` | :arrow_down: |
   | ... and [1 more](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=footer). Last update [c50325b...bc184e6](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #548: Update Nacos SDK version

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548#issuecomment-636449952


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=h1) Report
   > Merging [#548](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=desc) into [1.4](https://codecov.io/gh/apache/dubbo-go/commit/c50325bbbe03914eabb59cd5cd0634a44b1faa98&el=desc) will **decrease** coverage by `0.20%`.
   > The diff coverage is `56.41%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/548/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              1.4     #548      +/-   ##
   ==========================================
   - Coverage   67.24%   67.04%   -0.21%     
   ==========================================
     Files         174      174              
     Lines        9261     9258       -3     
   ==========================================
   - Hits         6228     6207      -21     
   - Misses       2428     2441      +13     
   - Partials      605      610       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [common/url.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29tbW9uL3VybC5nbw==) | `70.71% <0.00%> (-0.45%)` | :arrow_down: |
   | [config\_center/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9saXN0ZW5lci5nbw==) | `68.18% <0.00%> (-11.82%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `69.15% <63.33%> (+11.89%)` | :arrow_up: |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `62.69% <100.00%> (+0.90%)` | :arrow_up: |
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `62.50% <0.00%> (-9.38%)` | :arrow_down: |
   | [protocol/dubbo/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vbGlzdGVuZXIuZ28=) | `57.52% <0.00%> (-5.38%)` | :arrow_down: |
   | [protocol/dubbo/codec.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY29kZWMuZ28=) | `72.50% <0.00%> (-5.00%)` | :arrow_down: |
   | [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `76.71% <0.00%> (-4.57%)` | :arrow_down: |
   | [protocol/dubbo/readwriter.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcmVhZHdyaXRlci5nbw==) | `68.29% <0.00%> (-2.44%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `57.00% <0.00%> (-1.87%)` | :arrow_down: |
   | ... and [1 more](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=footer). Last update [c50325b...4de80e5](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] codecov-commenter edited a comment on pull request #548: Update Nacos SDK version

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548#issuecomment-636449952


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=h1) Report
   > Merging [#548](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=desc) into [1.4](https://codecov.io/gh/apache/dubbo-go/commit/c50325bbbe03914eabb59cd5cd0634a44b1faa98&el=desc) will **decrease** coverage by `0.20%`.
   > The diff coverage is `56.41%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/548/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL)](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff             @@
   ##              1.4     #548      +/-   ##
   ==========================================
   - Coverage   67.24%   67.04%   -0.21%     
   ==========================================
     Files         174      174              
     Lines        9261     9258       -3     
   ==========================================
   - Hits         6228     6207      -21     
   - Misses       2428     2441      +13     
   - Partials      605      610       +5     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [common/url.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29tbW9uL3VybC5nbw==) | `70.71% <0.00%> (-0.45%)` | :arrow_down: |
   | [config\_center/nacos/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9saXN0ZW5lci5nbw==) | `68.18% <0.00%> (-11.82%)` | :arrow_down: |
   | [config\_center/nacos/client.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9jbGllbnQuZ28=) | `69.15% <63.33%> (+11.89%)` | :arrow_up: |
   | [registry/nacos/registry.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cmVnaXN0cnkvbmFjb3MvcmVnaXN0cnkuZ28=) | `62.69% <100.00%> (+0.90%)` | :arrow_up: |
   | [config\_center/nacos/facade.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-Y29uZmlnX2NlbnRlci9uYWNvcy9mYWNhZGUuZ28=) | `62.50% <0.00%> (-9.38%)` | :arrow_down: |
   | [protocol/dubbo/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vbGlzdGVuZXIuZ28=) | `57.52% <0.00%> (-5.38%)` | :arrow_down: |
   | [protocol/dubbo/codec.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vY29kZWMuZ28=) | `72.50% <0.00%> (-5.00%)` | :arrow_down: |
   | [protocol/dubbo/pool.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcG9vbC5nbw==) | `76.71% <0.00%> (-4.57%)` | :arrow_down: |
   | [protocol/dubbo/readwriter.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cHJvdG9jb2wvZHViYm8vcmVhZHdyaXRlci5nbw==) | `68.29% <0.00%> (-2.44%)` | :arrow_down: |
   | [remoting/kubernetes/listener.go](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree#diff-cmVtb3Rpbmcva3ViZXJuZXRlcy9saXN0ZW5lci5nbw==) | `57.00% <0.00%> (-1.87%)` | :arrow_down: |
   | ... and [1 more](https://codecov.io/gh/apache/dubbo-go/pull/548/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=footer). Last update [c50325b...77e0765](https://codecov.io/gh/apache/dubbo-go/pull/548?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] AlexStocks commented on a change in pull request #548: Update Nacos SDK version

Posted by GitBox <gi...@apache.org>.
AlexStocks commented on a change in pull request #548:
URL: https://github.com/apache/dubbo-go/pull/548#discussion_r434660692



##########
File path: config_center/nacos/client.go
##########
@@ -157,12 +135,23 @@ func newNacosClient(name string, nacosAddrs []string, timeout time.Duration) (*N
 		},
 	}
 
-	svrConfList := make([]nacosconst.ServerConfig, 0, len(n.NacosAddrs))
-	for _, nacosAddr := range n.NacosAddrs {
+	configClient, err := initNacosConfigClient(nacosAddrs, timeout, url)
+	if err != nil {
+		logger.Errorf("nacos create config client error:%v", err)

Review comment:
       logger.Errorf("initNacosConfigClient(addr:%+v, timeout:%v, url:%v) = errkor %+v", nacosAddrs, timeout, err)

##########
File path: config_center/nacos/client.go
##########
@@ -87,17 +88,16 @@ func ValidateNacosClient(container nacosClientFacade, opts ...option) error {
 	}
 
 	url := container.GetUrl()
-
+	timeout, err := time.ParseDuration(url.GetParam(constant.REGISTRY_TIMEOUT_KEY, constant.DEFAULT_REG_TIMEOUT))
+	if err != nil {
+		logger.Errorf("timeout config %v is invalid ,err is %v",

Review comment:
       invalid timeout config %+v, got err %+v

##########
File path: config_center/nacos/client.go
##########
@@ -157,12 +135,23 @@ func newNacosClient(name string, nacosAddrs []string, timeout time.Duration) (*N
 		},
 	}
 
-	svrConfList := make([]nacosconst.ServerConfig, 0, len(n.NacosAddrs))
-	for _, nacosAddr := range n.NacosAddrs {
+	configClient, err := initNacosConfigClient(nacosAddrs, timeout, url)
+	if err != nil {
+		logger.Errorf("nacos create config client error:%v", err)
+		return n, perrors.WithMessagef(err, "newNacosClient(address:%+v)", url.Location)
+	}
+	n.SetClient(&configClient)
+
+	return n, nil
+}
+
+func initNacosConfigClient(nacosAddrs []string, timeout time.Duration, url common.URL) (config_client.IConfigClient, error) {
+	svrConfList := []nacosconst.ServerConfig{}
+	for _, nacosAddr := range nacosAddrs {
 		split := strings.Split(nacosAddr, ":")
 		port, err := strconv.ParseUint(split[1], 10, 64)
 		if err != nil {
-			logger.Warnf("convert port , source:%s , error:%v ", split[1], err)
+			logger.Warnf("nacos addr port parse error ,error message is %v", err)

Review comment:
       logger.Warnf("strconv.ParseUint(nacos addr port:%+v) = error %+v", split[1], err)




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org