Skip to content

Refactor RegisterQueryServices -> RegisterServices#7518

Merged
mergify[bot] merged 2 commits intomasterfrom
aaronc/7500-register-services
Oct 12, 2020
Merged

Refactor RegisterQueryServices -> RegisterServices#7518
mergify[bot] merged 2 commits intomasterfrom
aaronc/7500-register-services

Conversation

@aaronc
Copy link
Copy Markdown
Member

@aaronc aaronc commented Oct 12, 2020

ref: #7500

  • refactors AppModule.RegisterQueryServices -> AppModule.RegisterServices
  • adds the module.Configurator object for use in RegisterServices

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.

  • 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
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 12, 2020

Codecov Report

Merging #7518 into master will decrease coverage by 0.00%.
The diff coverage is 78.94%.

@@            Coverage Diff             @@
##           master    #7518      +/-   ##
==========================================
- Coverage   56.01%   56.01%   -0.01%     
==========================================
  Files         592      593       +1     
  Lines       37244    37246       +2     
==========================================
+ Hits        20864    20865       +1     
- Misses      14262    14263       +1     
  Partials     2118     2118              

@aaronc
Copy link
Copy Markdown
Member Author

aaronc commented Oct 12, 2020

@clevinson @amaurymartiny how am I supposed to write a CHANGELOG entry for this? The CHANGELOG on master still has all the 0.40 stuff under unreleased. I'm general I'm a bit concerned of this strategy of divergent branches. I think it is smart to merge release branches back into master at regular intervals to deal with stuff like this.

@aaronc aaronc marked this pull request as ready for review October 12, 2020 16:13
Copy link
Copy Markdown
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

@mergify mergify bot merged commit 228728c into master Oct 12, 2020
@mergify mergify bot deleted the aaronc/7500-register-services branch October 12, 2020 16:31
Copy link
Copy Markdown
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

Approved.

I think it is smart to merge release branches back into master at regular intervals to deal with stuff like this.

Yes, I believe that's the plan once rc0 is out.

@alexanderbez
Copy link
Copy Markdown
Contributor

Really? Release branches are not merged back into master/main unless we've changed our release workflow (i.e. we're no longer using trunk-based development).

@aaronc
Copy link
Copy Markdown
Member Author

aaronc commented Oct 12, 2020

Really? Release branches are not merged back into master/main unless we've changed our release workflow (i.e. we're no longer using trunk-based development).

Well if we're not going to merge stuff back in then we'll end up with divergences like we do now. I'm not sure why we don't have the CHANGELOG updates on master.

@alexanderbez
Copy link
Copy Markdown
Contributor

alexanderbez commented Oct 12, 2020

Everything goes into master/main. Backports are cherry-picked into long-living branches, which releases are cut from.

@aaronc
Copy link
Copy Markdown
Member Author

aaronc commented Oct 12, 2020

This was merged directly into v0.40.x: #7437 which is why the CHANGELOG on master is now out of date. That should have been on master is that right @alexanderbez ?

@alexanderbez
Copy link
Copy Markdown
Contributor

Yes @aaronc. Also why against v0.40.x and not backport/v0.40.x? Or are they the same?

@amaury1093
Copy link
Copy Markdown
Contributor

Everything goes into master/main. Backports are cherry-picked into long-living branches, which releases are cut from.

The argument against this was that the CHANGELOG on master would show v0.40-rc0 for ~a couple days, which can be confusing, esp that so many people are waiting on the release.

Also why against v0.40.x and not backport/v0.40.x? Or are they the same?

There's no backport/v0.40.x branch.

@alexanderbez
Copy link
Copy Markdown
Contributor

The argument against this was that the CHANGELOG on master would show v0.40-rc0 for ~a couple days, which can be confusing, esp that so many people are waiting on the release.

CHANGELOG on the main branch should only reflect 0.40 once 0.40 is released. IDK why we have an RC section on the main branch. We've never done this before.

There's no backport/v0.40.x branch.

We need to ;-) (unless this is the intention of the v0.40.x branch.

@aaronc
Copy link
Copy Markdown
Member Author

aaronc commented Oct 13, 2020

@clevinson @amaurymartiny what's the plan for updating the CHANGELOG on master so we can add entries for this PR and other new stuff?

@clevinson
Copy link
Copy Markdown
Contributor

@aaronc @alexanderbez

I think it's best to follow what tendermint has been doing, have changelog entries for the individual RC's, and then we can consolidate them into one changelog section once the actual release is published.

Here's a PR for getting master back up to date- #7528

All PRs on master should just have changelogs go into the unreleased section, this should also make it easier for us to cherrypick from that into subsequent RC's.

@clevinson
Copy link
Copy Markdown
Contributor

@aaronc Sorry to have missed the boat on this- i was not working yesterday, and should have taken care of updating changelog on master on Friday probably. Can you create a changelog entry for this in a seperate PR into master?

@alexanderbez
Copy link
Copy Markdown
Contributor

I suppose having RC changelogs added to the main branch is fine so long as we tidy it once we do a final release.

@fedekunze
Copy link
Copy Markdown
Contributor

This PR is missing an api breaking changelog entry

@clevinson clevinson mentioned this pull request Oct 19, 2020
16 tasks
clevinson pushed a commit that referenced this pull request Oct 19, 2020
* Refactor RegisterQueryServices -> RegisterServices

* Fix tests
aaronc added a commit that referenced this pull request Oct 20, 2020
* Refactor RegisterQueryServices -> RegisterServices (#7518)

* Refactor RegisterQueryServices -> RegisterServices

* Fix tests

* Add ADR 031 BaseApp and codec infrastructure (#7519)

* Refactor RegisterQueryServices -> RegisterServices

* Cleaner proto files

* Fix tests

* Add MsgServer

* Fix lint

* Remove MsgServer from configurator for now

* Remove useless file

* Fix build

* typo

* Add router

* Fix test

* WIP

* Add router

* Remove test helper

* Add beginning of test

* Move test to simapp?

* ServiceMsg implement sdk.Msg

* Add handler by MsgServiceRouter

* Correct signature

* Add full test

* use TxEncoder

* Update baseapp/msg_service_router.go

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Push changes

* WIP on ServiceMsg unpacking

* Make TestMsgService test pass

* Fix tests

* Tidying up

* Tidying up

* Tidying up

* Add JSON test

* Add comments

* Tidying

* Lint

* Register MsgRequest interface

* Rename

* Fix tests

* RegisterCustomTypeURL

* Add changelog entries

* Put in features

* Update baseapp/msg_service_router.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/msg_service_router.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/msg_service_router.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/msg_service_router.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/msg_service_router.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/msg_service_router.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update baseapp/msg_service_router.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Address review comments

* Address nit

* Fix lint

* Update codec/types/interface_registry.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* godoc

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Refactor x/bank according to ADR 031 (#7520)

* Refactor x/bank according to ADR 031

* Add comment

* Update comment

* Add comment

* Add tests, address edge cases

* Imports

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Refactor x/{gov, crisis} according to ADR 031 (#7533)

* Refactor x/gov according to ADR 31

* fix tests

* Refactor x/crisis according to ADR 031

* fix lint

* lint

* lint

* review changes

* lint

* review change

* fic doc

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Refactor x/distribution according to ADR 031 (#7524)

* Refactor x/distribution according to ADR 31

* lint

* removed unused

* Apply suggestions from code review

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* [x/slashing] Implement Protobuf Msg Services (#7557)

* Update x/slashing to use proto msg service

* Fix proto-gen

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Refactor x/auth/vesting to use ADR-031 (#7551)

* update auth/vesting module to use proto msg services

* rm accidental tmp files

* Update x/auth/vesting/msg_server.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* golangci-lint fix

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Refactor x/staking according to ADR 031 (#7556)

* Refactor x/staking according to ADR 031

* lint

* review changes

* review changes

* review changes

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Add MsgServer to Configurator for ADR 031 wiring (#7584)

* Add MsgServer to Configurator for ADR 031 wiring

* Add docs, wire up evidence & staking

* Add integration test

* Add comments

* Doc strings

* Update types/module/configurator.go

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>

* Update types/module/configurator.go

Co-authored-by: Cory <cjlevinson@gmail.com>

* Wire up vesting

* Update CHANGELOG.md

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Refactor x/evidence to ADR-031 (#7538)

* Refactor x/evidence to ADR-031

* Add hash in response

* Update changelog

* Update x/evidence/keeper/keeper.go

* Update proto/cosmos/evidence/v1beta1/tx.proto

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Use msgServer struct

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Refactor x/ibc to ADR 031 (#7576)

* WIP: Refactor x/ibc to ADR 031

* updated handler

* removed unsued

* fix

* Add proto service for ibc/transfer

* lint

* remove old upgrade handler

* added doc

* review changes

* fix tests

* formatter

* Add MsgServer wiring in RegisterServices

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* add changelog entries for non-nil Result.Data fields in message responses

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
* Refactor RegisterQueryServices -> RegisterServices

* Fix tests
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.

6 participants