-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
gRPC gateway init #7019
gRPC gateway init #7019
Conversation
…21-grpc-gateway-register
…21-grpc-gateway-register
…21-grpc-gateway-register
…21-grpc-gateway-register
…21-grpc-gateway-register
Codecov Report
@@ Coverage Diff @@
## master #7019 +/- ##
==========================================
- Coverage 54.82% 54.53% -0.29%
==========================================
Files 561 566 +5
Lines 38327 38728 +401
==========================================
+ Hits 21012 21120 +108
- Misses 15604 15884 +280
- Partials 1711 1724 +13 |
…21-grpc-gateway-register
…21-grpc-gateway-register
…s/cosmos-sdk into atheesh/5921-grpc-gateway-register
…21-grpc-gateway-register
Thanks for a quick review @fedekunze . I've addressed all your comments. Yes, I will create a follow-up PR for integrating all other modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR lgtm!
Added question about how the staking validators HTTP route should look like
true, | ||
}, | ||
{ | ||
"test query validators gRPC route without status query param", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, if the status query param is required, would it make more sense to have the route as /cosmos/staking/v1beta1/validators/{status}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I also agree that requiring query parameters seems strange. Is this a pattern we follow elsewhere? Would be nice to not have it at all as a pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will conflict with other route: /cosmos/staking/v1beta1/validators/{validator_id}
. I also spent some time to update this in annotations PR but ended up here. Old REST querier is also using it in the same way. May be we can add a default status for this. By default we can fetch all the bonded validators, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a default status sounds better than erroring out no a REST call without query parameters IMO.
ah, forgot about automerge. My question #7019 (comment) is still relevant |
* WIP: grpc server setup * add register grpc routes * updated go mod * updated grpc for all modules * added pb file for grpc gateway * udpated gw file * added a test for grpc route * fixed conflicts * added grpc server * grpc tests added * cleanup * Fix gateway forward issue * Add godoc * updated tests * fix lint * fix tests * fix tests * fix tests * fixed test * Add grpc headers * Fix error handling * Fix tests - hacky * Fix lint * remove debug logs * Fix review comments * move grpc tests into a separate file * Fix protobuf version * Update x/capability/module.go * Fix godoc * Fix review suggestions * Fix codec * Add query params test for gateway request * Fix gofmt Co-authored-by: anilCSE <anil@vitwit.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
ref: #5921
Description
closes: #XXXX
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes