Skip to content

fix(ci): activate zccache 1.2.12 deploy-hook to cure DLL-126 flake (#2329) - #2340

Merged
zackees merged 1 commit into
masterfrom
fix-wasm-zccache-2329
Apr 19, 2026
Merged

zackees merged 1 commit into
masterfrom
fix-wasm-zccache-2329

Conversation

@zackees

@zackees zackees commented Apr 19, 2026 •

Copy link
Copy Markdown
Member

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:

  • Cache-hit path: sibling files the driver produced during the fresh link (runtime DLLs, .pdb, sanitizer runtimes, etc.) are now restored alongside the cached output.
  • Cache-miss path: an env-gated post-link hook runs before the side-effect scanner captures sibling files, covering the case where the native 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

  1. pyproject.toml: bump zccache>=1.2.11 -> zccache>=1.2.12 so the cache-hit sibling-restore path is guaranteed available.
  2. ci/meson/runner.py::_start_zccache_session: set ZCCACHE_LINK_DEPLOY_CMD=clang-tool-chain-libdeploy in the process env. zccache invokes libdeploy after 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.12 installed via uv sync.
  • clang-tool-chain-libdeploy resolvable in the venv.
  • bash test --cpp --setup-only reports "Saved zccache version: zccache 1.2.12".

Kept as belt-and-suspenders

The runtime_dll_paths PATH workaround in ci/meson/native/meson.build stays — harmless, covers any edge case the new env var misses, and the meta issue allows it.

Test plan

  • Local setup succeeds with new pin
  • CI runs 16 parallel test DLLs without the flake (the whole point)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Fixed flaky parallel test DLL load failures by ensuring runtime DLLs are properly materialized during the linking process.
  • Chores

    • Updated zccache dependency to version 1.2.12 or later.

…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]>
@coderabbitai

coderabbitai Bot commented Apr 19, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
Zccache Configuration
ci/meson/runner.py, pyproject.toml
Sets ZCCACHE_LINK_DEPLOY_CMD environment variable to clang-tool-chain-libdeploy before zccache session initialization, and bumps minimum zccache version from 1.2.11 to 1.2.12 to support the post-link deploy hook functionality.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

Poem

🐰 A hook for the cache, a link deploy,
DLLs dance where binaries play,
No flaky tests shall cause dismay,
With zccache's magic on display! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing DLL-126 flaky tests by activating a zccache 1.2.12 deploy-hook feature, which directly addresses the PR's core objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-wasm-zccache-2329

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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.environ guard 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-libdeploy is a hard functional dependency for the cache-miss path, a shutil.which("clang-tool-chain-libdeploy") probe with a one-line warning log when not found could shorten diagnosis if a future env ever drops the clang-tool-chain entry point — but given it's pinned via clang-tool-chain>=1.2.9 in pyproject.toml and 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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c9eca4 and b8ac8a2.

📒 Files selected for processing (2)
  • ci/meson/runner.py
  • pyproject.toml

@zackees
zackees merged commit c791428 into master Apr 19, 2026
48 of 80 checks passed
@zackees
zackees deleted the fix-wasm-zccache-2329 branch April 19, 2026 04:35
@coderabbitai coderabbitai Bot mentioned this pull request May 30, 2026
2 of 4 tasks
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.

Meta: flaky test-DLL load failures (error 126) — zccache ↔ clang-tool-chain post-link deployment gap

1 participant