Repository navigation
ci: gate compile-many opt-in via FASTLED_USE_FBUILD_CI=1 (urgent — unbreaks master) - #2662
Conversation
#2661 merged at 14:00 UTC enabled fbuild compile-many for the first time. The subsequent CI runs immediately showed it as a hard regression on master: - uno (small framework): ~3.5 min serial → ~7 min compile-many - teensy41 / esp32s3 (large framework): finished serial → 30 min BUILD FAIL Process timed out Root cause is upstream FastLED/fbuild#335: each stage-2 sketch lives in its own project dir (.build/pio/<board>/compile_many/<name>/) and therefore gets its own .fbuild build dir, so the framework archive stage-1 builds in the root dir is invisible — every stage-2 worker re-builds the framework from scratch. The bigger the framework, the worse the regression. Until fbuild#335 lands a shared framework cache, gate the compile-many dispatch behind FASTLED_USE_FBUILD_CI=1 so the default behaviour is the known-good legacy serial loop. Everything else from #2661 — the `SUB --help` probe fix, normalized per-sketch output, install-cache wiring, workflow input — stays active and useful. Only the dispatch to compile-many is gated. Set FASTLED_USE_FBUILD_CI=1 locally to opt back in (handy for timing experiments against the architectural fix once it lands). Refs FastLED/fbuild#335
📝 WalkthroughWalkthrough
Changesfbuild CI dispatcher environment-variable gating
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
|
Urgent: this restores the legacy serial loop as the default so master CI returns to working timings. PR #2661 enabled compile-many but it re-builds the framework per stage-2 sketch (FastLED/fbuild#335) — uno went from ~3.5 min to ~7 min, teensy41 / esp32s3 timed out at 30 min. Until fbuild#335 ships a shared framework cache, this gate is the safest path; set (The |
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 `@ci/compiler/pio.py`:
- Line 439: The file contains a local import "import os" inside the function
_build_fbuild; move that import to the module-level import section with the
other standard-library imports, remove the in-function import from
_build_fbuild, and ensure the "os" import is placed in the correct
standard-library ordering (before third-party and local imports); run the
linter/flake8 to confirm import-order compliance after the change.
🪄 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: e4352795-8b50-414b-b2fe-ca1c209a0e5d
📒 Files selected for processing (2)
ci/compiler/pio.pyci/tests/test_fbuild_compile_many.py
| ``FASTLED_USE_FBUILD_CI=1`` to opt in (e.g. for local timing | ||
| experiments against the architectural fix once it lands). | ||
| """ | ||
| import os |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
Move os import to the module import section.
import os was added inside _build_fbuild; this violates the repository import-order rule for system imports.
Proposed diff
@@
import gc
import hashlib
+import os
import platform
@@
- import os
-
from ci.util.fbuild_runner import (
fbuild_supports_ci,
fbuild_supports_compile_many,
)As per coding guidelines, "All system imports must be at the top of the file in proper order: standard library, third-party, local".
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import os |
🤖 Prompt for 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.
In `@ci/compiler/pio.py` at line 439, The file contains a local import "import os"
inside the function _build_fbuild; move that import to the module-level import
section with the other standard-library imports, remove the in-function import
from _build_fbuild, and ensure the "os" import is placed in the correct
standard-library ordering (before third-party and local imports); run the
linter/flake8 to confirm import-order compliance after the change.
Picks up the compile-many stage-2 framework-archive share (FastLED/fbuild#337) — the original regression that forced the FASTLED_USE_FBUILD_CI=1 gate to default-off in #2662 is now fixed upstream. Also pulls in stage-2 jobs split (#336), the real-toolchain stage-2 perf regression test (#342), and the #346 hang-debugging chain: daemon fmt tracing to stderr (#348), bounded zccache start timeout (#349), project lock acquire instrumentation (#350). uv.lock is .gitignore'd in this repo so the pin change alone is enough to nudge consumers to 2.2.13 on next install/lock. A follow-up will flip FASTLED_USE_FBUILD_CI=1 default-on once a few CI runs confirm the new pin is healthy.
Summary
Set `FASTLED_USE_FBUILD_CI=1` locally to opt back in (handy for timing experiments against the architectural fix once it lands).
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests