Skip to content

[Feature]: Cosmovisor: add a command to show current upgrade-info #21726

Closed

Description

Summary

Would be nice to have a command that shows the content of the current upgrade-info.json.

Problem Definition

Okay so I am maintaining this exporter: https://github.com/QuokkaStake/cosmos-node-exporter, and I want to read the upgrade-info.json, to expose it in case there's an upcoming non-governance upgrade that was added via add-upgrade --upgrade-height.
Problem is, in the app I do not want to hardcode the ~/.appd/data/upgrade-info.json, as it might change and also because I do not want to deal with how Cosmovisor is working internally.
So it'd be nice to have a command that reads this file and dumps its content into stdout, and keep it backwards-compatible, so in case the internal structure would change, I can still call the same command and it'd return the same output.

Proposed Feature

Add a Cosmovisor subcommand (like show-upgrade-info) that does the following:

  1. reads the current upgrade-info.json, if it's present
  2. puts it into stdout
  3. if it doesn't exist, either panic or just display that the upgrade does not exist.

Also, feel free to assign me to this, sounds like something extra easy to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

  • Status

    🥳 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions