Build recipes that exceed the 6h runner limit (e.g. envoy) via a Bazel remote cache
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- github-actions, rust
- Ambito
- build-system, ci-cd, infrastructure
Direzione di ricerca
Start by reviewing the build workflow and the remote-cache recipe proposed in #13957, then verify how the Envoy build currently passes Bazel flags. Done means a persistent cache is reachable securely, sequential jobs share it, and the build can resume across windows to produce the bottle.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
github.com/envoyproxy/envoy cannot be bottled on the standard GitHub-hosted
runners: a from-scratch Bazel build exceeds the 6 h job time limit. This is
not a recipe defect — every recipe-level lever has been exhausted:
| Lever tried | Result |
|---|---|
--jobs = HOST_CPUS * 0.5 |
x86-64 times out at 6 h |
--jobs = HOST_CPUS * 1.0 |
ARM64 OOM-killed |
--jobs = HOST_CPUS * 0.66 |
both fail (x64 timeout, ARM64 flaky Rust genrule) |
--fission=no, -Wno-error, --disable-new-dtags, rustc wrapper |
needed to compile at all, but do not reduce wall-clock below 6 h |
A single job cannot finish, and the recipe cannot change the runner's time limit.
Key insight (empirically verified)
Bazel uploads each action's result to a remote cache as soon as that action
completes — not at the end of the build. Consequently a fresh, ephemeral
runner pointed at the same remote cache hits the cache for every action a
previous run already completed, and only executes what remains. Splitting one
6 h build into several sequential ≤6 h windows becomes viable: window K
uploads the actions it finishes before timing out; window K+1 starts from a
clean checkout, hits the cache for those actions, and continues.
Proof
Reference cache: bazel-remote, built
pure-Go, CGO=0. Test project: 6 × sleep 4 genrules + an aggregator.
PHASE 1 COLD (cache empty) -> 7 processes executed 10 s
bazel clean --expunge -> wipes the ENTIRE output_base (= a brand-new runner)
PHASE 2 WARM (same remote_cache) -> 7 remote cache hit, 0 exec 2 s
cache store survived the --expunge: 28 files / 112 K
--expunge deletes the whole local build state, which is exactly what an
ephemeral runner starts from. The warm run reconstructed the action graph and
resumed entirely from the cache — no re-execution. This is the multi-window
mechanism, demonstrated end to end.
Proposal
- Stand up a persistent Bazel remote cache reachable from the build workflow —
e.g.bazel-remote(recipe proposed in #13957), backed by disk or S3, with
GC/quota. One small always-on host, or an S3-proxy cache, suffices. - Add to the envoy build the flags:
The cache URL / credentials are a workflow-level secret, not part of the--remote_cache=$CACHE_URL --remote_upload_local_results=true
public recipe (a public recipe must not carry secrets). This is why the
change belongs at the workflow layer, not inpackage.yml. - Run the build as N sequential jobs (a small
needs:-ordered chain), each
with the same--remote_cache. Each job may time out; the next resumes from
the cache. After ≤N windows the final job produces a fully-populated tree and
the bottle is packaged.
Alternatives considered
--disk_cacheon a persistent runner volume — the local analogue; works
only if the same runner volume survives between windows. Ephemeral hosted
runners don't keep the volume, so a remote cache is the portable answer.
(For a self-hosted runner with a persistent workspace,--disk_cachealone
is enough and needs no server.)- A self-hosted runner without the 6 h cap — solves it directly but adds
standing infra + trust surface; the remote-cache approach keeps the hosted
runners. - RBE (BuildBuddy / NativeLink) — remote execution, not just caching;
bigger lift, out of scope for "just get envoy to bottle".
Ask
Is pkgxdev open to (a) a persistent remote cache in the build infra and (b) a
chained multi-window job for the few recipes that exceed 6 h? If so, envoy
(otherwise code-complete) can land. Happy to wire the workflow side.
- Lingua principale
- C
- Stelle
- 199
- Fork
- 141
- Merge medio
- 6h 50m
- PR unite (30g)
- 119
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pkgxdev/pantry
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
❌ build issues: surrealdb.com=3.3.5Forse già presa @jhheider l’ha presa oggi. Apertabuild-failure
pkgxdev/pantry#14930 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 50/100
pkgxdev/pantry#14756 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
pkgxdev/pantry#14313 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
pkgxdev/pantry#13320 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di pkgxdev/pantry
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CanadaHonk/porffor#426 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 77/100
raysan5/raylib.com#132 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
libsdl-org/SDL#16607 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
PowerShell/Win32-OpenSSH#2482 · 1 reazione ·
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SoftEtherVPN/SoftEtherVPN#2322 ·
I maintainer di solito rispondono entro 1 giorno