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

refactor: make Cosmovisor use cobra #11823

Merged
merged 18 commits into from
May 2, 2022
Merged

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Apr 28, 2022

Description

Closes: #11789


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)

@julienrbrt julienrbrt linked an issue Apr 28, 2022 that may be closed by this pull request
4 tasks
@github-actions github-actions bot added the C:Cosmovisor Issues and PR related to Cosmovisor label Apr 28, 2022
@julienrbrt julienrbrt marked this pull request as ready for review April 29, 2022 11:55
cosmovisor/CHANGELOG.md Outdated Show resolved Hide resolved
cosmovisor/cmd/cosmovisor/cmd/help.go Outdated Show resolved Hide resolved
cosmovisor/cmd/cosmovisor/cmd/root.go Outdated Show resolved Hide resolved
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
@julienrbrt julienrbrt requested a review from a team as a code owner April 29, 2022 13:46
},
}

func printVersion(logger *zerolog.Logger, args []string) error {
Copy link
Member

Choose a reason for hiding this comment

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

should we use the logger interface from tendermint to keep consistent with sdk?

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is that interface does not allow us to disable the logger.

Copy link
Member

Choose a reason for hiding this comment

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

you would pass it a noop logger, this is what we use to do in tendermint

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct -- zerolog has a no-op logger.

Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

utACK

@codecov
Copy link

codecov bot commented May 2, 2022

Codecov Report

Merging #11823 (e549c87) into main (c0f65e1) will increase coverage by 0.02%.
The diff coverage is 42.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11823      +/-   ##
==========================================
+ Coverage   66.00%   66.03%   +0.02%     
==========================================
  Files         670      681      +11     
  Lines       70714    71443     +729     
==========================================
+ Hits        46674    47176     +502     
- Misses      21369    21563     +194     
- Partials     2671     2704      +33     
Impacted Files Coverage Δ
cosmovisor/cmd/cosmovisor/main.go 0.00% <0.00%> (ø)
cosmovisor/cmd/cosmovisor/run_config.go 0.00% <ø> (ø)
cosmovisor/logger.go 100.00% <ø> (ø)
cosmovisor/cmd/cosmovisor/version.go 28.88% <28.88%> (ø)
cosmovisor/cmd/cosmovisor/run.go 23.33% <33.33%> (ø)
cosmovisor/cmd/cosmovisor/help.go 100.00% <100.00%> (ø)
crypto/keys/internal/ecdsa/privkey.go 82.45% <0.00%> (-1.76%) ⬇️
cosmovisor/scanner.go 83.00% <0.00%> (ø)
cosmovisor/args.go 84.82% <0.00%> (ø)
... and 6 more

@julienrbrt julienrbrt added the A:automerge Automatically merge PR once all prerequisites pass. label May 2, 2022
@mergify mergify bot merged commit 8076144 into main May 2, 2022
@mergify mergify bot deleted the julien/1789-make-cosmovisor-use-cobra branch May 2, 2022 16:25
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.

Make Cosmovisor use cobra
3 participants