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 2021/05/27 11:33:07 UTC

[GitHub] [dubbo-go] WilliamLeaves opened a new pull request #1221: application service discovery support etcd reporter

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


   <!--  Thanks for sending a pull request!
   Read https://github.com/apache/dubbo-go/blob/master/contributing.md before commit pull request.
   -->
   
   **What this PR does**:
   1 application service discovery support etcd reporter
   2 fix the comments of PublishAppMetadata and GetAppMetadata
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   
   ```


-- 
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] WilliamLeaves commented on a change in pull request #1221: application service discovery support etcd reporter

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



##########
File path: metadata/report/etcd/report_test.go
##########
@@ -94,8 +94,14 @@ func TestEtcdMetadataReport_CRUD(t *testing.T) {
 	err = metadataReport.SaveSubscribedData(subMi, string(urls))
 	assert.Nil(t, err)
 
+	metadataInfo := common.NewMetadataInfWithApp(subMi.Application)
 	err = metadataReport.RemoveServiceMetadata(serviceMi)
 	assert.Nil(t, err)
+	err = metadataReport.PublishAppMetadata(subMi, metadataInfo)
+	assert.Nil(t, err)
+
+	_, err = metadataReport.GetAppMetadata(subMi)

Review comment:
       Yes, It should be...




-- 
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] xavier-niu commented on a change in pull request #1221: application service discovery support etcd reporter

Posted by GitBox <gi...@apache.org>.
xavier-niu commented on a change in pull request #1221:
URL: https://github.com/apache/dubbo-go/pull/1221#discussion_r642074663



##########
File path: metadata/report/etcd/report_test.go
##########
@@ -94,8 +94,14 @@ func TestEtcdMetadataReport_CRUD(t *testing.T) {
 	err = metadataReport.SaveSubscribedData(subMi, string(urls))
 	assert.Nil(t, err)
 
+	metadataInfo := common.NewMetadataInfWithApp(subMi.Application)
 	err = metadataReport.RemoveServiceMetadata(serviceMi)
 	assert.Nil(t, err)
+	err = metadataReport.PublishAppMetadata(subMi, metadataInfo)
+	assert.Nil(t, err)
+
+	_, err = metadataReport.GetAppMetadata(subMi)

Review comment:
       Why don't check the return value of `GetAppMetadata` here?




-- 
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 #1221: application service discovery support etcd reporter

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1221](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e655768) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (968650f) will **decrease** coverage by `3.68%`.
   > The diff coverage is `50.60%`.
   
   > :exclamation: Current head e655768 differs from pull request most recent head d9f0361. Consider uploading reports for the commit d9f0361 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1221/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1221      +/-   ##
   ==========================================
   - Coverage   59.53%   55.84%   -3.69%     
   ==========================================
     Files         259      272      +13     
     Lines       12737    12896     +159     
   ==========================================
   - Hits         7583     7202     -381     
   - Misses       4199     4792     +593     
   + Partials      955      902      -53     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `76.47% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlcl9pbnZva2VyLmdv) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [cluster/loadbalance/random.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9yYW5kb20uZ28=) | `100.00% <ø> (ø)` | |
   | [...router/v3router/judger/list\_string\_match\_judger.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdjNyb3V0ZXIvanVkZ2VyL2xpc3Rfc3RyaW5nX21hdGNoX2p1ZGdlci5nbw==) | `0.00% <0.00%> (ø)` | |
   | [...ster/router/v3router/judger/method\_match\_judger.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdjNyb3V0ZXIvanVkZ2VyL21ldGhvZF9tYXRjaF9qdWRnZXIuZ28=) | `0.00% <0.00%> (ø)` | |
   | [...er/router/v3router/judger/url\_label\_match\_judge.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdjNyb3V0ZXIvanVkZ2VyL3VybF9sYWJlbF9tYXRjaF9qdWRnZS5nbw==) | `0.00% <0.00%> (ø)` | |
   | [common/extension/auth.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9hdXRoLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | ... and [277 more](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0f83b1a...d9f0361](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 #1221: application service discovery support etcd reporter

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



##########
File path: metadata/report/etcd/report.go
##########
@@ -52,14 +53,28 @@ type etcdMetadataReport struct {
 
 // GetAppMetadata get metadata info from etcd
 func (e *etcdMetadataReport) GetAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier) (*common.MetadataInfo, error) {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)
+	data, err := e.client.Get(key)
+	if err != nil {
+		return nil, err
+	}
+	info := &common.MetadataInfo{}
+	err = json.Unmarshal([]byte(data), info)

Review comment:
       pls delete the following 4 line codes. `return info, err` is just enough.

##########
File path: metadata/report/etcd/report.go
##########
@@ -52,14 +53,28 @@ type etcdMetadataReport struct {
 
 // GetAppMetadata get metadata info from etcd
 func (e *etcdMetadataReport) GetAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier) (*common.MetadataInfo, error) {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)
+	data, err := e.client.Get(key)
+	if err != nil {
+		return nil, err
+	}
+	info := &common.MetadataInfo{}
+	err = json.Unmarshal([]byte(data), info)
+	if err != nil {
+		return nil, err
+	}
+	return info, nil
 }
 
 // PublishAppMetadata publish metadata info to etcd
 func (e *etcdMetadataReport) PublishAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier, info *common.MetadataInfo) error {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)

Review comment:
       ```go
   	key := e.getNodeKey(metadataIdentifier)
   	value, err := json.Marshal(info)
   	if err == nil {
   	     err = e.client.Put(key, string(value))
   	}
   	return 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


[GitHub] [dubbo-go] WilliamLeaves commented on a change in pull request #1221: application service discovery support etcd reporter

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



##########
File path: metadata/report/etcd/report.go
##########
@@ -52,14 +53,28 @@ type etcdMetadataReport struct {
 
 // GetAppMetadata get metadata info from etcd
 func (e *etcdMetadataReport) GetAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier) (*common.MetadataInfo, error) {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)
+	_data, err := e.client.Get(key)
+	if err != nil {
+		return nil, err
+	}
+	info := &common.MetadataInfo{}
+	err = json.Unmarshal([]byte(_data), info)
+	if err != nil {

Review comment:
       It should be "data". Starting with '_' is just a self-style when naming []byte type variables




-- 
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 #1221: application service discovery support etcd reporter

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



##########
File path: metadata/report/etcd/report.go
##########
@@ -52,14 +53,28 @@ type etcdMetadataReport struct {
 
 // GetAppMetadata get metadata info from etcd
 func (e *etcdMetadataReport) GetAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier) (*common.MetadataInfo, error) {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)
+	data, err := e.client.Get(key)
+	if err != nil {
+		return nil, err
+	}
+	info := &common.MetadataInfo{}
+	err = json.Unmarshal([]byte(data), info)

Review comment:
       pls delete the following 4 line codes. `return info, err` is just enough.




-- 
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 #1221: application service discovery support etcd reporter

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



##########
File path: metadata/report/etcd/report.go
##########
@@ -52,14 +53,28 @@ type etcdMetadataReport struct {
 
 // GetAppMetadata get metadata info from etcd
 func (e *etcdMetadataReport) GetAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier) (*common.MetadataInfo, error) {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)
+	data, err := e.client.Get(key)
+	if err != nil {
+		return nil, err
+	}
+	info := &common.MetadataInfo{}
+	err = json.Unmarshal([]byte(data), info)
+	if err != nil {
+		return nil, err
+	}
+	return info, nil
 }
 
 // PublishAppMetadata publish metadata info to etcd
 func (e *etcdMetadataReport) PublishAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier, info *common.MetadataInfo) error {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)

Review comment:
       ```go
   	key := e.getNodeKey(metadataIdentifier)
   	value, err := json.Marshal(info)
   	if err == nil {
   	     err = e.client.Put(key, string(value))
   	}
   	return 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


[GitHub] [dubbo-go] hxmhlt commented on a change in pull request #1221: application service discovery support etcd reporter

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



##########
File path: metadata/report/etcd/report.go
##########
@@ -52,14 +53,28 @@ type etcdMetadataReport struct {
 
 // GetAppMetadata get metadata info from etcd
 func (e *etcdMetadataReport) GetAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier) (*common.MetadataInfo, error) {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)
+	_data, err := e.client.Get(key)
+	if err != nil {
+		return nil, err
+	}
+	info := &common.MetadataInfo{}
+	err = json.Unmarshal([]byte(_data), info)
+	if err != nil {

Review comment:
       Why does it start with ’_‘ ?Is it golang's style?.. :)




-- 
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 #1221: application service discovery support etcd reporter

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1221](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e655768) into [3.0](https://codecov.io/gh/apache/dubbo-go/commit/968650f658b63c11bb0409897d29c57b91cfaf50?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (968650f) will **decrease** coverage by `3.68%`.
   > The diff coverage is `50.60%`.
   
   > :exclamation: Current head e655768 differs from pull request most recent head d9f0361. Consider uploading reports for the commit d9f0361 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go/pull/1221/graphs/tree.svg?width=650&height=150&src=pr&token=dcPE6RyFAL&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##              3.0    #1221      +/-   ##
   ==========================================
   - Coverage   59.53%   55.84%   -3.69%     
   ==========================================
     Files         259      272      +13     
     Lines       12737    12896     +159     
   ==========================================
   - Hits         7583     7202     -381     
   - Misses       4199     4792     +593     
   + Partials      955      902      -53     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [cluster/cluster\_impl/available\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYXZhaWxhYmxlX2NsdXN0ZXJfaW52b2tlci5nbw==) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/broadcast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvYnJvYWRjYXN0X2NsdXN0ZXJfaW52b2tlci5nbw==) | `76.47% <ø> (ø)` | |
   | [cluster/cluster\_impl/failfast\_cluster\_invoker.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvZmFpbGZhc3RfY2x1c3Rlcl9pbnZva2VyLmdv) | `66.66% <ø> (ø)` | |
   | [cluster/cluster\_impl/mock\_cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9jbHVzdGVyX2ltcGwvbW9ja19jbHVzdGVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [cluster/loadbalance/random.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9sb2FkYmFsYW5jZS9yYW5kb20uZ28=) | `100.00% <ø> (ø)` | |
   | [...router/v3router/judger/list\_string\_match\_judger.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdjNyb3V0ZXIvanVkZ2VyL2xpc3Rfc3RyaW5nX21hdGNoX2p1ZGdlci5nbw==) | `0.00% <0.00%> (ø)` | |
   | [...ster/router/v3router/judger/method\_match\_judger.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdjNyb3V0ZXIvanVkZ2VyL21ldGhvZF9tYXRjaF9qdWRnZXIuZ28=) | `0.00% <0.00%> (ø)` | |
   | [...er/router/v3router/judger/url\_label\_match\_judge.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y2x1c3Rlci9yb3V0ZXIvdjNyb3V0ZXIvanVkZ2VyL3VybF9sYWJlbF9tYXRjaF9qdWRnZS5nbw==) | `0.00% <0.00%> (ø)` | |
   | [common/extension/auth.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9hdXRoLmdv) | `0.00% <ø> (ø)` | |
   | [common/extension/cluster.go](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Y29tbW9uL2V4dGVuc2lvbi9jbHVzdGVyLmdv) | `0.00% <ø> (ø)` | |
   | ... and [277 more](https://codecov.io/gh/apache/dubbo-go/pull/1221/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0f83b1a...d9f0361](https://codecov.io/gh/apache/dubbo-go/pull/1221?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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 #1221: application service discovery support etcd reporter

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


   


-- 
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] WilliamLeaves commented on a change in pull request #1221: application service discovery support etcd reporter

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



##########
File path: metadata/report/etcd/report.go
##########
@@ -52,14 +53,28 @@ type etcdMetadataReport struct {
 
 // GetAppMetadata get metadata info from etcd
 func (e *etcdMetadataReport) GetAppMetadata(metadataIdentifier *identifier.SubscriberMetadataIdentifier) (*common.MetadataInfo, error) {
-	// TODO will implement
-	panic("implement me")
+	key := e.getNodeKey(metadataIdentifier)
+	_data, err := e.client.Get(key)
+	if err != nil {
+		return nil, err
+	}
+	info := &common.MetadataInfo{}
+	err = json.Unmarshal([]byte(_data), info)
+	if err != nil {

Review comment:
       It should be "data". Starting with '_' is just a self-style when naming []byte type variables

##########
File path: metadata/report/etcd/report_test.go
##########
@@ -94,8 +94,14 @@ func TestEtcdMetadataReport_CRUD(t *testing.T) {
 	err = metadataReport.SaveSubscribedData(subMi, string(urls))
 	assert.Nil(t, err)
 
+	metadataInfo := common.NewMetadataInfWithApp(subMi.Application)
 	err = metadataReport.RemoveServiceMetadata(serviceMi)
 	assert.Nil(t, err)
+	err = metadataReport.PublishAppMetadata(subMi, metadataInfo)
+	assert.Nil(t, err)
+
+	_, err = metadataReport.GetAppMetadata(subMi)

Review comment:
       Yes, It should be...




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