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

feat!: remove legacy REST (backport #9594) #10037

Closed
wants to merge 3 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 31, 2021

This is an automatic backport of pull request #9594 done by Mergify.
Cherry-pick of cd22168 has failed:

On branch mergify/bp/release/v0.44.x/pr-9594
Your branch is up to date with 'origin/release/v0.44.x'.

You are currently cherry-picking commit cd221680c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   client/docs/config.json
	modified:   client/docs/statik/statik.go
	modified:   client/docs/swagger-ui/swagger.yaml
	deleted:    client/docs/swagger_legacy.yaml
	modified:   client/grpc/tmservice/service_test.go
	deleted:    client/rest/rest.go
	modified:   client/rpc/block.go
	deleted:    client/rpc/routes.go
	modified:   client/rpc/rpc_test.go
	modified:   client/rpc/status.go
	modified:   client/rpc/validators.go
	modified:   go.sum
	modified:   server/api/server.go
	modified:   simapp/app.go
	new file:   testutil/rest/rest.go
	modified:   types/module/module_test.go
	modified:   types/query/pagination.go
	deleted:    types/rest/rest.go
	deleted:    types/rest/rest_test.go
	modified:   x/auth/client/cli/tx_multisign.go
	modified:   x/auth/client/cli/tx_sign.go
	deleted:    x/auth/client/rest/query.go
	deleted:    x/auth/client/rest/rest.go
	modified:   x/auth/client/testutil/suite.go
	modified:   x/auth/module.go
	modified:   x/auth/tx/service_test.go
	modified:   x/auth/vesting/module.go
	deleted:    x/authz/client/rest/grpc_query_test.go
	modified:   x/authz/client/testutil/query.go
	modified:   x/authz/client/testutil/tx.go
	modified:   x/authz/module/module.go
	deleted:    x/bank/client/rest/query.go
	deleted:    x/bank/client/rest/rest.go
	deleted:    x/bank/client/rest/tx.go
	renamed:    x/bank/client/rest/grpc_query_test.go -> x/bank/client/testutil/grpc.go
	modified:   x/bank/module.go
	modified:   x/capability/module.go
	modified:   x/crisis/module.go
	modified:   x/distribution/client/proposal_handler.go
	deleted:    x/distribution/client/rest/query.go
	deleted:    x/distribution/client/rest/rest.go
	deleted:    x/distribution/client/rest/tx.go
	deleted:    x/distribution/client/rest/utils.go
	modified:   x/distribution/client/testutil/cli_test.go
	renamed:    x/distribution/client/rest/grpc_query_test.go -> x/distribution/client/testutil/grpc_query_suite.go
	modified:   x/distribution/module.go
	modified:   x/evidence/client/evidence_handler.go
	deleted:    x/evidence/client/rest/query.go
	deleted:    x/evidence/client/rest/rest.go
	deleted:    x/evidence/client/rest/tx.go
	modified:   x/evidence/module.go
	modified:   x/feegrant/module/module.go
	deleted:    x/genutil/client/rest/query.go
	modified:   x/genutil/module.go
	modified:   x/gov/client/proposal_handler.go
	deleted:    x/gov/client/rest/grpc_query_test.go
	deleted:    x/gov/client/rest/query.go
	deleted:    x/gov/client/rest/rest.go
	deleted:    x/gov/client/rest/rest_test.go
	deleted:    x/gov/client/rest/tx.go
	modified:   x/gov/module.go
	deleted:    x/mint/client/rest/grpc_query_test.go
	deleted:    x/mint/client/rest/query.go
	deleted:    x/mint/client/rest/rest.go
	modified:   x/mint/module.go
	modified:   x/params/client/proposal_handler.go
	deleted:    x/params/client/rest/grpc_query_test.go
	deleted:    x/params/client/rest/rest.go
	modified:   x/params/client/utils/utils.go
	modified:   x/params/module.go
	deleted:    x/slashing/client/rest/grpc_query_test.go
	deleted:    x/slashing/client/rest/query.go
	deleted:    x/slashing/client/rest/rest.go
	deleted:    x/slashing/client/rest/tx.go
	modified:   x/slashing/module.go
	deleted:    x/staking/client/rest/grpc_query_test.go
	deleted:    x/staking/client/rest/query.go
	deleted:    x/staking/client/rest/rest.go
	deleted:    x/staking/client/rest/rest_test.go
	deleted:    x/staking/client/rest/tx.go
	deleted:    x/staking/client/rest/utils.go
	modified:   x/staking/client/testutil/suite.go
	modified:   x/staking/module.go
	modified:   x/upgrade/client/proposal_handler.go
	deleted:    x/upgrade/client/rest/query.go
	deleted:    x/upgrade/client/rest/rest.go
	deleted:    x/upgrade/client/rest/tx.go
	modified:   x/upgrade/client/testutil/cli_test.go
	modified:   x/upgrade/module.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   client/tx/tx.go
	both modified:   codec/amino_codec_test.go
	both modified:   x/auth/client/cli/query.go
	deleted by them: x/auth/client/rest/broadcast.go
	deleted by them: x/auth/client/rest/decode.go
	deleted by them: x/auth/client/rest/encode.go
	deleted by them: x/auth/client/rest/rest_test.go
	both modified:   x/authz/client/testutil/grpc.go
	deleted by them: x/bank/client/rest/query_test.go
	deleted by them: x/bank/client/rest/tx_test.go
	both modified:   x/gov/client/testutil/grpc.go
	both modified:   x/mint/client/testutil/grpc.go
	both modified:   x/params/client/testutil/grpc.go
	both modified:   x/slashing/client/testutil/grpc.go
	both modified:   x/staking/client/testutil/grpc.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

<!--
The default pull request template is for types feat, fix, or refactor.
For other templates, add one of the following parameters to the url:
- template=docs.md
- template=other.md
-->

## Description

ref: #7517

  * [x] Remove the x/{module}/client/rest folder
  * [x] Remove all glue code between simapp/modules and the REST server

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification - see #9615
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [x] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [x] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [x] reviewed API design and naming
- [ ] reviewed documentation is accurate - see #9615
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit cd22168)

# Conflicts:
#	CHANGELOG.md
#	client/tx/tx.go
#	codec/amino_codec_test.go
#	x/auth/client/cli/query.go
#	x/auth/client/rest/broadcast.go
#	x/auth/client/rest/decode.go
#	x/auth/client/rest/encode.go
#	x/auth/client/rest/rest_test.go
#	x/authz/client/testutil/grpc.go
#	x/bank/client/rest/query_test.go
#	x/bank/client/rest/tx_test.go
#	x/gov/client/testutil/grpc.go
#	x/mint/client/testutil/grpc.go
#	x/params/client/testutil/grpc.go
#	x/slashing/client/testutil/grpc.go
#	x/staking/client/testutil/grpc.go
@mergify mergify bot added the conflicts label Aug 31, 2021
@mergify mergify bot mentioned this pull request Aug 31, 2021
21 tasks
@orijbot
Copy link

orijbot commented Aug 31, 2021

@tac0turtle
Copy link
Member

can this be punted to 0.45 since this was meant for that release cycle?

@clevinson
Copy link
Contributor

@marbar3778 This is required for #10034. We could choose to reduce the scope of this backport to only remove legacy broadcast & encode REST endpoints, as those are the endpoints that must be removed in order for #10034 to be merged safely.

Do you think we'd be better off just back porting the removal of broadcast & encode? It was my thought that we might as well remove all, rather than only dropping some, but I could be convinced otherwise.

@clevinson
Copy link
Contributor

Closing this PR. After conversation w/ @zmanian it was decided that for v0.44 we should only drop the legacy REST endpoints that are necessary for #10034 (broadcast & encode)

@clevinson clevinson closed this Sep 1, 2021
@mergify mergify bot deleted the mergify/bp/release/v0.44.x/pr-9594 branch September 1, 2021 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants