Skip to content

ci(meson): opt in to ZCCACHE_PROBE_BYPASS=1 for configure-phase probes (#2739) - #2877

Merged
zackees merged 1 commit into
masterfrom
ci/2739-zccache-probe-bypass
Jun 6, 2026
Merged

zackees merged 1 commit into
masterfrom
ci/2739-zccache-probe-bypass

Conversation

@zackees

@zackees zackees commented Jun 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #2739. Adds os.environ.setdefault("ZCCACHE_PROBE_BYPASS", "1") next to the existing ZCCACHE_STRICT_PATHS opt-in in _start_zccache_session(). This opts FastLED in to zccache's CLI-side fast-path for meson configure-phase try-compile probes.

Bench (from forge-ci/zccache#636)

Unique-probe workload, 0% cache hit (probes are fresh paths so the cache only pays per-invocation overhead with nothing to amortise):

Mode Cold Warm/probe vs bare
Bare 0.96 s 47 ms —
zccache cache (default) 4.92 s 102 ms 2.2× slower
zccache PROBE_BYPASS=1 1.34 s 60 ms 1.3× slower

With ~200 probes per FastLED meson configure run, expected saving is on the order of 7–10s per configure.

Safety

Path correction vs the issue

The issue pinned the canonical location as ci/meson/runner.py:406, but that file was refactored since the issue was filed — _start_zccache_session now lives in ci/meson/runner_helpers.py (422 lines, well under any LOC guard). The fix is otherwise the exact one-line addition the issue specified.

Tests / lint

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Optimized CI build performance by enabling faster caching mechanisms during Meson builds, which may result in quicker compilation times.

#2739)

Add os.environ.setdefault("ZCCACHE_PROBE_BYPASS", "1") next to the
existing ZCCACHE_STRICT_PATHS opt-in in _start_zccache_session().
This opts FastLED in to zccache's CLI-side fast-path for meson
configure-phase try-compile probes.

Bench from forge-ci/zccache#636 (unique-probe workload, 0% cache hit):

   Mode                     Cold     Warm/probe   vs bare
   bare                     0.96s    47ms         baseline
   zccache cache (default)  4.92s    102ms        2.2x slower
   zccache PROBE_BYPASS=1   1.34s    60ms         1.3x slower

With ~200 probes per FastLED meson configure run, expected saving is
~7-10s per configure.

Not a disable. Per-call routing decision: only single-source < 4 KiB
no-PCH no-@rsp invocations bypass; production .cpp TUs continue to use
the cache normally. setdefault preserves any user override. Older
zccache that doesn't recognise the env var ignores it.

Issue noted the canonical location as ci/meson/runner.py line ~406,
but that file was already refactored — the actual home is
ci/meson/runner_helpers.py::_start_zccache_session (422 lines, well
under any LOC guard).

Closes #2739

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 6, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3279117b-2b18-4e19-811a-3a1f415d9cf0

📥 Commits

Reviewing files that changed from the base of the PR and between 2c346c9 and 80e90c2.

📒 Files selected for processing (1)
  • ci/meson/runner_helpers.py

📝 Walkthrough

Walkthrough

The PR adds environment variable opt-in ZCCACHE_PROBE_BYPASS=1 to the zccache session bootstrap in ci/meson/runner_helpers.py::_start_zccache_session. This enables zccache's fast-path for Meson configure-phase probes while preserving user overrides and leaving production compilation caching intact. Expected savings: 7–10 seconds per configure run.

Changes

zccache probe-bypass fast-path opt-in

Layer / File(s) Summary
Probe-bypass environment opt-in
ci/meson/runner_helpers.py
The session bootstrap sets ZCCACHE_PROBE_BYPASS=1 alongside existing ZCCACHE_STRICT_PATHS, using setdefault to preserve user overrides. Enables the fast-path for probe-shaped invocations; production TUs and older zccache versions are unaffected.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • FastLED/FastLED#2340: Both PRs modify _start_zccache_session to set different zccache-related environment variables during CI session bootstrap.
  • FastLED/FastLED#2385: Both PRs modify zccache session environment setup in the Meson runner—this PR sets ZCCACHE_PROBE_BYPASS=1, while the retrieved PR manages ZCCACHE_STRICT_PATHS=absolute.

Poem

🐰 A probe flies swift, no cache to weigh,
One line of code shortens the day,
Fast paths emerge when guards stand tall,
Seven seconds saved—that's not small!
Thump thump for the speedup at all.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the main change: opting into ZCCACHE_PROBE_BYPASS=1 for meson's configure-phase probes, which matches the single-line addition in _start_zccache_session.
Linked Issues check ✅ Passed The code change fully implements the requirement from #2739: adding os.environ.setdefault("ZCCACHE_PROBE_BYPASS", "1") in _start_zccache_session to opt into zccache's CLI-side fast-path for meson configure-phase probes.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the single objective of adding ZCCACHE_PROBE_BYPASS=1 env var in the correct function; no refactoring of runner.py or unrelated changes are present.
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 ci/2739-zccache-probe-bypass

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.

@zackees
zackees merged commit 89175c4 into master Jun 6, 2026
7 of 8 checks passed
@zackees
zackees deleted the ci/2739-zccache-probe-bypass branch June 6, 2026 21:57
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci(meson): opt in to ZCCACHE_PROBE_BYPASS=1 for the configure-phase fast-path (zackees/zccache#633)

1 participant