-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Support for pre-upgrade command in Cosmovisor #9973
Comments
solution1: #9692 (comment) |
Alternative DesignInstead of setting the upgrade process fully in the
This is how the the PreUpgradeInstructions can look like:
NOTE: we use a concrete type instead of This solution will solve other use-cases where we will need more advanced upgrade scenarios (eg moving files or downloading external libraries). We can implement it in phases - and only start with I was presenting this solution during the Cosmovisor WG call last Friday and got ack as a superior then the "basic" one proposed originally. CAVEAT: if we agree to use this proposal as the solution for #9894 then we will need to include a small update in the upcoming v0.44 security release to enable the @marbar3778 , @alexanderbez , @alessio -- looking for your feedback so we can quickly push it and combine with the v0.44 if we agree so. |
Another way of handling it would be to overload the existing |
Important note: it seams we can change the |
@jgimeno , @spoo-bar , @tychoish , @alexanderbez -- here is the draft implementation: #10032 |
The approach @robert-zaremba outlined seems like a good approach. |
Now that #10032 also allows for post upgrade scripts, maybe the same exit status codes could be used for post-upgrade also?
But regarding |
ACK, I believe we can keep |
@anilcse - to some extend. The idea is that we firstly download the script (if download is not empty) and then we execute it. We don't want to put an ugly and long script in the |
Understood, that sounds good 👍 |
@robert-zaremba Any ideas on how cosmovisor should handle errors by post upgrade scripts? |
Decision for the v0.44 release.Since the Alternative Design (solution 2) requires a small proto update (extending the x/upgrade
The advantages of the solution-2 is that:
|
@spoo-bar - let's don't do post upgrade in this PR / issue. I suggest to continue the design discussion in #10047 Also for the future communication, we need to agree, if we want to present the outlined solution from this PR ( |
What makes this design superior to the "basic"? Instead of a sketched design, I'd appreciate it if you could provide the following:
Thanks! |
Here is a discussion for the next cosmovisor improvements: #9928 We didn't deprecate the Acceptance criteria for the suggested Plan upgrade is:
We were discussing it during the WG session: https://hackmd.io/jeYE8fwDTlCdFhMYUW9mpQ Hope this clarifies your confusions. |
<!-- The default pull request template is for types feat, fix, or refactor. For other templates, add one of the following parameters to the url: - template=docs.md - template=other.md --> ## Description Ref: #9973, #10056 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> * Skipping backup when skipping upgrade at specified height * adding env var `PREUPGRADE_MAX_RETRIES` which specifies the limit on how many times to retry preupgrade on error code `31` --- ### 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/master/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/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/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)
Ref:
app.toml
#9692As described in #9692 (comment):
The text was updated successfully, but these errors were encountered: