Skip to content

feat: verbose logging during upgrades (backport #24720) #24747

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

Open
wants to merge 4 commits into
base: release/v0.53.x
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 13, 2025

Description

Closes: #22522

This PR addresses the need for more verbose logging during upgrades by

  • adding the VerboseModeLogger extension interface and VerboseLevel option to log package
  • enabling verbose mode logging during upgrades in x/upgrade
  • adding log messages when each module is upgrade in the module manager
  • adding a verbose_log_level flag to the server for configuring the verbose log level (defaults to debug even though the issue states info because the default log_level is already info)

There is an e2e upgrade test that verifies that this works. In addition, I have manually verified (by modifying --log_level and --verbose_log_level in these tests) that:

  • --verbose_log_level can be set from the CLI
  • verbose log levels also override filter options set with --log_level

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. Your PR will not be merged unless you satisfy
all of these items.

I have...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:

  • confirmed ! in 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

  • reviewed "Files changed" and left comments if necessary

  • included the necessary unit and integration tests

  • added a changelog entry to CHANGELOG.md

  • updated the relevant documentation or specification, including comments for documenting Go code

  • confirmed all CI checks have passed

Summary by CodeRabbit

  • New Features

    • Added a configurable verbose log level flag for operations requiring increased logging detail, such as upgrades.
    • Introduced support for toggling verbose logging mode during sensitive operations, providing more detailed logs when enabled.
  • Improvements

    • Logging mode now automatically switches to verbose during upgrade handler execution for enhanced traceability.
    • Informational log messages are now emitted when module migrations are running.
  • Bug Fixes

    • None.
  • Documentation

    • Updated changelogs to reflect the addition of verbose logging features and improvements.
  • Tests

    • Added tests to verify logging behavior when verbose mode is toggled on and off.

This is an automatic backport of pull request #24720 done by [Mergify](https://mergify.com).

Co-authored-by: Alex | Interchain Labs <[email protected]>
(cherry picked from commit be955ef)

# Conflicts:
#	CHANGELOG.md
#	systemtests/go.mod
#	tests/go.mod
#	x/upgrade/CHANGELOG.md
Copy link
Contributor Author

mergify bot commented May 13, 2025

Cherry-pick of be955ef has failed:

On branch mergify/bp/release/v0.53.x/pr-24720
Your branch is up to date with 'origin/release/v0.53.x'.

You are currently cherry-picking commit be955efe2.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   client/flags/flags.go
	modified:   go.mod
	modified:   go.sum
	modified:   log/CHANGELOG.md
	modified:   log/level_test.go
	modified:   log/logger.go
	modified:   log/options.go
	new file:   log/with_test.go
	modified:   log/writer.go
	modified:   server/cmd/execute.go
	modified:   server/util.go
	new file:   server/verbose_level_test.go
	modified:   simapp/go.mod
	modified:   simapp/go.sum
	modified:   simapp/upgrades.go
	modified:   systemtests/go.sum
	modified:   systemtests/system.go
	modified:   tests/go.sum
	modified:   tests/systemtests/go.mod
	modified:   tests/systemtests/go.sum
	modified:   tests/systemtests/upgrade_test.go
	modified:   types/module/module.go
	modified:   x/upgrade/keeper/keeper.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   systemtests/go.mod
	both modified:   tests/go.mod
	both modified:   x/upgrade/CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Copy link

ironbird-prod bot commented May 13, 2025

Ironbird - launch a network To use Ironbird, you can use the following commands:
  • /ironbird start OR /ironbird start --load-test-config= - Launch a testnet with the specified chain and load test configuration.
  • /ironbird chains - List of chain images that ironbird can use to spin-up testnet
  • /ironbird loadtests - List of load test modes that ironbird can run against testnet
Custom Load Test Configuration You can provide a custom load test configuration using the `--load-test-config=` flag:
/ironbird start cosmos --load-test-config={
  "block_gas_limit_target": 0.75,
  "num_of_blocks": 50,
  "msgs": [
    {"weight": 0.3, "type": "MsgSend"},
    {"weight": 0.3, "type": "MsgMultiSend"},
	{"weight": 0.4, "type": "MsgArr", "ContainedType": "MsgSend", "NumMsgs": 3300}
  ]
}

Use /ironbird loadtests to see more examples.

@github-actions github-actions bot added C:Simulations C:Store C:x/evidence C:x/feegrant C:Cosmovisor Issues and PR related to Cosmovisor C:x/nft C:Confix Issues and PR related to Confix C:x/circuit and removed C:log labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant