ci: darwin release builds are uncached — port rivet sccache/cache-mount Dockerfile pattern
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- docker, github-actions, rust
- 領域
- build-system, ci-cd, performance
調査の方向性
docker/build/darwin.Dockerfile と rivet's docker/build/darwin-{arm64,x64}.Dockerfile を比較し、続いて .github/workflows/publish.yaml の build-sidecar-darwin ジョブと、builder-base という名前のファイルを調べます。結果として得られる、キャッシュが温まった darwin リリースビルドがリモートキャッシュを使用し、冗長な rustup セットアップを避け、キャッシュシークレットが利用できない場合に適切にフォールバックすることを確認します。
索引モデルが issue の本文から書いたものです。
説明
The "Build darwin binaries" jobs are the critical path for Publish npm in publish.yaml (~10.5 min per release) and rebuild ~388 crates from scratch every run.
Current state
docker/build/darwin.DockerfileusesFROM ghcr.io/rivet-dev/rivet/builder-base-osxcross:0e33ceb98— the same prebaked base rivet uses (osxcross + MacOSX 11.3 SDK + both apple Rust targets + sccache preinstalled) — but uses none of its caching affordances:- re-installs the rust toolchain/targets the base already has
- no
RUSTC_WRAPPER=sccache, no cache backend, no BuildKit cache mounts - plain
docker buildwith no--cache-from/--cache-to
- Measured on the 0.2.5 stable run (28801821648): base image pull ~1 min, rustup ~1 min,
cargo build --releaseof 388 crates = 7m52s, every run, forever. - By contrast the linux sidecar/plugin jobs use Swatinem/rust-cache and finish in 1–5 min warm.
Fix: port the rivet consumer pattern
Rivet already solved this for the identical build in rivet-dev/rivet:
docker/build/darwin-{arm64,x64}.Dockerfile:RUSTC_WRAPPER=sccache+SCCACHE_WEBDAV_ENDPOINT=https://cache.depot.dev,--mount=type=secret,id=DEPOT_TOKEN,env=SCCACHE_WEBDAV_TOKENwith a graceful health-check fallback that disables sccache when the token/backend is unavailable, plus--mount=type=cachefor cargo registry/git/target.- Base image build/push lives in
docker/builder-base/osxcross.Dockerfile+scripts/docker-builder-base/build-push.sh.
Port notes for agentos:
- agentos builds on GitHub-hosted runners (not Depot builders), so BuildKit cache mounts alone will not persist across runs — the cross-run win is the sccache remote backend. Either:
- (a) add a
DEPOT_TOKENsecret and reuse rivet's Depot cache config verbatim (preferred: byte-for-byte port of a production pattern), or - (b) use sccache's native GHA backend (
SCCACHE_GHA_ENABLED=on).
- (a) add a
- Drop the redundant rustup toolchain/target install from
darwin.Dockerfile(already in the base). - Pass the secret through in the
build-sidecar-darwinjob in.github/workflows/publish.yaml(docker buildx build --secret id=DEPOT_TOKEN).
Expected: darwin job drops from ~10 min to ~2–3 min warm, cutting release npm-publish latency roughly in half.
Related smaller wins (same investigation, can be separate PRs)
Publish crates.iojob: give it its own concurrency group (or workflow) so a slow crates tail (crates.io new-crate rate-limit backoff can sleep for many minutes) doesn't queue the next release's npm path behind it (concurrency: publish-${{ github.ref }},cancel-in-progress: falsecaused the 0.2.6 dispatch to sit pending behind 0.2.5's crates job). Also surface the "rate limited, retrying at " sleep as a::notice::so the job doesn't look hung.- Release rust-cache eviction: linux jobs key caches by
<target>-<trigger>, so-releasecaches are only warmed by prior release runs and get LRU-evicted during quiet stretches while-previewstays warm; consider a shared key or a scheduled warm job. - WASM Commands (~8.6 min): cache
packages/runtime-core/commandskeyed onhashFiles('registry/native/**')and skipmakeon hit.
- 主要言語
- Rust
- スター
- 4.8k
- フォーク
- 270
- 平均マージ
- 13時間 37分
- マージ済み PR(30日)
- 48
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rivet-dev/agentos のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
rivet-dev/agentos#2087 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 半日 初心者へのやさしさ 32/100
rivet-dev/agentos#2020 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
rivet-dev/agentos の issue をすべて見る
似ている issue
-
github_actions security
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
dekobon/big-code-analysis#1815 ·
メンテナーはふだん 1 日以内に返信
-
area: png-glitch bug P0 security
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
chikoski/png-glitch#45 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
nekko-labs/nekko-agent#1756 ·
メンテナーはふだん 1 日以内に返信
-
upstream
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
yologdev/yoyo-evolve#1138 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gitbutlerapp/gitbutler#16982 ·
メンテナーはふだん 1 日以内に返信