-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
fix: always move auth module migration to the end #10608
Conversation
@@ -405,10 +405,19 @@ func (m Manager) RunMigrations(ctx sdk.Context, cfg Configurator, fromVM Version | |||
// and the order of executing migrations matters) | |||
// TODO: make the order user-configurable? | |||
sortedModNames := make([]string, 0, len(m.Modules)) | |||
hasAuth := false | |||
const authModulename = "auth" // using authtypes.ModuleName causes import cycle. |
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.
I know it smells, but moving it to refactoring this packages is no go for merging it in 0.44.x
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.
Can we add a TODO for future scope?
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.
TODO doesn't make sense here because this is merged only for 0.44.x, not in master.
cc: @RiccardoM , @iramiller |
cd860a8
to
af06f2f
Compare
Are we certain that auth is the only module of the ordered set that matters? As in no external chain modules will have this same issue? It seems like this approach will still work with our workaround that sent in each module one at a time out of an array to control the order. |
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 needs changelog entry.
Issues for other chains migrations will still persist, but perhaps thats out of scope for this PR. Documentation for this as an issue should propogate to the upgrade instructions wherever they are.
Yes, if the chains will have other dependencies, then they will need to use a hack as resented by Osmosis / Dev: https://github.com/cosmos/gaia/blob/0dd70958a10b24703c09c43745611779f0e7970f/app/app.go#L572-L593
No, I will update the documentation and migration guide. Proper change is breaking or requires a hack described above. |
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, pending Changelog
@@ -405,10 +405,19 @@ func (m Manager) RunMigrations(ctx sdk.Context, cfg Configurator, fromVM Version | |||
// and the order of executing migrations matters) | |||
// TODO: make the order user-configurable? | |||
sortedModNames := make([]string, 0, len(m.Modules)) | |||
hasAuth := false | |||
const authModulename = "auth" // using authtypes.ModuleName causes import cycle. |
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.
Can we add a TODO for future scope?
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.
some docs suggestions
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.
docs lgtm too.
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
This is going to make syncing nodes for already upgraded chains much more complicated if they upgrade |
Good point. We didn't thought much about syncing from genesis. We were following the decision / discussion re 0.44.1 release here. |
* fix: always move auth module migration to the end * update migration docs * adding changelog * update docs * review updates * Update CHANGELOG.md Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com> Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Description
This PR targets only
v0.44.x
release. For master we will have #10604Closes: #10606
Fixes: #10591
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change