Repository navigation
chore(ci): add teensy40/41 to fbuild, KeyboardInterrupt in RPG, dedupe pyproject - #2326
Conversation
…, dedupe pyproject - fbuild_boards: add teensy40/teensy41 to FBUILD_BOARDS and update "NOT supported" comments to reflect current orchestrator coverage (STM32, RP2040, NRF52, etc. still on PlatformIO). - running_process_group: catch KeyboardInterrupt in the main wait loop, kill active child processes, and delegate to handle_keyboard_interrupt before reraising. Replace per-process stop_monitoring loop with single StuckMonitor.shutdown() call. - pyproject: remove duplicate running-process>=3.0.7 entry (running-process>=3.0.9 remains). Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
📝 WalkthroughWalkthroughUpdated board support configuration for fbuild by adding Teensy 4.0/4.1 support and expanding documented exclusions with refined reasons. Enhanced process management with KeyboardInterrupt handling to gracefully terminate child processes. Removed a duplicate dependency constraint in project configuration. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ci/util/running_process_group.py`:
- Around line 370-375: The except block currently creates a new
KeyboardInterrupt() instead of capturing the caught exception; update the
handler to use "except KeyboardInterrupt as ki:" and pass that captured
exception to handle_keyboard_interrupt(ki) (while still killing active_processes
and preserving the trailing raise), matching the pattern used elsewhere in this
module (see handle_keyboard_interrupt and active_processes).
🪄 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: c753e8e7-b6ee-4095-a24b-472d1ca67f51
📒 Files selected for processing (3)
ci/compiler/fbuild_boards.pyci/util/running_process_group.pypyproject.toml
💤 Files with no reviewable changes (1)
- pyproject.toml
| except KeyboardInterrupt: | ||
| # Kill all active child processes on interrupt | ||
| for proc in active_processes: | ||
| proc.kill() | ||
| handle_keyboard_interrupt(KeyboardInterrupt()) | ||
| raise |
There was a problem hiding this comment.
Capture the caught KeyboardInterrupt instead of constructing a new one.
The two other handlers in this file (lines 674–676 and 754–756) use except KeyboardInterrupt as ki: and forward ki. Here a fresh KeyboardInterrupt() is passed to handle_keyboard_interrupt, which breaks the traceback chain that helper explicitly preserves via raise KeyboardInterrupt() from ki, and is inconsistent with the rest of the module.
Also note: on the main thread, handle_keyboard_interrupt re-raises itself, so the trailing raise on line 375 only executes on worker threads — that's fine, just be aware it isn't redundant.
♻️ Suggested fix
- except KeyboardInterrupt:
- # Kill all active child processes on interrupt
- for proc in active_processes:
- proc.kill()
- handle_keyboard_interrupt(KeyboardInterrupt())
- raise
+ except KeyboardInterrupt as ki:
+ # Kill all active child processes on interrupt
+ for proc in active_processes:
+ proc.kill()
+ handle_keyboard_interrupt(ki)
+ raise🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ci/util/running_process_group.py` around lines 370 - 375, The except block
currently creates a new KeyboardInterrupt() instead of capturing the caught
exception; update the handler to use "except KeyboardInterrupt as ki:" and pass
that captured exception to handle_keyboard_interrupt(ki) (while still killing
active_processes and preserving the trailing raise), matching the pattern used
elsewhere in this module (see handle_keyboard_interrupt and active_processes).
Summary
ci/compiler/fbuild_boards.py: addteensy40/teensy41toFBUILD_BOARDS(teensy orchestrator already supports Cortex-M7) and refresh the "NOT supported" comments to list actual gaps (STM32, RP2040/RP2350, NRF52, Apollo3, SAM/SAMD, MGM240, esp8266, atmega8a).ci/util/running_process_group.py: catchKeyboardInterruptin the main wait loop — kill active children, delegate tohandle_keyboard_interrupt, then reraise. Replace per-processstop_monitoringcleanup with a singleStuckMonitor.shutdown()call.pyproject.toml: remove duplicaterunning-process>=3.0.7dep (canonicalrunning-process>=3.0.9remains at line 45).Test plan
bash lintcleanbash fbuild teensy40 --examples Blinksucceedsbash fbuild teensy41 --examples BlinksucceedsFBUILD_BOARDSstill compilebash testterminates cleanly without orphaned child processes🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes