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

[WIP] Scheduled try-state checks and alerting #1938

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1c491dd
use prebuilt try-runtime binary
liamaharon Oct 17, 2023
5001b0f
try fix path
liamaharon Oct 17, 2023
49df553
upgrade glibc
liamaharon Oct 17, 2023
567e899
remove glibc
liamaharon Oct 17, 2023
6b6f3d4
use musl binary
liamaharon Oct 18, 2023
a1c0e49
Merge branch 'master' into liam-use-prebuilt-try-runtime-cli-binary
liamaharon Oct 18, 2023
623e796
wip try state workflow
liamaharon Oct 18, 2023
29a4461
check all chains
liamaharon Oct 18, 2023
e06bfc2
try release build
liamaharon Oct 18, 2023
e1deb86
fix typos
liamaharon Oct 19, 2023
3bfc961
wip use runtime artefact
liamaharon Oct 23, 2023
bbbc5cf
wip only build westend
liamaharon Oct 23, 2023
6082d36
Merge branch 'master' of github.com:paritytech/polkadot-sdk into liam…
liamaharon Oct 30, 2023
b4028da
use pre-built runtime artefacts
liamaharon Oct 30, 2023
e476e29
surround with double quotes
liamaharon Oct 30, 2023
c8952dd
debug
liamaharon Oct 30, 2023
6b27f9c
fix version
liamaharon Oct 30, 2023
f516d17
try fix name
liamaharon Oct 30, 2023
db16447
fix typo
liamaharon Oct 30, 2023
dc7f945
use latest try-runtime
liamaharon Oct 30, 2023
42f6a8b
test matrix message
liamaharon Oct 30, 2023
dee649e
matrix room test
liamaharon Oct 30, 2023
fdbba06
move matrix room id to env var
liamaharon Oct 30, 2023
696480e
use bot secret
liamaharon Nov 8, 2023
a77739b
set up matrix alert
liamaharon Nov 8, 2023
53b4a47
fix id
liamaharon Nov 8, 2023
94e1f5e
Merge branch 'master' into liam-try-state-scheduled-checks
liamaharon Nov 8, 2023
3a53120
Merge branch 'master' into liam-try-state-scheduled-checks
liamaharon Nov 9, 2023
ff15f18
Use try-runtime v0.4.0
liamaharon Nov 10, 2023
486bb0b
Merge branch 'master' into liam-try-state-scheduled-checks
liamaharon Nov 10, 2023
05e7ae1
Merge branch 'master' into liam-try-state-scheduled-checks
liamaharon Nov 15, 2023
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
100 changes: 100 additions & 0 deletions .github/workflows/try-state.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Runs `try-state` on all live runtimes in `polkadot-sdk`
# TODO: Post to a Matrix channel if any fails.

name: Check try-state
on:
push:
branches:
- liam-try-state-scheduled-checks
schedule:
- cron: "0 * * * *"

jobs:
check_try_state:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

liamaharon marked this conversation as resolved.
Show resolved Hide resolved
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: "3.6.1"

- name: Add wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown

- name: Download and set up try-runtime binary
run: |
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x try-runtime

# TODO: Build all runtimes

- name: Build Runtimes
run: |
cargo build --release --features try-runtime \
-p westend-runtime \
-p rococo-runtime \
-p asset-hub-westend-runtime \
-p bridge-hub-rococo-runtime \
-p contracts-rococo-runtime

- name: Check Westend
run: |
./try-runtime \
--runtime ./target/release/wbuild/westend-runtime/westend_runtime.compact.wasm \
execute-block \
live --uri wss://westend-try-runtime-node.parity-chains.parity.io:443
continue-on-error: true
id: westend_run

- name: Check Rococo
run: |
./try-runtime \
--runtime ./target/release/wbuild/rococo-runtime/rococo_runtime.compact.wasm \
execute-block \
live --uri wss://rococo-try-runtime-node.parity-chains.parity.io:443
continue-on-error: true
id: rococo_run

- name: Check Asset Hub Westend
run: |
./try-runtime \
--runtime ./target/release/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.compact.wasm \
execute-block \
live --uri wss://westend-asset-hub-rpc.polkadot.io:443
continue-on-error: true
id: asset_hub_westend_run

- name: Check Bridge Hub Rococo
run: |
./try-runtime \
--runtime ./target/release/wbuild/bridge-hub-rococo-runtime/bridge_hub_rococo_runtime.compact.wasm \
execute-block \
live --uri wss://rococo-bridge-hub-rpc.polkadot.io:443
continue-on-error: true
id: brdige_hub_rococo_run

- name: Check Contracts Rococo
run: |
./try-runtime \
--runtime ./target/release/wbuild/contracts-rococo/contracts_rococo_runtime.compact.wasm \
execute-block \
live --uri wss://rococo-contracts-rpc.polkadot.io:443
continue-on-error: true
id: contracts_rococo_run

# TODO: Check all runtimes

# TODO: Post to Matrix if any fails
# - name: Notify Matrix on Failure
# if: steps.westend_run.outcome == 'failure'
# ...
10 changes: 7 additions & 3 deletions .gitlab/pipeline/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,16 @@ test-rust-feature-propagation:
script:
- |
export RUST_LOG=remote-ext=debug,runtime=debug
echo "---------- Installing try-runtime-cli ----------"
time cargo install --locked --git https://github.com/paritytech/try-runtime-cli --tag v0.3.0

echo "---------- Downloading try-runtime CLI ----------"
curl -sL https://github.com/paritytech/try-runtime-cli/releases/download/v0.3.3/try-runtime-x86_64-unknown-linux-musl -o try-runtime
chmod +x ./try-runtime

echo "---------- Building ${PACKAGE} runtime ----------"
time cargo build --release --locked -p "$PACKAGE" --features try-runtime

echo "---------- Executing `on-runtime-upgrade` for ${NETWORK} ----------"
time try-runtime \
time ./try-runtime \
--runtime ./target/release/wbuild/"$PACKAGE"/"$WASM" \
on-runtime-upgrade --checks=pre-and-post ${EXTRA_ARGS} live --uri ${URI}

Expand Down
Loading