-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): automated migration testing
Building on the smoke-test rewrite to use process-compose, let's script the migration process, so that we can test current HEAD of the monorepo against a prior tagged version, and validate that necessary migrations are in place. One possible approach is to fetch prebuilt binaries from uploaded artifacts on Github. That's fine for `pd`, but doesn't work for running the smoke tests, due to client/server incompatibility. Therefore we'll clone the entire repo in a git-ignored subdir, and build the old binaries there. Heavy, but reliable. Updated to use the concise `pd migrate` UX from #4339. Previously, there were missing AuctionParams, resolved by #4338. It's imperative that we use the vote-to-halt mechanism to prepare for the upgrade, otherwise the priv validator state munging will not work. feat: migration-test crate Strictly for running the migration-test suite of integration tests, very similar in nature to the network-integration tests AKA smoke tests. tests. Copy/pastes a lot of code from the smokes, which we can always factor out into reusable utils, but not bothering with that right now.
- Loading branch information
Showing
16 changed files
with
1,405 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
name: Migration test | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
smoke_test: | ||
runs-on: buildjet-16vcpu-ubuntu-2204 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
fetch-tags: true | ||
fetch-depth: 0 | ||
|
||
- name: Load rust cache | ||
uses: astriaorg/[email protected] | ||
with: | ||
# Cache the git worktree for faster builds | ||
workspaces: |- | ||
. | ||
./deployments/worktrees/v0.73.1 | ||
- name: Install cometbft binary | ||
run: ./deployments/scripts/install-cometbft | ||
|
||
- name: Install process-compose | ||
run: >- | ||
sh -c "$(curl --location https://raw.githubusercontent.com/F1bonacc1/process-compose/main/scripts/get-pc.sh)" -- | ||
-d -b ~/bin | ||
- name: Run migration test | ||
run: | | ||
export PATH="$HOME/bin:$PATH" | ||
./deployments/scripts/migration-test v0.73.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
[package] | ||
name = "migration-test" | ||
description = "Integration test runner for evaluating Penumbra upgrades" | ||
authors.workspace = true | ||
edition.workspace = true | ||
version.workspace = true | ||
repository.workspace = true | ||
homepage.workspace = true | ||
license.workspace = true | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[features] | ||
# By default, don't enable migration-tests: require explicit opt-in via | ||
# `--features migration-test`. | ||
default = [] | ||
sct-divergence-check = ["penumbra-view/sct-divergence-check"] | ||
migration-test = ["sct-divergence-check"] | ||
|
||
[dependencies] | ||
anyhow = {workspace = true} | ||
pbjson-types = { workspace = true } | ||
ark-ff = {workspace = true, default-features = false} | ||
async-stream = {workspace = true} | ||
base64 = {workspace = true} | ||
bincode = {workspace = true} | ||
blake2b_simd = {workspace = true} | ||
bytes = {workspace = true} | ||
camino = {workspace = true} | ||
clap = {workspace = true, features = ["derive", "env"]} | ||
colored = "2.1.0" | ||
colored_json = "4.1" | ||
comfy-table = "5" | ||
decaf377 = {workspace = true, default-features = true} | ||
decaf377-rdsa = {workspace = true} | ||
dialoguer = "0.10.4" | ||
time = "0.3" | ||
directories = {workspace = true} | ||
ed25519-consensus = {workspace = true} | ||
futures = {workspace = true} | ||
hex = {workspace = true} | ||
http-body = {workspace = true} | ||
humantime = {workspace = true} | ||
ibc-proto = {workspace = true, default-features = true} | ||
ibc-types = {workspace = true, features = ["std", "with_serde"], default-features = true} | ||
indicatif = {workspace = true} | ||
jmt = {workspace = true} | ||
ndarray = "0.15.6" | ||
once_cell = {workspace = true} | ||
penumbra-app = {workspace = true} | ||
penumbra-asset = {workspace = true, default-features = false} | ||
penumbra-community-pool = {workspace = true, default-features = false} | ||
penumbra-compact-block = {workspace = true, default-features = false} | ||
penumbra-custody = {workspace = true} | ||
penumbra-auction = {workspace = true, default-features = false} | ||
penumbra-dex = {workspace = true, default-features = false} | ||
penumbra-fee = {workspace = true, default-features = false} | ||
penumbra-governance = {workspace = true, default-features = false} | ||
penumbra-ibc = {workspace = true, default-features = false} | ||
penumbra-keys = {workspace = true, default-features = false} | ||
penumbra-num = {workspace = true, default-features = false} | ||
penumbra-proof-setup = {workspace = true} | ||
penumbra-proto = {workspace = true, features = ["rpc", "box-grpc"], default-features = true} | ||
penumbra-sct = {workspace = true, default-features = false} | ||
penumbra-shielded-pool = {workspace = true, default-features = false} | ||
penumbra-stake = {workspace = true, default-features = false} | ||
penumbra-tct = {workspace = true, default-features = true} | ||
penumbra-transaction = {workspace = true, default-features = true} | ||
penumbra-view = {workspace = true} | ||
penumbra-wallet = { path = "../../wallet" } | ||
pin-project = {workspace = true} | ||
rand = {workspace = true} | ||
rand_chacha = {workspace = true} | ||
rand_core = {workspace = true, features = ["getrandom"]} | ||
regex = {workspace = true} | ||
rpassword = "7" | ||
serde = {workspace = true, features = ["derive"]} | ||
serde_json = {workspace = true} | ||
serde_with = {workspace = true, features = ["hex"]} | ||
sha2 = {workspace = true} | ||
simple-base64 = "0.23" | ||
tendermint = {workspace = true, features = ["rust-crypto"], default-features = true} | ||
tokio = {workspace = true, features = ["full"]} | ||
tokio-stream = {workspace = true} | ||
tokio-util = {workspace = true} | ||
toml = {workspace = true, features = ["preserve_order"]} | ||
tonic = {workspace = true, features = ["tls-webpki-roots", "tls"]} | ||
tower = {workspace = true, features = ["full"]} | ||
termion = {workspace = true} | ||
tracing = {workspace = true} | ||
tracing-subscriber = {workspace = true, features = ["env-filter", "ansi"]} | ||
url = {workspace = true, features = ["serde"]} | ||
|
||
[dev-dependencies] | ||
assert_cmd = {workspace = true} | ||
penumbra-governance = {workspace = true, default-features = false} | ||
predicates = "2.1" | ||
regex = {workspace = true} | ||
tempfile = {workspace = true} | ||
|
||
[dev-dependencies.penumbra-proof-params] | ||
default-features = true | ||
workspace = true | ||
features = [ | ||
"bundled-proving-keys", | ||
"download-proving-keys", | ||
] |
Oops, something went wrong.