-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
x/staking: cli migration to use gRPC query client #6728
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6728 +/- ##
==========================================
+ Coverage 59.94% 62.74% +2.80%
==========================================
Files 513 386 -127
Lines 31434 23889 -7545
==========================================
- Hits 18842 14989 -3853
+ Misses 11156 7810 -3346
+ Partials 1436 1090 -346 |
…21-grpc-cli-migration-staking
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.
LGTM overall.
Just a small comment, shouldn't we remove
cosmos-sdk/x/staking/client/cli/query.go
Lines 173 to 174 in aa6699c
cmd.Flags().Int(flags.FlagPage, 1, "pagination page of unbonding delegations to query for") | |
cmd.Flags().Int(flags.FlagLimit, 100, "pagination limit of unbonding delegations to query for") |
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.
LGTM. I also have the question about the missing pagination fields
…21-grpc-cli-migration-staking
…21-grpc-cli-migration-staking
…21-grpc-cli-migration-staking
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.
LGTM @atheeshp can you introduce pagination flags and refactor pagination queries accordingly? Let's address them in this PR so future PRs can make use of that
…21-grpc-cli-migration-staking
…cosmos/cosmos-sdk into atheesh/5921-grpc-cli-migration-staking
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.
lgtm 👍, proposing to DRY the pagination flags
@@ -61,6 +61,9 @@ const ( | |||
FlagPage = "page" |
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.
should we remove this one?
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.
May be yes after all module migrations done.
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.
yeah, agreed with @atheeshp: auth,ibc,evidence,gov etc are all using FlagPage, probably should wait for those modules to switch to using gRPC & query.PageRequest first, or else this PR will become too big.
…21-grpc-cli-migration-staking
…cosmos/cosmos-sdk into atheesh/5921-grpc-cli-migration-staking
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.
lgtm, just a small doc change.
* migrated to use gRPC query client * removed codecs usage * review change * added read command flags * added pagination flags * fixed limit issue * added helper function for default pagination flags * review changes * review change * review changes Co-authored-by: Federico Kunze <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ref: #5921
closes: #6617
Description
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