Skip to content

refactor(ci): drop full artifact wipe on zccache version delta (#3129 A3) - #3201

Merged
zackees merged 1 commit into
masterfrom
refactor/3129-a3-zccache-version-wipe
Jun 16, 2026
Merged

zackees merged 1 commit into
masterfrom
refactor/3129-a3-zccache-version-wipe

Conversation

@zackees

@zackees zackees commented Jun 16, 2026 •

Copy link
Copy Markdown
Member

Summary

ci/meson/build_config.py calls cleanup_build_artifacts(...) on every detected zccache version change. That is overkill: zccache is a cache layer, not a codegen layer. A version bump that does not change the cache key just forces a miss-and-recompile — which is exactly what the adjacent force_reconfigure = True + meson reconfigure already does.

What this change keeps

  • force_reconfigure = True
  • skip_meson_setup = False
  • the reconfigure-reason logging
  • the compiler-version wipe at line 275 (clang codegen CAN change between versions — that wipe is defensible)

What this change drops

  • the cleanup_build_artifacts(build_dir, "zccache version changed") call

Effect

A routine zccache patch-level bump (e.g. via uv sync pulling a new >=1.12.7 release) no longer nukes every .obj/.a/.exe/.pch/.lib/.dll/.so/.dylib and forces a full rebuild. Meson reconfigure + ninja's normal staleness graph does the right thing — and any compile units whose cache keys actually changed will miss in zccache and recompile naturally.

1 file changed, 5 insertions(+), 1 deletion(-) (net +4 lines of explanatory comment).

Validation

  • ✅ bash lint clean
  • Behavioural verification belongs in the next zccache patch-level bump that hits master — at which point the build should reconfigure cleanly without a full artifact wipe.

Part of #3129 (Section A3).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Optimized Meson build configuration to preserve build artifacts when zccache version changes instead of deleting them. The cache layer now automatically manages version transitions, reducing unnecessary rebuilds and improving build efficiency while maintaining correctness across different versions.

…A3)

build_config.py used to call cleanup_build_artifacts(...) on every
zccache version change. That is overkill: zccache is a cache layer,
not a codegen layer. A version bump that does not change the cache
key just forces a miss-and-recompile, which is exactly what the
adjacent force_reconfigure already does.

Keeps:
- force_reconfigure = True
- skip_meson_setup = False
- the reconfigure-reason logging
- the compiler-version wipe at line 275 (codegen CAN change there)

Drops only the cleanup_build_artifacts call for zccache-only deltas.
A routine zccache patch-level bump (e.g. via uv sync) no longer
nukes every .obj/.a/.exe/.pch/.lib/.dll/.so/.dylib.

Part of #3129 (Section A3).

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

coderabbitai Bot commented Jun 16, 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: 2f99db48-1571-4273-897a-da3f7d4484a5

📥 Commits

Reviewing files that changed from the base of the PR and between 8e9c7fe and 40d2c83.

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

📝 Walkthrough

Walkthrough

In ci/meson/build_config.py, the setup_meson_build function no longer calls cleanup_build_artifacts when a zccache version marker mismatch is detected. Forced reconfiguration is retained, and comments are added explaining that cache-layer misses handle recompilation without requiring artifact deletion.

Changes

zccache version-change handling

Layer / File(s) Summary
Skip artifact cleanup on zccache version delta
ci/meson/build_config.py
Removes the cleanup_build_artifacts(build_dir, "zccache version changed") call from the version-mismatch branch; forced reconfiguration is kept, and new comments explain that zccache cache misses handle recompilation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • FastLED/FastLED#3020: Directly complements this change — bumps the zccache version floor, which is the dependency whose version-change handling is being modified here.
  • FastLED/FastLED#3052: Updates the zccache dependency to >=1.12.5, aligning with the reliance on cache-miss-based recompilation introduced by this PR.
  • FastLED/FastLED#2758: Also modifies setup_meson_build() zccache interaction in ci/meson/build_config.py, changing reconfiguration/cleanup behavior around version deltas.

Poem

🐇 A rabbit once scrubbed every build with a broom,
But zccache said "No need to clear out the room!"
When versions drift, just reconfigure instead —
Let cache misses recompile; no artifacts dread.
Less sweeping, more hopping — the CI thanks you! 🎉

🚥 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 clearly and specifically describes the main change: removing artifact cleanup on zccache version changes, which aligns with the core objective of the PR.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 refactor/3129-a3-zccache-version-wipe

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.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jun 16, 2026
@zackees
zackees merged commit 71f89c1 into master Jun 16, 2026
11 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 16, 2026
@zackees
zackees deleted the refactor/3129-a3-zccache-version-wipe branch August 21, 2026 19:16
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.

1 participant