Skip to content

ci: purge broken esptool venvs from the restored fbuild cache - #4722

Merged
zackees merged 1 commit into
masterfrom
ci/purge-broken-esptool-venv
Oct 6, 2026
Merged

zackees merged 1 commit into
masterfrom
ci/purge-broken-esptool-venv

Conversation

@zackees

@zackees zackees commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Every ci-full run today has failed one random ESP job at elf2image:

esptool.py: exec: .../.fbuild-tools/esptool/bin/python: not found     (exit 127)
failed to spawn [.../pioarduino-esptool/.../esptool.py ...]: No such file or directory

These failed on #4719 and #4721 (runs 37502123063, 37509356090, 37509357058, 37514824417); the same job passed and failed on consecutive runs. The cached esptool venv's bin/python launcher doesn't resolve on the restoring runner, and fbuild never revalidates it. Filed upstream as FastLED/fbuild#1655.

This adds a step to build_template.yml, next to the existing stale-tarball purge (#3543). It removes any cached esptool install whose launcher can't start, and fbuild re-downloads it on first use. Delete the step once fbuild#1655 lands.

Tested locally against a fake cache with one dangling-symlink venv and one healthy venv: only the broken one is removed. The workflow YAML parses and ci/tests/test_github_actions_security.py passes. The ci-full run on this PR is the real-runner test.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved build reliability by detecting and recovering from unusable cached tooling, allowing required tools to be reinstalled when needed. Builds now also skip cache checks when no toolchain cache is available.

A restored fbuild cache can hold esptool tool venvs whose bin/python no
longer resolves on the runner, so elf2image fails with exit 127 / ENOENT
on a random ESP job of every ci-full run (FastLED/fbuild#1655). Remove
any esptool install whose launcher can't start; fbuild re-downloads it.
Same pattern as the existing stale-platform-tarball purge (#3543).

Co-Authored-By: Claude <[email protected]>
@zackees zackees added the ci-full Run the complete release-equivalent CI matrix on this PR SHA label Oct 6, 2026
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0f607cf8-f195-4e7b-8738-f92b54513f28
📥 Commits

Reviewing files that changed from the base of the PR and between 5daddd7 and a2f43c3.

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

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The build workflow now checks restored fbuild toolchain caches for unusable esptool virtual environments. It removes an enclosing install directory if bin/python is missing or cannot run. It skips scanning when the cache root is absent.

Changes

Build cache validation

Layer / File(s) Summary
Validate restored esptool environments
.github/workflows/build_template.yml
The workflow skips scanning if the fbuild toolchain cache root is absent. It scans esptool directories and removes the enclosing install directory if bin/python is missing or cannot run.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a2f43

The workflow removes only the affected esptool cache entry when its Python launcher is unusable. No material merge risk remains from this change.

🚥 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 concisely describes the main change: removing broken esptool virtual environments from the restored fbuild cache.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@zackees
zackees merged commit 7b730e9 into master Oct 6, 2026
122 of 241 checks passed
@zackees
zackees deleted the ci/purge-broken-esptool-venv branch November 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run the complete release-equivalent CI matrix on this PR SHA

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant