Repository navigation
fix(ci): activate zccache 1.2.12 deploy-hook to cure DLL-126 flake (#2329) - #2340
Conversation
…ke (#2329) zccache 1.2.12 landed the upstream fix from forge-ci/zccache#33: when a link is served from cache, the sibling files the driver produced during the fresh link (runtime DLLs, .pdb, sanitizer runtimes, etc.) are restored alongside the cached output. On cache miss, an env-gated post-link hook runs before the side-effect scanner captures them, covering the case where the native ctc-clang++ trampoline skips Python post-link hooks. Activate that mechanism from FastLED: - Bump pinned zccache from 1.2.11 -> 1.2.12 in pyproject.toml so the cache-hit sibling-restore path is guaranteed available. - Set ZCCACHE_LINK_DEPLOY_CMD=clang-tool-chain-libdeploy in ci/meson/runner.py's _start_zccache_session() so zccache invokes libdeploy after each cache-miss link. Deployed DLLs then get swept into the cached artifact set and restored on every future hit. Verified locally: zccache 1.2.12 installed, libdeploy resolvable in the venv, setup reports the new zccache version. The runtime_dll_paths PATH workaround in ci/meson/native is kept as belt-and-suspenders. Closes #2329. Upstream fix: zackees/zccache commit d7b1d69 on main. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
📝 WalkthroughWalkthroughThe pull request adds environment variable configuration for zccache's post-link deploy hook in the test runner, and updates the zccache dependency to a compatible version. This ensures runtime DLLs are materialized alongside linked binaries after cache misses, addressing flaky parallel test failures. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ci/meson/runner.py (1)
386-406: LGTM — deploy-hook wiring is minimal and safely guarded.The
if "ZCCACHE_LINK_DEPLOY_CMD" not in os.environguard correctly preserves any caller-provided override, and setting the var before_find_zccache_binary()(with the no-op-when-absent semantics spelled out in the docstring) is the right ordering. The docstring also nicely captures the DLL-126 rationale and links the tracking issue.One optional thought: since the hook command
clang-tool-chain-libdeployis a hard functional dependency for the cache-miss path, ashutil.which("clang-tool-chain-libdeploy")probe with a one-line warning log when not found could shorten diagnosis if a future env ever drops theclang-tool-chainentry point — but given it's pinned viaclang-tool-chain>=1.2.9inpyproject.tomland zccache treats a failing hook as non-fatal for the link itself, this is purely a nice-to-have.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/meson/runner.py` around lines 386 - 406, The current _start_zccache_session sets ZCCACHE_LINK_DEPLOY_CMD but doesn't warn if the actual hook binary is missing; add an optional probe using shutil.which("clang-tool-chain-libdeploy") inside _start_zccache_session after setting ZCCACHE_LINK_DEPLOY_CMD and, if which returns None, emit a one-line warning (e.g., logging.warning or the module's logger) that the deploy hook is not on PATH so diagnostics are clearer if the entry point is ever removed; keep the existing guard that preserves a caller override of ZCCACHE_LINK_DEPLOY_CMD.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@ci/meson/runner.py`:
- Around line 386-406: The current _start_zccache_session sets
ZCCACHE_LINK_DEPLOY_CMD but doesn't warn if the actual hook binary is missing;
add an optional probe using shutil.which("clang-tool-chain-libdeploy") inside
_start_zccache_session after setting ZCCACHE_LINK_DEPLOY_CMD and, if which
returns None, emit a one-line warning (e.g., logging.warning or the module's
logger) that the deploy hook is not on PATH so diagnostics are clearer if the
entry point is ever removed; keep the existing guard that preserves a caller
override of ZCCACHE_LINK_DEPLOY_CMD.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c794c3dc-aee5-4fe6-82ee-9eb8e919aa35
📒 Files selected for processing (2)
ci/meson/runner.pypyproject.toml
Summary
Closes #2329 — the flaky error-126 DLL load failures under parallel quick-mode test runs on Windows.
Upstream
zccache 1.2.12 landed the upstream fix from forge-ci/zccache#33:
.pdb, sanitizer runtimes, etc.) are now restored alongside the cached output.ctc-clang++trampoline skips Python post-link hooks.Fix commit on zccache main:
d7b1d69 feat(daemon): invoke ZCCACHE_LINK_DEPLOY_CMD after cache-miss links.FastLED-side changes
pyproject.toml: bumpzccache>=1.2.11->zccache>=1.2.12so the cache-hit sibling-restore path is guaranteed available.ci/meson/runner.py::_start_zccache_session: setZCCACHE_LINK_DEPLOY_CMD=clang-tool-chain-libdeployin the process env. zccache invokeslibdeployafter each cache-miss link, deployed DLLs then get swept into the cached artifact set and restored on every future hit.Both touched files are under the CI workflow's safe-file merge surface, so the fix reaches the workflow.
Verification
zccache 1.2.12installed viauv sync.clang-tool-chain-libdeployresolvable in the venv.bash test --cpp --setup-onlyreports "Saved zccache version: zccache 1.2.12".Kept as belt-and-suspenders
The
runtime_dll_pathsPATH workaround inci/meson/native/meson.buildstays — harmless, covers any edge case the new env var misses, and the meta issue allows it.Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Chores