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

chore(app/upgrades): set app version correctly for v11 #2071

Merged
merged 2 commits into from
Jul 18, 2022

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Jul 14, 2022

Related to: #1805

What is the purpose of the change

Although the app version was already set during the v9 upgrade, our v10 was a fork.
As a result, the upgrade handler was not executed to increment the app version.
This change helps to correctly set the app version for v11.

Testing and Verifying

This change can be verified by e2e upgrade tests

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? no
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not applicable

@github-actions github-actions bot added the C:app-wiring Changes to the app folder label Jul 14, 2022
@p0mvn p0mvn marked this pull request as ready for review July 14, 2022 21:12
@p0mvn p0mvn requested a review from a team July 14, 2022 21:12
Comment on lines +23 to +28
// Although the app version was already set during the v9 upgrade, our v10 was a fork.
// As a result, the upgrade handler was not executed to increment the app version.
// This change helps to correctly set the app version for v11.
if err := keepers.UpgradeKeeper.SetAppVersion(ctx, preUpgradeAppVersion); err != nil {
return nil, err
}
Copy link
Member

@ValarDragon ValarDragon Jul 15, 2022

Choose a reason for hiding this comment

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

Do we have to do this manually every upgrade? Or is this just one-off code that we only have to do once? Also why does the API take in pre upgrade version, not post?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we have to do this manually every upgrade?

No, we need to do this now because the last release was a fork.

Also why does the API take in pre upgrade version, not post?

This is because this logic is run before the upgrade handler logic that increases this version by 1

Copy link
Member

@mattverse mattverse left a comment

Choose a reason for hiding this comment

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

utACK

@ValarDragon ValarDragon merged commit 1a99255 into main Jul 18, 2022
@ValarDragon ValarDragon deleted the roman/app-version-upgrade-handler branch July 18, 2022 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:app-wiring Changes to the app folder
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants