Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

application service discovery support etcd reporter #1221

Merged
merged 6 commits into from
Jun 14, 2021

Conversation

WilliamLeaves
Copy link
Contributor

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:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


err = metadataReport.PublishAppMetadata(subMi, metadataInfo)
assert.Nil(t, err)

_, err = metadataReport.GetAppMetadata(subMi)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't check the return value of GetAppMetadata here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It should be...

@WilliamLeaves WilliamLeaves requested a review from hxmhlt June 3, 2021 12:17
@codecov-commenter
Copy link

Codecov Report

Merging #1221 (e655768) into 3.0 (968650f) will decrease coverage by 3.68%.
The diff coverage is 50.60%.

❗ 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

@@            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 Coverage Δ
cluster/cluster_impl/available_cluster_invoker.go 66.66% <ø> (ø)
cluster/cluster_impl/broadcast_cluster_invoker.go 76.47% <ø> (ø)
cluster/cluster_impl/failfast_cluster_invoker.go 66.66% <ø> (ø)
cluster/cluster_impl/mock_cluster.go 0.00% <0.00%> (ø)
cluster/loadbalance/random.go 100.00% <ø> (ø)
...router/v3router/judger/list_string_match_judger.go 0.00% <0.00%> (ø)
...ster/router/v3router/judger/method_match_judger.go 0.00% <0.00%> (ø)
...er/router/v3router/judger/url_label_match_judge.go 0.00% <0.00%> (ø)
common/extension/auth.go 0.00% <ø> (ø)
common/extension/cluster.go 0.00% <ø> (ø)
... and 277 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f83b1a...d9f0361. Read the comment docs.

}

// 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

	key := e.getNodeKey(metadataIdentifier)
	value, err := json.Marshal(info)
	if err == nil {
	     err = e.client.Put(key, string(value))
	}
	return err

@AlexStocks AlexStocks merged commit 22bc867 into apache:3.0 Jun 14, 2021
@LaurenceLiZhixin LaurenceLiZhixin added this to the v3.0.0-rc2 milestone Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants