Skip to content

Commit

Permalink
CI: Use matrix.runtime.uri for try-runtime tests (#530)
Browse files Browse the repository at this point in the history
Some tests gated with the `try-runtime` feature have the ability to
configure the node URI using some hard-coded defaults, e.g.:
```
let transport: Transport =
			var("WS").unwrap_or("wss://rpc.dotters.network/kusama".to_string()).into();
...
let transport: Transport =
			var("WS").unwrap_or("wss://kusama-rpc.polkadot.io:443".to_string()).into();
...
let transport: Transport =
			var("WS").unwrap_or("wss://rpc.polkadot.io:443".to_string()).into();
...
let transport: Transport =
			var("WS").unwrap_or("wss://rpc.dotters.network/polkadot".to_string()).into();
```

Additionally, we have a dedicated runtime `uri` specified in the
`runtimes-matrix.json`, e.g.,
```
{
    "name": "polkadot",
    "uri": "wss://try-runtime.polkadot.io:443",
  },
  {
    "name": "kusama",
    "uri": "wss://try-runtime-kusama.polkadot.io:443",
  },
```

so, let's use those dedicated `uri`s instead of the hard-coded ones.

---

I came across this issue by accident when Kusama's
`remote_tests::next_inflation` failed with `Error while getting storage
data` here:
/~https://github.com/polkadot-fellows/runtimes/actions/runs/12526255825/job/34938624858?pr=519.
I wasn't sure if it is flaky, missing some keys in the actual block, or
just a connection problem, so I also enabled `remote-ext=info` logs (if
the logs are too much, we can switch to `remote-ext=warn/error`).
```
remote_tests::next_inflation --- FAILED

failures:

---- remote_tests::next_inflation stdout ----
thread 'remote_tests::next_inflation' panicked at relay/kusama/src/lib.rs:3230:14:
called `Result::unwrap()` on an `Err` value: "Error while getting storage data"
```

<!-- Remember that you can run `/merge` to enable auto-merge in the PR
-->

<!-- Remember to modify the changelog. If you don't need to modify it,
you can check the following box.
Instead, if you have already modified it, simply delete the following
line. -->

- [x] Does not require a CHANGELOG entry
  • Loading branch information
bkontur authored Jan 10, 2025
1 parent 80ac2e4 commit be67f5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ jobs:
env:
RUSTFLAGS: "-C debug-assertions -D warnings"
SKIP_WASM_BUILD: 1
WS: ${{ matrix.runtime.uri }}
RUST_LOG: "remote-ext=info"

- name: Test benchmarks ${{ matrix.runtime.name }}
run: |
Expand Down

0 comments on commit be67f5e

Please sign in to comment.