-
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
refactor: move baseapp/AppVersionModifer -> core/app #20361
Conversation
Warning Rate Limit Exceeded@kocubinski has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 2 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe recent changes entail reorganizing the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (5)
- baseapp/params.go (1 hunks)
- core/app/app.go (2 hunks)
- runtime/module.go (2 hunks)
- x/upgrade/depinject.go (3 hunks)
- x/upgrade/exported/exported.go (1 hunks)
Files skipped from review due to trivial changes (1)
- baseapp/params.go
Additional Context Used
Path-based Instructions (4)
x/upgrade/exported/exported.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.core/app/app.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.x/upgrade/depinject.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.runtime/module.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (7)
x/upgrade/exported/exported.go (2)
4-4
: The updated import path correctly reflects the new location ofAppVersionModifier
.
11-11
: The type declaration is updated to use the newAppVersionModifier
fromcore/app
, aligning with the relocation changes.core/app/app.go (1)
69-76
: The definition ofAppVersionModifier
interface with methods for setting and getting the app version is correctly implemented and aligns with the intended functionality.x/upgrade/depinject.go (2)
4-4
: The import ofcore/app
is correctly added to reflect the new location ofAppVersionModifier
.
42-42
: The update inModuleInputs
struct to use the newAppVersionModifier
fromcore/app
is correctly implemented.runtime/module.go (2)
4-4
: The import ofcore/app
is correctly added to reflect the new location ofAppVersionModifier
.
285-285
: The functionProvideAppVersionModifier
correctly provides an instance ofAppVersionModifier
, aligning with the changes made in the relocation of the interface.
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.
Actionable comments posted: 1
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- CHANGELOG.md (1 hunks)
Additional Context Used
Path-based Instructions (1)
CHANGELOG.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…smos-sdk into kocu/app-version-modifier-core
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.
Actionable comments posted: 0
Out of diff range and nitpick comments (3)
CHANGELOG.md (3)
120-120
: Consider specifying the exact new location ofAppVersionModifier
in the changelog for clarity.
120-120
: Clarify how the new argument inSimulateFromSeed
affects existing implementations to help users adapt their code.
120-120
: It would be beneficial to include information about the impact of removingAddress.String()
and any alternative methods provided.
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (2)
- CHANGELOG.md (1 hunks)
- x/upgrade/depinject.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/upgrade/depinject.go
Additional Context Used
Path-based Instructions (1)
CHANGELOG.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
Additional comments not posted (1)
CHANGELOG.md (1)
120-120
: This entry clearly describes the change in the function signature. Well documented.
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.
nits + questions
CHANGELOG.md
Outdated
@@ -117,6 +117,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i | |||
|
|||
### API Breaking Changes | |||
|
|||
* (baseapp) [#20361](https://github.com/cosmos/cosmos-sdk/pull/20361) `AppVersionModifier` moved to `core`. |
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.
it was never released but introduced in #16244, so I don't think we need this.
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.
In that case I may also rename to not include the package name app
-> VersionModifier
x/upgrade/exported/exported.go
Outdated
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.
importing core is fine, why do we need this type alias
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.
Good point, it was an unthinking refactor
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.
Actionable comments posted: 1
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (4)
- core/app/app.go (2 hunks)
- runtime/module.go (2 hunks)
- x/upgrade/depinject.go (2 hunks)
- x/upgrade/keeper/keeper.go (3 hunks)
Files skipped from review as they are similar to previous changes (3)
- core/app/app.go
- runtime/module.go
- x/upgrade/depinject.go
Additional Context Used
Path-based Instructions (1)
x/upgrade/keeper/keeper.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (1)
x/upgrade/keeper/keeper.go (1)
17-17
: The updated import path aligns with the new location ofAppVersionModifier
. Good job on maintaining consistency.
@@ -36,7 +36,7 @@ type Keeper struct { | |||
skipUpgradeHeights map[int64]bool // map of heights to skip for an upgrade | |||
cdc codec.BinaryCodec // App-wide binary codec | |||
upgradeHandlers map[string]types.UpgradeHandler // map of plan name to upgrade handler | |||
versionModifier xp.AppVersionModifier // implements setting the protocol version field on BaseApp | |||
versionModifier app.VersionModifier // implements setting the protocol version field on 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.
Tip
Codebase Verification
The type change for versionModifier
to app.VersionModifier
in the Keeper
struct was noted as correctly updated. However, there is still a reference to the old type xp.AppVersionModifier
in the codebase:
x/upgrade/keeper/keeper.go
: The old type is still referenced.
Please ensure that all references to this type are updated accordingly to maintain consistency and avoid potential runtime errors.
Analysis chain
The type change for versionModifier
is correctly updated to app.VersionModifier
. Ensure all references to this type across the codebase are updated accordingly.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify all references to `AppVersionModifier` have been updated to `app.VersionModifier`.
# Test: Search for the old type usage. Expect: No occurrences of the old type.
rg --type go $'xp.AppVersionModifier'
Length of output: 90
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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- runtime/module.go (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- runtime/module.go
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. like julien said we can remove the changelog as well. I think there is a cleaner way we can do this as well. something like upgrade sets it on consensus instead of having to go through BaseApp, but that's orthogonal to this pr
Description
Moves
AppVesrsionModifer
to core so that #20320 is not required to import baseapp.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...
!
in 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...
Summary by CodeRabbit