Repository navigation
ci(test/windows): reset zccache daemon before test run to mitigate link flake (Closes #2805) - #2806
Conversation
…nk flake
`unit tests windows` has been intermittently red on master — the same
commit class passes in some runs and fails in others. The failing runs
all show the same signature in the build step:
FAILED: [code=1] tests/fl_math_trig8.dll
zccache[err][R]: lost connection to daemon (no response).
Often a daemon-CLI protocol version mismatch - try `zccache stop`
zccache wraps the linker on Windows; its named-pipe IPC to the daemon
drops mid-link under the heavy ASan-instrumented `-shared` link load
produced by FastLED's per-test DLL fan-out. The two test DLLs reported
each run aren't consistent — they're just whichever links lose the race
to the daemon dropping.
The daemon's own error message recommends `zccache stop` to recover.
Add a Windows-only step before the test run that does exactly that, so
each job starts with a known-clean daemon state instead of inheriting
whatever the install step's invocations left behind.
This is a **mitigation**, not a guaranteed cure for daemon-flake-under-
load. If reds persist after this lands, follow-ups should consider:
pinning a known-good zccache version, running zccache in daemon-less
mode for Windows CI, or per-job retry on test failure. The diagnostic
trail (issue, bisect, mitigation rationale) is in #2805.
CI/CD pipeline change → mandatory code-review trigger per global rules;
flagging explicitly.
Closes #2805
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a Windows-only step to the unit-test workflow that stops the zccache daemon before tests run and updates build-system docs to recommend ChangesWindows zccache daemon reset
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/template_unit_test.yml:
- Around line 59-71: Update the docs snippet that currently shows the
unsupported command `zccache --stop-server` to the actual working CLI command
used in the workflow (`zccache stop`), or alternatively `zccache daemon stop`;
change the example in agents/docs/build-system.md so the documented command
matches the workflow step that runs `zccache stop || true`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7fa41d27-5519-4b17-a89c-385c58394227
📒 Files selected for processing (1)
.github/workflows/template_unit_test.yml
CodeRabbit flagged that `agents/docs/build-system.md` documented `zccache --stop-server` as the way to reset the daemon, but that flag is not a supported zccache CLI option. The actual supported command (also used by the Windows mitigation step in `.github/workflows/template_unit_test.yml`) is `zccache stop`. Update the docs snippet so the documented command matches the working behavior and cross-reference the workflow mitigation. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Summary
Adds a Windows-only `zccache stop || true` step to `template_unit_test.yml` between `./install` and `./test`, mitigating the `unit tests windows` link-flake. Closes #2805.
Final unaddressed badge in the README sweep. The earlier ones: ✅ #2780 (AVR), ✅ #2785 (STM32 GIGA), ✅ #2788 (Apollo3), ⏳ #2793 (RP2040), ⏳ #2800 (AVR8JS), ⏳ #2804 (size budgets).
What's broken
The Windows job is intermittently red — same commit class passes some runs and fails others. The failing runs all show the same signature:
```
FAILED: [code=1] tests/fl_math_trig8.dll
zccache[err][R]: lost connection to daemon (no response).
Often a daemon-CLI protocol version mismatch - try `zccache stop`
```
zccache wraps the linker on Windows. Its named-pipe IPC to the daemon drops mid-link under the heavy ASan-instrumented `-shared` link load that FastLED's per-test DLL fan-out produces. The two test DLLs reported each run (`fl_math_trig8.dll`, `fl_math_transform.dll` this time) aren't consistent across runs — they're just whichever links lose the race to the daemon dropping.
Recent run history confirms the flake pattern (same source class, alternating outcomes):
What this PR changes
One new step in `.github/workflows/template_unit_test.yml`, guarded by `if: runner.os == 'Windows'`:
```yaml
if: runner.os == 'Windows'
run: |
zccache stop || true
shell: bash
```
The daemon's own diagnostic explicitly recommends `zccache stop` to recover from the connection-drop class of failures. Starting the Windows job with a known-clean daemon state avoids inheriting whatever the `./install` step's earlier zccache invocations left behind. `|| true` because on a fresh runner there may be no daemon to stop — that's the desired end state anyway.
Linux and macOS jobs are unaffected (the guard skips them).
What this PR is not
This is a mitigation, not a guaranteed cure. True daemon-flake-under-load may still occur. If reds persist, follow-ups should consider:
Test plan
Pure CI configuration — local `bash test` doesn't exercise hosted-runner daemon behavior. PR CI on `unit tests windows` is the authoritative check, and because the failure is intermittent the signal is statistical: this PR should raise the green-rate from the current ~30% to substantially higher.
`bash lint` clean.
Mandatory code-review trigger
Per global CI rules: modifying CI/CD pipelines is a code-review trigger. Flagged explicitly.
Sweep status
After this lands, every README-listed red badge has either a merged fix or an open PR addressing it.
🤖 Generated with Claude Code
Summary by CodeRabbit