-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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!: migrate x/upgrade
to use app wiring
#12312
Conversation
677a48d
to
614be15
Compare
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.
Generally LGTM. Pre-approving
|
||
/**** Module Options ****/ | ||
|
||
// Sets the version setter for the upgrade module | ||
app.UpgradeKeeper.SetVersionSetter(app.BaseApp) |
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.
We should find a way to handle this. If we don't do it now, can you add a follow-up in #12298 ?
One way that could work at least for this version of baseapp is:
func provideVersionSetting(k upgrade.Keeper) runtime.BaseAppOption {
return func(b *BaseApp) { k.SetVersionSetter(b) }
}
In the future, we should probably find a way to inject the App
itself into the container and then x/upgrade can try to resolve the ProtocolVersionSetter
interface and that will automatically resolve to the App
instance. In order for that to work, however, we will need to have the server interacting with depinject and providing a DB instance into the container which in turn constructs BaseApp. Or we have a setter on BaseApp to inject the DB, etc.
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.
Alright, I will do that in a next PR. I am reverting as well the integration tests as it is taking too long for me to fix, in order to unblock #12270.
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.
See #12400
Codecov Report
@@ Coverage Diff @@
## main #12312 +/- ##
==========================================
+ Coverage 66.13% 66.15% +0.02%
==========================================
Files 675 675
Lines 71262 71287 +25
==========================================
+ Hits 47128 47163 +35
+ Misses 21493 21483 -10
Partials 2641 2641
|
Description
Closes: #12298
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