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

allow configuring full preupgrade version name (backport #2108) #2113

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion protocol/testing/containertest/containertest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ download_preupgrade_binary() {
exit 1
;;
esac
tar_url="https://github.com/dydxprotocol/v4-chain/releases/download/protocol%2F$PREUPGRADE_VERSION/dydxprotocold-$PREUPGRADE_VERSION-linux-$url_arch.tar.gz"
tar_url="https://github.com/dydxprotocol/v4-chain/releases/download/protocol%2F$PREUPGRADE_VERSION_FULL_NAME/dydxprotocold-$PREUPGRADE_VERSION_FULL_NAME-linux-$url_arch.tar.gz"
tar_path='/tmp/dydxprotocold/dydxprotocold.tar.gz'
mkdir -p /tmp/dydxprotocold
curl -vL $tar_url -o $tar_path
Expand Down
6 changes: 5 additions & 1 deletion protocol/testing/version/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
This directory contains files to configure version names used for upgrade tests and internal nodes. These versions are used for things such as upgrade proposals and cosmovisor directory names. When updating tests and images for a new version, most of the time you just need to change the `VERSION_CURRENT` and `VERSION_PREUPGRADE` files.
This directory contains files to configure version names used for upgrade tests and internal nodes. These versions are used for things such as upgrade proposals and cosmovisor directory names. When updating tests and images for a new version, most of the time you just need to change the `VERSION_CURRENT`, `VERSION_PREUPGRADE`, and `VERSION_FULL_NAME_PREUPGRADE` files.

`VERSION_CURRENT` is the upgrade name for the current version. e.g. v6.0.0 is the upgrade name for v6.0.0, v6.0.1, v6.0.0-rc0, etc.
`VERSION_PREUPGRADE` is the upgrade name for the preupgrade version. e.g. v6.0.0 is the upgrade name for v6.0.0, v6.0.1, v6.0.0-rc0, etc.
`VERSION_FULL_NAME_PREUPGRADE` is the fully qualified preupgrade version name. This is used in the download url. e.g. v6.0.0-rc0.
1 change: 1 addition & 0 deletions protocol/testing/version/VERSION_FULL_NAME_PREUPGRADE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v5.2.2
3 changes: 2 additions & 1 deletion protocol/testing/version/version.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
CURRENT_VERSION=$(<VERSION_CURRENT)
PREUPGRADE_VERSION=$(<VERSION_PREUPGRADE)
PREUPGRADE_VERSION_FULL_NAME=$(<VERSION_FULL_NAME_PREUPGRADE)

# Define the mapping from version to amd64 URL
declare -A version_to_url
version_to_url["$PREUPGRADE_VERSION"]="https://github.com/dydxprotocol/v4-chain/releases/download/protocol%2F$PREUPGRADE_VERSION/dydxprotocold-$PREUPGRADE_VERSION-linux-amd64.tar.gz"
version_to_url["$PREUPGRADE_VERSION"]="https://github.com/dydxprotocol/v4-chain/releases/download/protocol%2F$PREUPGRADE_VERSION_FULL_NAME/dydxprotocold-$PREUPGRADE_VERSION_FULL_NAME-linux-amd64.tar.gz"
Loading