Skip to content

Refactor known good numbers update workflow #591

Description

@rockbmb

Original Scope: Split CI pipeline into XCM/E2E workflows with decoupled block updates

New Scope: refactor block update workflow to use Subway to increase stability and reliability

Current situation

update-known-good.yml is a single workflow that:

The save job downloads the KNOWN_GOOD_BLOCK_NUMBERS_*.env artifacts and commits them to master. Because it runs if: success(), a single persistent failure (e.g. Bifrost FlexibleFee bug, bifrost-io/bifrost#2083) blocks block number updates for every other chain indefinitely.

The schedule-retry job re-dispatches the workflow with only the failed tests after a 5-minute sleep. If the retry also fails, notify posts a comment to the relevant chain's notification issue (mapped via notifications.json).

Additionally, update-snapshot.yml opens PRs per-network, but if any test in that network fails, the entire network's snapshot update is dropped silently.

Proposed changes

1. Split into two workflows by test type

xcm.yml 0 */6 * * * (4x/day)

  • Runs *.xcm.test.ts files only
  • XCM tests are integration-level (did the bridge between A and B break?), high-frequency makes sense

e2e.yml 0 6 * * * (once daily)

  • Runs *.e2e.test.ts files only
  • E2E tests are behavioral (does this pallet still work?), runtime upgrades don't happen 4x/day

2. Decouple block number updates from test results

The save job should commit block numbers based on whether define-matrix (the fetch step) succeeded, not whether all downstream tests pass. Block numbers are valid regardless of test outcomes.

3. Commit block numbers regardless of test outcomes, per test-file granularity

Block numbers are fetched at the start of the run by define-matrix. They are valid as soon as that step completes. The save job should commit them unconditionally (provided define-matrix itself succeeded), regardless of which test files pass or fail downstream.

For test results: each test file (e.g. polkadot/src/polkadot.staking.e2e.test.ts) is atomic. If it passes, its snapshots are valid and can be committed. If it fails, its snapshots are not committed. The save job should collect results per test file and commit only those that passed, rather than requiring all-or-nothing. The schedule-retry and notify jobs continue to handle the failures as before.

4. Adopt Subway caching + monolithic jobs (like ci.yml)

The current per-file matrix hits production endpoints directly and is prone to RPC throttling. ci.yml already solved this with two monolithic jobs (Polkadot/Kusama) + Subway caching. The new workflows should follow that pattern.

Out of scope

  • update-snapshot.yml stays as-is (manual trigger, opens PRs per network)
  • The actual test failures (e.g. Bifrost) are tracked separately
  • Per-file test result reporting: tracked as a follow-up issue

Metadata

Metadata

Assignees

Labels

cirefactorChanges to already-existing code.

Type

Fields

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions