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
Changes from 27 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
62 changes: 62 additions & 0 deletions .github/workflows/try-state.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Runs `try-state` on all live runtimes in `polkadot-sdk`

name: Check try-state
on:
push:
branches:
- liam-try-state-scheduled-checks
schedule:
# run once per day at midnight
- cron: "0 0 * * *"

env:
# TODO: Replace this with paritytech/polkadot-sdk 'latest' release URL once 1.3.0 is published
Copy link
Member

Choose a reason for hiding this comment

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

Can do now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1.3.0 did not include the Github workflow that builds the runtimes so we need to wait 1 more release for that to happen automatically, but I'm inclined to upload the debug builds there manually so we can use it.

# with all runtime blobs.
RUNTIME_BASE_URL: https://github.com/liamaharon/polkadot-sdk/releases/download/polkadot-v1.2.0-with-runtime-builds-fixed.3
MATRIX_ROOM_ID: "!nbOkFmINBdBqqrfQYH:parity.io"

jobs:
check_try_state:
strategy:
matrix:
runtime:
- { name: westend, file_name: DEV_DEBUG_BUILD__westend_runtime.compact.compressed.wasm, rpc: "wss://westend-try-runtime-node.parity-chains.parity.io:443" }
- { name: rococo, file_name: DEV_DEBUG_BUILD__rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-try-runtime-node.parity-chains.parity.io:443" }
- { name: westend_asset_hub, file_name: DEV_DEBUG_BUILD__asset_hub_westend_runtime.compact.compressed.wasm, rpc: "wss://westend-asset-hub-rpc.polkadot.io:443" }
- { name: rococo_bridge_hub, file_name: DEV_DEBUG_BUILD__bridge_hub_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-bridge-hub-rpc.polkadot.io:443" }
- { name: rococo_contracts, file_name: DEV_DEBUG_BUILD__contracts_rococo_runtime.compact.compressed.wasm, rpc: "wss://rococo-contracts-rpc.polkadot.io:443" }
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

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

- name: Download runtime blob
run: |
curl -sL ${{ env.RUNTIME_BASE_URL }}/${{ matrix.runtime.file_name }} -o ${{ matrix.runtime.name }}

- name: Display structure of downloaded files
run: ls -R

- name: Check state
id: check_state
continue-on-error: true
run: |
./try-runtime \
--runtime ./${{ matrix.runtime.name }} \
execute-block \
live --uri ${{ matrix.runtime.rpc }}

- name: Send Matrix Alert
if: ${{ steps.check_state.outcome == 'failure' }}
uses: s3krit/matrix-message-action@70ad3fb812ee0e45ff8999d6af11cafad11a6ecf # v0.0.3
with:
room_id: ${{ env.MATRIX_ROOM_ID }}
access_token: ${{ secrets.MATRIX_TRY_RUNTIME_BOT_TOKEN }}
server: m.parity.io
message: |
@room Problem executing try-state for runtime ${{ matrix.runtime.name }}. Check the details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Loading