Skip to content

casa21 self-hosted runner for Integration Tests#547

Draft
plebhash wants to merge 2 commits into
stratum-mining:mainfrom
plebhash:2026-06-04-casa21-integration-tests
Draft

casa21 self-hosted runner for Integration Tests#547
plebhash wants to merge 2 commits into
stratum-mining:mainfrom
plebhash:2026-06-04-casa21-integration-tests

Conversation

@plebhash

@plebhash plebhash commented Jun 6, 2026

Copy link
Copy Markdown
Member

integration_github_runner job

legacy runner, capped to github free runners

integration_casa21_runner job

new runner on self-hosted infra @CasaVinteUm

VM parameters:

  • 24 CPU Cores
  • 32 GB RAM

only PRs coming from members of stratum-mining github org trigger integration_casa21_runner

integration_required job

gates whether the PR is blocked for merging by leveraging github-script to enforce this truth table, where integration_casa21_runner takes precedence:

integration_github_runner integration_casa21_runner integration_required (PR blocked?)
passed ✅
(but doesn't matter)
passed ✅ unblocked ✅
failed ❌
(but doesn't matter)
passed ✅ unblocked ✅
running 💫
(but doesn't matter)
passed ✅ unblocked ✅
passed ✅
(but doesn't matter)
failed ❌ blocked ❌
failed ❌
(but doesn't matter)
failed ❌ blocked ❌
running 💫
(but doesn't matter)
failed ❌ blocked ❌
passed ✅ absent (PR is not from org member) unblocked ✅
failed ❌ absent (PR is not from org member) blocked ❌
running 💫 absent (PR is not from org member) waiting 💫

or more concisely, as a mermaid flowchart:

flowchart TD
  R[integration_required]

  R --> C{integration_casa21_runner?}

  C -->|passed ✅| U[PR unblocked ✅]
  C -->|failed ❌| B[PR blocked ❌]
  C -->|absent| G{integration_github_runner?}

  G -->|passed ✅| GU[PR unblocked ✅]
  G -->|failed ❌| GB[PR blocked ❌]
  G -->|running 💫| W[waiting 💫]
Loading

parallelism parameters

cargo nextest parameter integration_github_runner integration_casa21_runner
--nocapture (forces sequential execution) YES NO
--test-threads (number of threads for parallel execution) 1 24

performance comparison

integration_casa21_runner integration_github_runner
execution time: ~5 minutes ~30 minutes ⏳⏳⏳⏳⏳⏳

6x improvement 🚀

@plebhash plebhash force-pushed the 2026-06-04-casa21-integration-tests branch 18 times, most recently from 1ce934a to f3f53b0 Compare June 7, 2026 01:54
- generate funding blocks in smaller batches to avoid RPC timeouts on slow/contended CI hosts
- add built-in retry/backoff to `BitcoinCore::fund_wallet` for transient startup RPC failures
- remove `jd_integration`-local `fund_wallet_with_retry` helper and use `tp.fund_wallet()` directly
- update wallet funding rustdocs to document batching + retry behavior
@plebhash plebhash force-pushed the 2026-06-04-casa21-integration-tests branch 4 times, most recently from ec0235b to 96387dc Compare June 7, 2026 02:17
name: Integration Tests

jobs:
ci:

@plebhash plebhash Jun 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

note that ci job is being replaced with integration_github_runner

currently ci is set as "Required" for branch protection against main:

image

@plebhash plebhash Jun 7, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

we'll need to remove ci from this list (branch protections for main), while replacing for integration-required:
image

@plebhash plebhash force-pushed the 2026-06-04-casa21-integration-tests branch from 96387dc to f9e9490 Compare June 7, 2026 02:21
@plebhash plebhash marked this pull request as ready for review June 7, 2026 02:22
@plebhash plebhash force-pushed the 2026-06-04-casa21-integration-tests branch from f9e9490 to 5c62b0b Compare June 7, 2026 02:24
@plebhash plebhash force-pushed the 2026-06-04-casa21-integration-tests branch 2 times, most recently from 6713148 to a1091d5 Compare June 7, 2026 21:20
@plebhash plebhash marked this pull request as draft June 7, 2026 21:37
@plebhash

Copy link
Copy Markdown
Member Author

@Shourya742 suggested researching on how to leverate nextest to spawn each test as a separate OS process

todo: research which config parameter would allow for that, and whether it improves determinism in a meaningful way

@plebhash

Copy link
Copy Markdown
Member Author

todo:

write a script that will execute the entire test stack (as if it were from CI) multiple repeated times, so we have statistical sampling of how deterministic integration_casa21_runner will be

that's important because the current approach makes integration_casa21_runner take precedence also for the failure cases

overall, if there's something wrong with the PR, we want CI to fail fast (that's kinda the point of accelerating CI execution)

but we DON'T want CI to constantly fail due to flaky tests and force us to constantly re-trigger integration_casa21_runner

TLDR: I'm only going to make this PR ready for review when I get >90% determinism from a sufficiently large statistical sample... otherwise integration_casa21_runner would be just PITA instead of an actual improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant