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

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

Open
freak12techno opened this issue Sep 14, 2024 · 6 comments · May be fixed by #21932
Open

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

freak12techno opened this issue Sep 14, 2024 · 6 comments · May be fixed by #21932
Assignees
Labels
C:Cosmovisor Issues and PR related to Cosmovisor good first issue T:feature-request

Comments

@freak12techno
Copy link
Contributor

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.

@julienrbrt
Copy link
Member

As it's a very very small feature that doesn't add any maintenance burden, I'd say why not. A bit overkilled but it's almost a one liner for cosmovisor.

@julienrbrt julienrbrt added good first issue C:Cosmovisor Issues and PR related to Cosmovisor labels Sep 14, 2024
@julienrbrt
Copy link
Member

It's a great (starting) issue for someone in the community willing to contribute to the SDK.

@Teyz
Copy link

Teyz commented Sep 16, 2024

Can I take this issue?

@julienrbrt
Copy link
Member

Can I take this issue?

Yes, sure! Thank you

@Teyz
Copy link

Teyz commented Sep 25, 2024

I don't have permissions to create a new branch and push it :/
@julienrbrt

@julienrbrt
Copy link
Member

I don't have permissions to create a new branch and push it :/
@julienrbrt

Hey you should fork the repo and submit a PR

Teyz pushed a commit to Teyz/cosmos-sdk that referenced this issue Sep 25, 2024
@julienrbrt julienrbrt linked a pull request Sep 26, 2024 that will close this issue
12 tasks
Teyz added a commit to Teyz/cosmos-sdk that referenced this issue Sep 26, 2024
Teyz pushed a commit to Teyz/cosmos-sdk that referenced this issue Sep 26, 2024
Teyz added a commit to Teyz/cosmos-sdk that referenced this issue Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Cosmovisor Issues and PR related to Cosmovisor good first issue T:feature-request
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

3 participants