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

feat: add migration logs #11100

Closed
wants to merge 1 commit into from
Closed

Conversation

yaruwangway
Copy link
Contributor

@yaruwangway yaruwangway commented Feb 2, 2022

Description

Closes: #11048

Next Gaia release will use cosmos-sdk 0.45, during the cosmoshub upgrade, it is helpful if validator can see the migration logs, so that validators can confirm that the upgrade is still in process.

we can make a backport release of v0.45.1 ?


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...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

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...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@yaruwangway yaruwangway marked this pull request as ready for review February 2, 2022 17:31
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

lgtm, left one suggestion.

Comment on lines +460 to +461
ctx.Logger().Info(fmt.Sprintf("Running migration for module: %s, InitGenesis (on default genesis) toVersion %d",
moduleName, toVersion))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not using key vals ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ctx.Logger().Info(fmt.Sprintf("Running migration for module: %s, InitGenesis (on default genesis) toVersion %d",
moduleName, toVersion))
ctx.Logger().Info(fmt.Sprintf("Adding new module and initializing default genesis",
"module", moduleName, "target_version", toVersion))

Copy link
Member

Choose a reason for hiding this comment

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

I think running migration makes more sense here. In most cases its a migration and not an add. Maybe we can say Running/Adding but it would be confusing.

@robert-zaremba robert-zaremba self-assigned this Feb 2, 2022
@robert-zaremba robert-zaremba changed the title add migration logs feat: add migration logs Feb 2, 2022
@amaury1093
Copy link
Contributor

Q: why aren't we creating this on master and backporting?

@yaruwangway yaruwangway changed the base branch from release/v0.45.x to master February 3, 2022 11:00
@tac0turtle
Copy link
Member

its already there #10768

@tac0turtle tac0turtle changed the base branch from master to release/v0.45.x February 3, 2022 12:18
@tac0turtle
Copy link
Member

closing this in favour of #11107. Please use the backport functionality in the future. its easier to track if its on master and easier for you as well

@tac0turtle tac0turtle closed this Feb 3, 2022
@yaruwangway
Copy link
Contributor Author

yaruwangway commented Feb 3, 2022

its already there #10768

cool! we just need a backport for gaia next release, I think I based off wrong brach (just get to know how sdk backport from amaurym ). thank you!

@tac0turtle tac0turtle deleted the yaru/add-migration-logs branch March 25, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logs when an on-fly migration is performing
4 participants