8000 grpc: Add base gRPC server with version service to v0.38.x-experimental by cason · Pull Request #1437 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

grpc: Add base gRPC server with version service to v0.38.x-experimental #1437

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

Merged
merged 9 commits into from
Oct 10, 2023

Conversation

cason
Copy link
Contributor
@cason cason commented Oct 5, 2023

Addresses #1421.

Manual backport of #818, which introduces a new base gRPC service. The new gRPC service is implemented under rpc/grpc/client and rpc/grpc/server. The destination branch contains a minimal, legacy gRPC implementation that has been deprecated. It is implemented under rpc/grpc and is preserved by this PR.

So, this PR introduces a new base gRPC service that is supposed to co-exist with the existing/legacy gRPC service. The unit tests for the legacy gRPC service were configured to have also the new gRPC service enabled. The e2e test suite was updated to enable the legacy gRPC service, in addition to the new base gRPC service. These changes are intended to attest that both gRPC service implementation can properly co-exist.

PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments
8000

thanethomson and others added 2 commits October 4, 2023 11:47
* proto: Add VersionService

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* proto: make proto-gen

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* config: Add gRPC server section

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc/grpc: Add server with support for version service

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* node: Add gRPC server

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc/grpc: Add client with support for version service

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* test/e2e: Add gRPC server test of version service

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add changelog entries

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc: Fix test broken by introduction of gRPC service

Some of the RPC tests run Comet nodes in goroutines, causing port
conflicts. This randomizes the port assigned to the gRPC server,
reducing the likelihood of port conflicts.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc/grpc: Update log message format to conform to RPC log style

Signed-off-by: Thane Thomson <connect@thanethomson.com>

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>
@cason cason added the grpc Anything relating to the gRPC API label Oct 5, 2023
@cason cason added this to the 2023-Q4 milestone Oct 5, 2023
@cason cason self-assigned this Oct 5, 2023
@cason cason marked this pull request as ready for review October 5, 2023 14:05
@cason cason requested a review from a team as a code owner October 5, 2023 14:05
Copy link
Contributor
@jmalicevic jmalicevic left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member
@hvanz hvanz left a comment

Choose a reason for hiding this comment

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

LGTM

@jmalicevic jmalicevic merged commit dec82fb into v0.38.x-experimental Oct 10, 2023
@jmalicevic jmalicevic deleted the jasmina-1421-backport-pr818-version2 branch October 10, 2023 13:23
lasarojc pushed a commit that referenced this pull request Nov 13, 2023
…al (#1437)

* grpc: Add base gRPC server with version service (#818)

* proto: Add VersionService

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* proto: make proto-gen

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* config: Add gRPC server section

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc/grpc: Add server with support for version service

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* node: Add gRPC server

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc/grpc: Add client with support for version service

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* test/e2e: Add gRPC server test of version service

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add changelog entries

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc: Fix test broken by introduction of gRPC service

Some of the RPC tests run Comet nodes in goroutines, causing port
conflicts. This randomizes the port assigned to the gRPC server,
reducing the likelihood of port conflicts.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* rpc/grpc: Update log message format to conform to RPC log style

Signed-off-by: Thane Thomson <connect@thanethomson.com>

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Resolved cherry pick conflicts

* grpcs: adding legacy gRPC to e2e test suite

* grpc: added legacy gRPC ping test to e2e test suite

* grpc: fix lint check, used of deprecated method

* Added clarification in config

* grpc: fixing backport issued spotted by @hvanz

* grpc: replacing port for legacy gRPC endpoint

* grpc: removing setting not present on main/v0.38.x

---------

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grpc Anything relating to the gRPC API
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

ADR-101 v0.38.x : BaseService and VersionService backport
4 participants
0