New Tool for Runtime Developers: Try Runtime Github Action

Hello runtime devs,

As you know, try-runtime helps enforce critical invariants such as:

  • Migrations execute correctly, including pre_upgrade and post_upgrade hooks
  • Migration execution does not exceed the block weight limit
  • Migrations are idempotent
  • Try State invariants pass
  • Post-Migration, all runtime state is decodable

Given that code changes can break any of the above invariants, running try-runtime checks is as important as regularly running cargo tests in your CI to prevent accidental regressions.

In an effort to encourage try-runtime uptake beyond the Fellowship and Parity, I’m happy to announce a new Github Action from Parity: Try Runtime GHA.

The new GHA allows developers to add try-runtime CI to their repo with in a few lines, e.g. by creating a new file .github/workflows/check-try-runtime:

name: Check Try Runtime

on:
  push:
    branches: ["main"]
  pull_request:

jobs:
  check-try-runtime:
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3

      - name: Run Try Runtime Checks
        uses: "paritytech/try-runtime-gha@v0.1.0"
        with:
          runtime-package: "my-runtime"
          node-uri: "wss://my-runtime-uri:443"

If you are a runtime developer: please give it a try!

It will help you fearlessly write runtime upgrades, catching chain-bricking issues and other bugs before they even make it into main :sunglasses:.

If you have any questions or problems using the GHA please feel free to comment below and I’ll respond asap.

Cheers.

10 Likes