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

refactor: remove .Type() and .Route() from msgs (backport #14751) #15470

Closed
wants to merge 2 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 20, 2023

This is an automatic backport of pull request #14751 done by Mergify.
Cherry-pick of 8dbdfea has failed:

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

You are currently cherry-picking commit 8dbdfea9e.
  (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:   baseapp/baseapp.go
	modified:   docs/docs/building-modules/02-messages-and-queries.md
	modified:   docs/docs/core/08-events.md
	modified:   testutil/testdata/tx.go
	modified:   types/simulation/types.go
	modified:   types/tx_msg.go
	modified:   types/tx_msg_test.go
	modified:   x/auth/migrations/legacytx/stdsign.go
	modified:   x/auth/types/msgs.go
	modified:   x/auth/vesting/types/msgs.go
	modified:   x/authz/msgs.go
	modified:   x/authz/simulation/operations_test.go
	modified:   x/bank/simulation/operations.go
	modified:   x/bank/simulation/operations_test.go
	modified:   x/bank/types/msgs.go
	modified:   x/bank/types/msgs_test.go
	modified:   x/consensus/types/msgs.go
	modified:   x/crisis/types/msgs.go
	modified:   x/distribution/simulation/operations.go
	modified:   x/distribution/simulation/operations_test.go
	modified:   x/evidence/types/genesis_test.go
	modified:   x/feegrant/msgs.go
	modified:   x/feegrant/simulation/operations.go
	modified:   x/feegrant/simulation/operations_test.go
	modified:   x/gov/types/v1beta1/msgs.go
	modified:   x/group/msgs.go
	modified:   x/group/msgs_test.go
	modified:   x/group/simulation/operations.go
	modified:   x/group/simulation/operations_test.go
	modified:   x/mint/types/msgs.go
	modified:   x/simulation/event_stats.go
	modified:   x/simulation/util.go
	modified:   x/slashing/simulation/operations.go
	modified:   x/slashing/simulation/operations_test.go
	modified:   x/slashing/types/msg.go
	modified:   x/staking/keeper/msg_server.go
	modified:   x/staking/simulation/operations.go
	modified:   x/staking/types/msg.go
	modified:   x/upgrade/types/msgs.go
	modified:   x/upgrade/types/msgs_test.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   x/distribution/types/msg.go
	both modified:   x/evidence/types/msgs.go
	both modified:   x/gov/client/utils/query_test.go
	both modified:   x/gov/simulation/operations.go
	both modified:   x/gov/simulation/operations_test.go
	both modified:   x/gov/types/v1/msgs.go
	both modified:   x/staking/simulation/operations_test.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.com

(cherry picked from commit 8dbdfea)

# Conflicts:
#	CHANGELOG.md
#	x/distribution/types/msg.go
#	x/evidence/types/msgs.go
#	x/gov/client/utils/query_test.go
#	x/gov/simulation/operations.go
#	x/gov/simulation/operations_test.go
#	x/gov/types/v1/msgs.go
#	x/staking/simulation/operations_test.go
@@ -230,7 +229,7 @@ func SimulateMsgFundCommunityPool(txConfig client.TxConfig, ak types.AccountKeep
if !hasNeg {
fees, err = simtypes.RandomFees(r, ctx, coins)
if err != nil {
return simtypes.NoOpMsg(types.ModuleName, types.TypeMsgFundCommunityPool, "unable to generate fees"), nil, err
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgFundCommunityPool{}), "unable to generate fees"), nil, err
Copy link
Member

Choose a reason for hiding this comment

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

this seems api breaking for testing. @julienrbrt i saw you tagged as backport to 0.47.1. is there good reasoning to do it here?

Copy link
Member

@julienrbrt julienrbrt Mar 20, 2023

Choose a reason for hiding this comment

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

There should not be any behavior change, actually. We update our tests, and clean-up the code.
I don't think it is breaking (route() and type() were always the msg urls), moreover, chains on v0.47 won't use Route() and Type(). So it is an improvement on simulations.

Copy link
Member

Choose a reason for hiding this comment

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

hmm, its api breaking in the sense that it requires users to upgrade code instead of using a newer version and releasing, or does a user not need to make these changes?. I dont see much benefit to backporting this. Are you fine with closing if the above lines are required

Copy link
Member

@julienrbrt julienrbrt Mar 20, 2023

Choose a reason for hiding this comment

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

No, a user does not need to make these changes. However, I do agree what apart from cleaning up, it isn't needed.
So let's close, v0.48 will be cleaner.

@github-advanced-security
Copy link

You have successfully added a new gosec configuration .github/workflows/gosec.yml:Gosec. As part of the setup process, we have scanned this repository and found 229 existing alerts. Please check the repository Security tab to see all alerts.

=======
spendable := bk.SpendableCoins(ctx, account.GetAddress())

var fees sdk.Coins

Check warning

Code scanning / CodeQL

Unreachable statement

This statement is unreachable.
@julienrbrt julienrbrt closed this Mar 20, 2023
@mergify mergify bot deleted the mergify/bp/release/v0.47.x/pr-14751 branch March 20, 2023 15:12
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.

2 participants