Skip to content

fix(ci): route IPFS CLI commands through daemon API to avoid repo.lock#237

Merged
bkontur merged 2 commits into
mainfrom
bko-ipfs-flaky
Feb 12, 2026
Merged

fix(ci): route IPFS CLI commands through daemon API to avoid repo.lock#237
bkontur merged 2 commits into
mainfrom
bko-ipfs-flaky

Conversation

@bkontur
Copy link
Copy Markdown
Collaborator

@bkontur bkontur commented Feb 12, 2026

The IPFS Docker container starts the daemon automatically, which holds repo.lock. Running ipfs config commands directly contends for the same lock and fails intermittently on slow CI runners.

Route all CLI commands through the daemon's HTTP API via --api flag, and replace fixed sleep waits with polling loops that check API readiness.

E,g: https://github.com/paritytech/polkadot-bulletin-chain/actions/runs/21937803360/job/63355998706?pr=202#step:22:491

The IPFS Docker container starts the daemon automatically, which holds
repo.lock. Running `ipfs config` commands directly contends for the
same lock and fails intermittently on slow CI runners.

Route all CLI commands through the daemon's HTTP API via `--api` flag,
and replace fixed `sleep` waits with polling loops that check API
readiness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bkontur
Copy link
Copy Markdown
Collaborator Author

bkontur commented Feb 12, 2026

x3c41a added a commit that referenced this pull request Feb 12, 2026
Run Westend parachain and Polkadot solochain tests in parallel
instead of sequentially, eliminating ~75 lines of duplication and
cutting CI wall time roughly in half. Each runtime gets its own
isolated runner, avoiding flaky cross-runtime state issues (#237).
@bkontur bkontur requested a review from x3c41a February 12, 2026 10:28
Comment thread examples/justfile
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs $NETWORK_ARGS ipfs/kubo:latest
echo " Container: ipfs-node (network: $NETWORK_ARGS)"
echo " Waiting for IPFS to initialize..."
sleep 5
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice! no more IPFS sleeps.

we shall remove the remaining sleeps one day too

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@x3c41a aaaaaa, did you merge with main? I was waiting for the result of tests :(

@bkontur bkontur enabled auto-merge (squash) February 12, 2026 10:59
@bkontur bkontur merged commit 2bbad26 into main Feb 12, 2026
12 of 14 checks passed
@bkontur bkontur deleted the bko-ipfs-flaky branch February 12, 2026 11:44
bkontur added a commit that referenced this pull request Feb 13, 2026
* Use GitHub Actions matrix for integration tests

Run Westend parachain and Polkadot solochain tests in parallel
instead of sequentially, eliminating ~75 lines of duplication and
cutting CI wall time roughly in half. Each runtime gets its own
isolated runner, avoiding flaky cross-runtime state issues (#237).

* Reuse runtimes-matrix.json for integration test matrix

Instead of hardcoding the runtime list in the workflow, read from
scripts/runtimes-matrix.json and filter by a new `integration_tests`
flag. This keeps the single source of truth for runtime definitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add summary job for Integration Tests status check

The matrix job reports per-runtime check names (e.g. "Integration Tests
(bulletin-polkadot)") which don't match the branch protection rule
expecting a single "Integration Tests" status. Add a summary job that
aggregates matrix results under that exact name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Load env vars in Setup job to fix cache key resolution

The Setup job uses POLKADOT_SDK_VERSION and ZOMBIENET_VERSION in cache
keys, but these are defined in .github/env. Without loading that file,
the cache keys resolve to empty strings causing cache misses every run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use GITHUB_ENV for RUNTIME_PACKAGE instead of per-step matrix refs

Set RUNTIME_PACKAGE once in $GITHUB_ENV alongside TEST_DIR, then
reference both as plain env vars in all subsequent steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
antkve pushed a commit that referenced this pull request Feb 16, 2026
* Use GitHub Actions matrix for integration tests

Run Westend parachain and Polkadot solochain tests in parallel
instead of sequentially, eliminating ~75 lines of duplication and
cutting CI wall time roughly in half. Each runtime gets its own
isolated runner, avoiding flaky cross-runtime state issues (#237).

* Reuse runtimes-matrix.json for integration test matrix

Instead of hardcoding the runtime list in the workflow, read from
scripts/runtimes-matrix.json and filter by a new `integration_tests`
flag. This keeps the single source of truth for runtime definitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add summary job for Integration Tests status check

The matrix job reports per-runtime check names (e.g. "Integration Tests
(bulletin-polkadot)") which don't match the branch protection rule
expecting a single "Integration Tests" status. Add a summary job that
aggregates matrix results under that exact name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Load env vars in Setup job to fix cache key resolution

The Setup job uses POLKADOT_SDK_VERSION and ZOMBIENET_VERSION in cache
keys, but these are defined in .github/env. Without loading that file,
the cache keys resolve to empty strings causing cache misses every run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use GITHUB_ENV for RUNTIME_PACKAGE instead of per-step matrix refs

Set RUNTIME_PACKAGE once in $GITHUB_ENV alongside TEST_DIR, then
reference both as plain env vars in all subsequent steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
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.

2 participants