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

【等CI结束就合并】feat: Implement the discovery service by Etcd #605

Merged
merged 15 commits into from
Feb 17, 2024

Conversation

yizhibian
Copy link
Contributor

@yizhibian yizhibian commented Aug 28, 2023

What this PR does:
Implement the discovery service by Etcd.

Which issue(s) this PR fixes:

Fixes #578

Special notes for your reviewer:
I use Etcd to watch all the kvs with prefix like registry-seata, since it works correctly, but I am not sure if it suitable or that have some other more elegant ways. Please give me some advices, I am glad to fix it.

Does this PR introduce a user-facing change?:
NONE


@CLAassistant
Copy link

CLAassistant commented Aug 28, 2023

CLA assistant check
All committers have signed the CLA.

pkg/discovery/init_test.go Show resolved Hide resolved
pkg/discovery/etcd3.go Outdated Show resolved Hide resolved
pkg/discovery/etcd3.go Outdated Show resolved Hide resolved
pkg/discovery/etcd3.go Outdated Show resolved Hide resolved
pkg/discovery/etcd3.go Outdated Show resolved Hide resolved
EtcdClusterPrefix = "registry-seata"
)

type EtcdRegistryService struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

给EtcdRegistryService编写完整的单元测试

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已添加

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@iSuperCoder 你好,已经加上单元测试了,还需要补充什么吗?

@iSuperCoder
Copy link
Contributor

@yizhibian CI没通过。
另外可以在seata-go-samples里写下etcd的sample,可以参考:apache/incubator-seata-go-samples#38

@Issues-translate-bot
Copy link

RoBot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@yizhibian CI failed.
In addition, you can write etcd samples in seata-go-samples, you can refer to: apache/incubator-seata-go-samples#38

@yizhibian
Copy link
Contributor Author

@iSuperCoder 你好,我参考了nacos_test重写了etcd3的单元测试,并且在测试分支上通过了所有workflows,请检查一下我的代码,如果有存在问题的话我会尽快修改,谢谢

@Issues-translate-bot
Copy link

RoBot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


@iSuperCoder Hello, I rewrote the unit tests of etcd3 with reference to nacos_test, and passed all workflows on the test branch. Please check my code. If there are any problems, I will modify them as soon as possible. Thank you.

@codecov-commenter
Copy link

Codecov Report

Attention: 67 lines in your changes are missing coverage. Please review.

Comparison is base (4330268) 37.28% compared to head (958564d) 37.68%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #605      +/-   ##
==========================================
+ Coverage   37.28%   37.68%   +0.39%     
==========================================
  Files         175      175              
  Lines       11666    11837     +171     
==========================================
+ Hits         4350     4461     +111     
- Misses       6952     6996      +44     
- Partials      364      380      +16     
Files Coverage Δ
pkg/discovery/init.go 73.91% <100.00%> (+7.24%) ⬆️
pkg/discovery/etcd3.go 61.71% <61.27%> (+61.71%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wt-better wt-better self-requested a review December 23, 2023 09:52
@luky116 luky116 changed the title feat: Implement the discovery service by Etcd 【等CI结束就合并】feat: Implement the discovery service by Etcd Feb 3, 2024
@luky116 luky116 merged commit 18e611d into apache:master Feb 17, 2024
5 checks passed
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.

【高优先级】在discovery模块中实现Etcd服务发现逻辑
6 participants