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

client: rename CLIContext to Context #6290

Merged
merged 25 commits into from
Jun 1, 2020
Merged

Conversation

sahith-narahari
Copy link
Contributor

@sahith-narahari sahith-narahari commented May 27, 2020

Description

closes: #3061

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.


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

x/upgrade/module.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@anilcse anilcse left a comment

Choose a reason for hiding this comment

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

Added a few comments, otherwise lgtm

client/context_test.go Show resolved Hide resolved
client/lcd/root.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #6290 into master will increase coverage by 0.00%.
The diff coverage is 10.29%.

@@           Coverage Diff           @@
##           master    #6290   +/-   ##
=======================================
  Coverage   55.70%   55.70%           
=======================================
  Files         447      446    -1     
  Lines       26933    26931    -2     
=======================================
  Hits        15003    15003           
+ Misses      10859    10857    -2     
  Partials     1071     1071           

@sahith-narahari sahith-narahari marked this pull request as ready for review May 27, 2020 19:29
Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK

@jackzampolin
Copy link
Member

There's a lot of other stuff I would want to see in a PR titled "Refactor CLIContext..." but this is a good start. Will be an annoying change for app devs. We should add a note for users migrating

@aaronc aaronc added the T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). label May 27, 2020
aaronc
aaronc previously requested changes May 27, 2020
Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

Please add a CHANGELOG entry @sahith-narahari

client/lcd/root.go Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM

@alessio
Copy link
Contributor

alessio commented May 29, 2020

alessio@bangalter:~/work/cosmos-sdk$ git log --oneline -n 1
3324981ac (HEAD -> sahith/refactor-cli-ctx, origin/sahith/refactor-cli-ctx) Apply suggestions from code review
alessio@bangalter:~/work/cosmos-sdk$ make mocks
mockgen -source=client/context/account_retriever.go -package mocks -destination tests/mocks/account_retriever.go
2020/05/29 16:07:42 Loading input failed: loading package failed
Makefile:39: recipe for target 'mocks' failed
make: *** [mocks] Error 1

@sahith-narahari
Copy link
Contributor Author

@alessio I'm working on updating docs and ADRs currently, will update once it's done

@alessio
Copy link
Contributor

alessio commented May 29, 2020

docs need a little bit more work too:

alessio@bangalter:~/work/cosmos-sdk$ grep -rwl CLIContext docs/
docs/building-modules/module-interfaces.md
docs/architecture/adr-020-protobuf-transaction-encoding.md
docs/architecture/adr-021-protobuf-query-encoding.md
docs/interfaces/query-lifecycle.md

EDIT: I've just read your message (I'm working on updating docs and ADRs currently, will update once it's done) - good one!

make mocks works again now too, thanks!

@sahith-narahari
Copy link
Contributor Author

Yes, few docs and ADRs are still pending. I'll resume after our call

@sahith-narahari sahith-narahari requested a review from alessio May 30, 2020 16:57
@fedekunze fedekunze requested a review from aaronc May 31, 2020 01:21
@fedekunze fedekunze changed the title Refactor CliContext as Context context: rename CliContext to Context May 31, 2020
@fedekunze fedekunze changed the title context: rename CliContext to Context client: rename CliContext to Context May 31, 2020
@fedekunze fedekunze added the A:automerge Automatically merge PR once all prerequisites pass. label May 31, 2020
Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

ACK

@alessio alessio dismissed aaronc’s stale review June 1, 2020 12:45

CHANGELOG change was introduced. Hence dismissing

@mergify mergify bot merged commit 39f53ac into master Jun 1, 2020
@mergify mergify bot deleted the sahith/refactor-cli-ctx branch June 1, 2020 12:46
@clevinson clevinson added this to the v0.39 milestone Jun 11, 2020
@alessio alessio changed the title client: rename CliContext to Context client: rename CLIContext to Context Oct 1, 2020
ilyabukalov added a commit to Sifchain/sifnode that referenced this pull request Nov 11, 2020
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* Refactor CliContext as Context

* Fix lint issues

* Fix goimports

* Fix gov tests

* Resolved ci-lint issues

* Add changelog

* Rename cliCtx to clientCtx

* Fix mocks and routes

* Add changelog

* Update changelog

* Apply suggestions from code review

Co-authored-by: Alessio Treglia <[email protected]>

* merge client/rpc/ro{ot,utes}.go

* Update docs

* client/rpc: remove redundant client/rpc.RegisterRPCRoutes

* regenerate mocks

* Update ADRs

Co-authored-by: Alessio Treglia <[email protected]>
Co-authored-by: Federico Kunze <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI Context Renaming
9 participants