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

feat: Grpc based Health check. #1935

Merged
merged 2 commits into from Jun 22, 2022
Merged

Conversation

sheny1xuan
Copy link
Contributor

@sheny1xuan sheny1xuan commented Jun 14, 2022

What this PR does:

  • Grpc based Health check.

Which issue(s) this PR fixes:
Fixes ##1904

You should pay attention to items below to ensure your pr passes our ci test
We do not merge pr with ci tests failed

  • All ut passed (run 'go test ./...' in project root)
  • After go-fmt ed , run 'go fmt project' using goland.
  • Golangci-lint passed, run 'sudo golangci-lint run' in project root.
  • After import formatted, (using imports-formatter to run 'imports-formatter .' in project root, to format your import blocks, mentioned in CONTRIBUTING.md above)
  • Your new-created file needs to have apache license at the top, like other existed file does.
  • All integration test passed. You can run integration test locally (with docker env). Clone our dubbo-go-samples project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)

@sheny1xuan sheny1xuan force-pushed the health_check branch 3 times, most recently from 5b55641 to c47b0d2 Compare June 14, 2022 13:46
	* Use grpc health check proto, ref: https://github.com/grpc-ecosystem/grpc-health-probe
	* Fix test config
	* Current health check only support triple protocol.
)

// Server implements `service Health`.
type XXX_healthServer struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

这里为何是 XXX 开头?替换成 Dubbogo 如何?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我觉得应该是可以的,我是参考了以前grpc reflection的server的命名方法。@LaurenceLiZhixin
image

Copy link
Contributor

Choose a reason for hiding this comment

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

建议换成Dubbogo开头吧,不要使用下划线。

Copy link
Contributor

Choose a reason for hiding this comment

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

我觉得应该是可以的,我是参考了以前grpc reflection的server的命名方法。@LaurenceLiZhixin image

这么说吧,XXX 开头我以前确实见过,那是 protobuf 根据 .proto 文件生成的机器代码,不是给人读的。

)

// Server implements `service Health`.
type XXX_healthServer struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

为何要义 XXX 开头命名?

@codecov-commenter
Copy link

Codecov Report

Merging #1935 (c47b0d2) into 3.0 (a0528f2) will decrease coverage by 0.55%.
The diff coverage is 8.33%.

❗ Current head c47b0d2 differs from pull request most recent head c341b45. Consider uploading reports for the commit c341b45 to get more accurate results

@@            Coverage Diff             @@
##              3.0    #1935      +/-   ##
==========================================
- Coverage   44.95%   44.40%   -0.56%     
==========================================
  Files         287      284       -3     
  Lines       17130    17038      -92     
==========================================
- Hits         7701     7565     -136     
- Misses       8616     8670      +54     
+ Partials      813      803      -10     
Impacted Files Coverage Δ
config/provider_config.go 41.53% <0.00%> (-3.47%) ⬇️
registry/protocol/protocol.go 72.10% <100.00%> (+0.10%) ⬆️
config/config_center_config.go 14.28% <0.00%> (-58.10%) ⬇️
cluster/loadbalance/ringhash/ring.go 84.50% <0.00%> (-2.82%) ⬇️
metrics/prometheus/reporter.go 33.33% <0.00%> (-1.70%) ⬇️
config/graceful_shutdown_config.go 73.33% <0.00%> (-1.67%) ⬇️
config/reference_config.go 31.97% <0.00%> (-0.33%) ⬇️
config_center/apollo/impl.go
config_center/apollo/listener.go
config_center/apollo/factory.go
... and 2 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 a0528f2...c341b45. Read the comment docs.

@AlexStocks AlexStocks merged commit 48fad4b into apache:3.0 Jun 22, 2022
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.

None yet

5 participants