ci(conan): fetch sources through ConanCenter's backup, not the upstream host - #801
Merged
Conversation
…am host `uchardet` has no prebuilt binary for the wasm profile, so every wasm run builds it from source, and its tarball lives on freedesktop.org, which answers a GitHub runner with 418 — a bot filter on data-centre IPs, not an outage, so conan's retry loop can never win. The conan cache cannot cover this. A branch sees only its own cache entries and `main`'s, so a first run on a new branch is always cold; and `main` has no wasm entry to fall back on, because `actions/cache` does not save when the job fails and main's wasm job fails on exactly this. The failure prevents the cache that would prevent the failure. `core.sources:download_urls` puts ConanCenter's source backup — the same tarballs, addressed by the sha256 the recipe already declares — ahead of the recipe's own url, for every dependency rather than this one. `origin` stays behind it for sources the backup does not carry. Every workflow already runs `conan config install .github/config/conan` before resolving, so no workflow file changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017XABfEapaADjFQCt1vjmDF
andiwand
force-pushed
the
ci/conan-source-backup
branch
from
August 31, 2026 06:43
660ad39 to
fabb734
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
CI has been failing intermittently on
conan install:418 is freedesktop's bot filter, not an outage — the same URL serves 200 from a
desk right now. It rejects data-centre IPs, so conan's retry loop can never win.
Why the conan cache doesn't already prevent this
Three things stack up:
uchardethas no prebuilt binary for the wasm profile (emcc/3.1.73,cppstd=20). The log shows all 13 compatible configurations checked and none
found, so it is always
--build missing→source()→ freedesktop.means a branch sees only its own entries plus
refs/heads/main's — neveranother branch's — so a fresh branch is always cold for wasm.
mainhas noconan-wasm-*entry at all.gh cache listshows it onthree feature branches only.
actions/cachedoes not save when the jobfails, and main's wasm job fails on exactly this. The failure prevents the
cache that would prevent the failure.
The fix
Conan 2's source-backup mechanism. ConanCenter mirrors every recipe's sources,
addressed by the sha256 the recipe already declares, so
core.sources:download_urlscan put the mirror ahead of the recipe's own url —for every dependency, not just this one.
originstays behind it as thefallback for sources the backup does not carry.
Every workflow already runs
conan config install .github/config/conanbeforeresolving (all 8 call sites: wasm, android, apple, python, tidy, conan and both
build_testjobs), so no workflow file changes.The downloaded tarball also lands in
$CONAN_HOME/sources, inside the path theconan cache already covers, so warm runs never hit the mirror either.
Verification
Built
uchardet/0.0.8from source in a throwawayCONAN_HOMEwith conan2.26.1 and this config installed. freedesktop was never contacted:
Not in this PR
The repo sits at 9.97 GB of the 10 GB Actions cache quota (41 entries), so
LRU eviction churns constantly — three branches each holding a 1058 MB wasm
conan cache is 3.1 GB of duplicated content on its own. The clean fix is to stop
feature branches from writing conan caches: swap
actions/cacheforcache/restore+cache/saveguarded byif: github.ref == 'refs/heads/main',the pattern ccache already uses in these same files and the one the cache-key
comment at the top of
build_test.ymldescribes. Seven files, worth doingseparately.