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

fix: cosmovisor go install and upgrade path case sensitiveness #12918

Merged
merged 7 commits into from
Aug 15, 2022

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Aug 13, 2022

Description

OK for pre-review, I still need to upgrade goreleaser.yml.


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)

@github-actions github-actions bot added the C:Cosmovisor Issues and PR related to Cosmovisor label Aug 13, 2022
@codecov
Copy link

codecov bot commented Aug 13, 2022

Codecov Report

Merging #12918 (157b856) into main (4fe7797) will increase coverage by 0.21%.
The diff coverage is 53.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12918      +/-   ##
==========================================
+ Coverage   55.87%   56.09%   +0.21%     
==========================================
  Files         646      658      +12     
  Lines       54895    55754     +859     
==========================================
+ Hits        30675    31275     +600     
- Misses      21762    21982     +220     
- Partials     2458     2497      +39     
Impacted Files Coverage Δ
cosmovisor/scanner.go 81.63% <ø> (ø)
types/dec_coin.go 98.41% <50.00%> (-0.79%) ⬇️
cosmovisor/cmd/cosmovisor/version.go 32.00% <57.14%> (ø)
cosmovisor/cmd/cosmovisor/help.go 100.00% <0.00%> (ø)
cosmovisor/process.go 51.31% <0.00%> (ø)
cosmovisor/logger.go 100.00% <0.00%> (ø)
cosmovisor/errors/multi.go 75.00% <0.00%> (ø)
cosmovisor/cmd/cosmovisor/run.go 23.33% <0.00%> (ø)
... and 5 more

@julienrbrt julienrbrt marked this pull request as ready for review August 13, 2022 22:27
@julienrbrt julienrbrt requested a review from a team as a code owner August 13, 2022 22:27
@@ -158,9 +158,5 @@ func parseUpgradeInfoFile(filename string) (upgradetypes.Plan, error) {
return upgradetypes.Plan{}, fmt.Errorf("invalid upgrade-info.json content; name and height must be not empty; got: %v", ui)
}

// Normalize name to prevent operator error in upgrade name case sensitivity
// errors.
ui.Name = strings.ToLower(ui.Name)
Copy link
Member Author

Choose a reason for hiding this comment

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

This was added in #11608, but I believe only the EqualFold addition was necessary. Otherwise, we get #12915 bug.

Choose a reason for hiding this comment

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

So was not a bug, only not documented.

Copy link
Member Author

Choose a reason for hiding this comment

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

@alexanderbez should I revert that change and add docs?

Copy link
Contributor

Choose a reason for hiding this comment

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

@julienrbrt yes pls.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure!

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in #12921

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

utACK

@alexanderbez alexanderbez merged commit 6f6e7e9 into main Aug 15, 2022
@alexanderbez alexanderbez deleted the julien/fix-cosmovisor branch August 15, 2022 02:18
mergify bot pushed a commit that referenced this pull request Aug 20, 2022
## Description

Follow-up of #12918

- Add documentation for normalized upgrade name path.
- Update goreleaser as version is got at 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) 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)
@RaulBernal
Copy link

Thanks guys 👏 👏

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
Projects
None yet
4 participants