Skip to content

fix(ci): include ci/boards.py in per-board fbuild cache key - #3547

Merged
zackees merged 1 commit into
masterfrom
fix/cache-key-boards-py
Jul 1, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/cache-key-boards-py

Conversation

@zackees

@zackees zackees commented Jul 1, 2026 •

Copy link
Copy Markdown
Member

PR #3543 bumped the LPC platform pin to point past the FastLED-org repo transfer, but every subsequent LPC CI run still fails with 'sha256 mismatch for FastLED-framework-arduino-lpc8xx/.../50d76e0d63c...tar.gz: expected e6bbcc339..., got e64f0cb81...' — the exact byte-difference the pin bump was supposed to fix.

Root cause: the per-board fbuild cache key hashes 'platformio.ini + library.json + pyproject.toml + uv.lock' but NOT 'ci/boards.py' (which owns _NXPLPC_PLATFORM). Pin changes therefore hit the warm cache from the old pin, and fbuild explodes when the on-disk tarball's sha256 doesn't match the new expected sha256.

Add 'ci/boards.py' to the hashFiles set. Only bumps to that file produce a new cache generation; unrelated edits still hit the warm cache.

Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved build cache invalidation so updates to board pinning settings are correctly reflected in future builds.
    • Prevents outdated cached build results from being reused when board-related configuration changes.

PR #3543 bumped `_NXPLPC_PLATFORM` from the pre-transfer pin
(`12265f76`) to the post-transfer pin (`4b6d395cbb`), which switches
the framework tarball URL from
`zackees/ArduinoCore-LPC8xx.git#50d76e0` to
`FastLED/framework-arduino-lpc8xx.git#50d76e0`. Cold cache locally
picks up the new URL and its (different) sha256 fine.

CI still reports the same `sha256 mismatch for
FastLED-framework-arduino-lpc8xx/.../50d76e0d63c...tar.gz: expected
e6bbcc339..., got e64f0cb81...` on `035c43efd` because the
per-board fbuild cache key was:

    cache-key-extra: ${{ board }}-${{ hashFiles('platformio.ini',
                                                'library.json',
                                                'pyproject.toml',
                                                'uv.lock') }}

`ci/boards.py` (which owns `_NXPLPC_PLATFORM`) is not in that list,
so a pin change does not invalidate the cache. The GHA cache
restore delivers the OLD tarball + its OLD sha256 to fbuild, fbuild
downloads the NEW tarball, and it explodes on the mismatch.

Add `ci/boards.py` to the hashFiles set so future platform-pin
bumps bust the cache cleanly. Only bumps to `ci/boards.py` produce a
new cache generation; unrelated edits still hit the warm cache.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@zackees
zackees merged commit c27b127 into master Jul 1, 2026
@zackees
zackees deleted the fix/cache-key-boards-py branch July 1, 2026 19:53
@coderabbitai

coderabbitai Bot commented Jul 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ddc99ef3-188b-4079-8765-32bbb9e60425

📥 Commits

Reviewing files that changed from the base of the PR and between e39b7fe and 00058e1.

📒 Files selected for processing (1)
  • .github/workflows/build_template.yml

📝 Walkthrough

Walkthrough

The fbuild per-board cache key computation in the build workflow now includes ci/boards.py in hashFiles(...), alongside the existing platformio.ini, library.json, pyproject.toml, and uv.lock inputs, so that pinned platform SHA changes trigger cache invalidation.

Changes

CI Cache Key Update

Layer / File(s) Summary
Cache key hashing checkpoint
.github/workflows/build_template.yml
Adds ci/boards.py to the hashFiles(...) inputs used to compute cache-key-extra for the per-board fbuild cache.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

  • FastLED/FastLED#2319: Prior update to the same cache-key-extra hash inputs in build_template.yml, adding fbuild_boards.py analogous to this PR's addition of ci/boards.py.
  • FastLED/FastLED#3440: Changes pinned LPC8xx platform URLs inside ci/boards.py, the exact file this PR adds to the cache-busting hash.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cache-key-boards-py

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.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 1, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jul 1, 2026
zackees added a commit that referenced this pull request Jul 1, 2026
…#3551)

Root cause of the ongoing LPC-lane failures (#3543 + #3547 did not
resolve them):

The fbuild setup action's cache uses restore-keys that fall back to
`fbuild-<version>-<os>-<arch>-<fbuild-hash>-` — a prefix that ignores
`cache-key-extra`. So an lpc804 job whose exact key misses can still
restore an unrelated board's cache (observed: uno_r4_wifi's). That
cache contains a `platforms/FastLED-framework-arduino-lpc8xx/.../
50d76e0d63c...tar.gz` from BEFORE the framework repo was transferred
to the FastLED org (2026-06-28), with expected sha256 =
e6bbcc339... The current-pin URL now serves e64f0cb81..., so fbuild's
integrity check fires immediately.

Bumping `ci/boards.py` into `cache-key-extra` in #3547 was necessary
but not sufficient — the restore-keys fallback wins on a fresh
cache miss.

Fix: add a small step between the fbuild-cache restore and the
pio/compile invocation that deletes ONLY
`$RUNNER_TEMP/fbuild-cache/platforms/FastLED-framework-arduino-lpc8xx/`.
Other cached artifacts (toolchain, cook, per-board build outputs) are
untouched. Non-LPC boards never had this subtree so the step is a
no-op for them. Deleted entries are lazily re-populated by the next
fbuild call, which now downloads the FastLED-org tarball and records
the correct sha256.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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