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: Adding cosmovisor version command #10103

Merged
merged 35 commits into from
Sep 21, 2021

Conversation

spoo-bar
Copy link
Contributor

@spoo-bar spoo-bar commented Sep 9, 2021

Description

Closes: #9999

  • Adding custom version command for cosmovisor binary version
  • Read and returns Version from the cosmovisor binary which should be set during build

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)

@orijbot
Copy link

orijbot commented Sep 9, 2021

@github-actions github-actions bot added the C:Cosmovisor Issues and PR related to Cosmovisor label Sep 9, 2021
Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

cosmovisor by default pipes everything to the binary being managed. So for version, I think we should call the binary and then append the version. i.e.:

v1.1.0-alpha2-1-g81f1347e // from the binary being managed
Cosmovisor Version: v1.0

@spoo-bar spoo-bar self-assigned this Sep 13, 2021
@robert-zaremba
Copy link
Collaborator

robert-zaremba commented Sep 13, 2021

@spoo-bar - during the last call we learned that cosmovisor should be just a wrapper for an appd, so I think we should not use corba. See more details in this comment: #9999 (comment)

CC: @jgimeno

@robert-zaremba
Copy link
Collaborator

In the cosmovisor/Makefile we can use the following command to extract the binary version:

git describe --always --match "cosmovisor/v*"

cosmovisor/CHANGELOG.md Outdated Show resolved Hide resolved
cosmovisor/cmd/cosmovisor/cmd/version.go Outdated Show resolved Hide resolved
@spoo-bar spoo-bar marked this pull request as ready for review September 14, 2021 09:05
@spoo-bar spoo-bar requested a review from jgimeno September 14, 2021 14:23
cosmovisor/README.md Outdated Show resolved Hide resolved
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.

pre approving. Let's validate if we want to put the cosmovisor version before the SDK version.

cosmovisor/cmd/cosmovisor/cmd/version.go Outdated Show resolved Hide resolved
cosmovisor/README.md Show resolved Hide resolved
@barriebyron barriebyron self-requested a review September 16, 2021 16:27
Copy link
Contributor

@barriebyron barriebyron left a comment

Choose a reason for hiding this comment

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

just a few minor editorial suggestions, lgtm for all of the words

cosmovisor/CHANGELOG.md Outdated Show resolved Hide resolved
cosmovisor/README.md Outdated Show resolved Hide resolved
cosmovisor/README.md Outdated Show resolved Hide resolved
@tac0turtle tac0turtle added the A:automerge Automatically merge PR once all prerequisites pass. label Sep 21, 2021
@codecov
Copy link

codecov bot commented Sep 21, 2021

Codecov Report

Merging #10103 (ad903e1) into master (94377f1) will increase coverage by 0.00%.
The diff coverage is n/a.

❗ Current head ad903e1 differs from pull request most recent head b1e876d. Consider uploading reports for the commit b1e876d to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10103   +/-   ##
=======================================
  Coverage   63.72%   63.72%           
=======================================
  Files         573      573           
  Lines       53766    53766           
=======================================
+ Hits        34263    34264    +1     
+ Misses      17555    17554    -1     
  Partials     1948     1948           
Impacted Files Coverage Δ
crypto/keys/internal/ecdsa/privkey.go 84.21% <0.00%> (+1.75%) ⬆️

@mergify mergify bot merged commit 2dd4872 into master Sep 21, 2021
@mergify mergify bot deleted the spoorthi/9999-cosmovisor-version-cmd branch September 21, 2021 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:Cosmovisor Issues and PR related to Cosmovisor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create cosmovisor version command
8 participants