Skip to content

ci(build): per-job CONAN_HOME for the 5 remaining conan-building jobs#710

Merged
frstrtr merged 1 commit into
masterfrom
ci-steward/build-conanhome-per-job
Jul 15, 2026
Merged

ci(build): per-job CONAN_HOME for the 5 remaining conan-building jobs#710
frstrtr merged 1 commit into
masterfrom
ci-steward/build-conanhome-per-job

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Finishes the #704 durability pass. Five conan-building jobs in build.yml still cached the shared ~/.conan2 on the self-hosted c2pool-linux-905 host, so concurrent jobs kept tearing each other's b2/boost cache — the intermittent b2/5.5.1 ... file to download already exists reds the operator flagged on AsAN/BCH/DGB (#706/#708/#709).

Applies the linux-job pattern (from #704) to all five:

  • linux-asan, coin-bch, coin-bch-asan, coin-dgb-auxdoge — post-checkout Set per-job Conan home step exporting CONAN_HOME=\$RUNNER_TEMP/conan2 via \$GITHUB_ENV (not job-level env — that is the runner.temp parse break patched in ci: fix job-level CONAN_HOME (runner.temp invalid at job-env → 0 jobs) #704).
  • windows — same, PowerShell Out-File form, inheriting the job's ExecutionPolicy-Bypass shell.
  • cache path: ~/.conan2 -> \${{ runner.temp }}/conan2 on all five.
  • scoped the two colliding keys: linux-asan -> -asan, coin-bch-asan -> -bch-asan (coin-bch/windows/dgb keys were already distinct).

Verified: yaml.safe_load parses; 6/6 conan cache paths now per-job runner.temp; all 6 keys unique. Diff is build.yml only (+41/-7). Needs a PR run where linux-asan/coin-bch/coin-dgb-auxdoge go green without a retry. No self-merge — integrator review + operator workflow-scope tap.

linux-asan, coin-bch, coin-bch-asan, windows, coin-dgb-auxdoge still
cached the shared ~/.conan2 on the self-hosted host, so concurrent jobs
tore each other's b2/boost cache -> intermittent AsAN/BCH/DGB reds.

Apply the #704 linux pattern to all five: export CONAN_HOME=$RUNNER_TEMP/conan2
via $GITHUB_ENV in a post-checkout step (PowerShell Out-File form on
windows), point the cache path at ${{ runner.temp }}/conan2, and scope
the two colliding keys (linux-asan -> -asan, coin-bch-asan -> -bch-asan).
@frstrtr
frstrtr merged commit 0960218 into master Jul 15, 2026
25 of 26 checks passed
frstrtr added a commit that referenced this pull request Jul 19, 2026
…te lanes

The Conan cache-lock flake is not CodeQL-specific. Job 88179349495
(Coin matrix / ltc smoke) and 88188892260 (CI / Linux x86_64) fail the
same way: actions/cache reports a hit, the restore of the multi-hundred-MB
conan2 tree onto VM905 then times out ("Failed to restore: The operation
cannot be completed in timeout"), the home is left empty, and all eight
runners fall into a simultaneous cold from-source rebuild whose I/O storm
blows the 20s sqlite lock timeout ("Conan failed to acquire database lock").

Apply the same three-part fix everywhere the pattern appears:

  * CONAN_HOME on self-hosted becomes $HOME/.conan2-ci/$RUNNER_NAME --
    persistent, so the cache-service restore is off the hot path, and
    keyed on the runner instance, which executes one job at a time, so it
    is never contended and keeps the per-job isolation of #704/#710.
    github-hosted forks keep RUNNER_TEMP/conan2 + actions/cache unchanged.
  * actions/cache conan2 steps are gated to runner.environment ==
    github-hosted.
  * conan install gets a bounded 3x retry; remote downloads are the only
    network step left.

Also scopes coin-matrix orphaned-tempfile cleanup to $CONAN_HOME instead
of the shared ~/.conan2, which it was mutating out from under peer jobs,
and repoints the CodeQL home from .conan2-codeql to the same per-runner
path (that one was still shared across runners on concurrent refs).

Windows (VM217) lanes are untouched: no restore flake reported there.
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