Repository navigation
ci(build_template): cap Symbol Analysis + Optimization Report at 5 min - #2655
Conversation
xiaoblesense_adafruit post-merge run 26700835813 succeeded at every compile step (all 65 example builds green — the variant.h / PCA10056 / LTO fixes from #2636 / #2638 / #2642 all worked) but the runner was killed 37 minutes after the last log line during the Optimization Report step (`uv run ci/optimization_report.py --first`). Both Symbol Analysis and Optimization Report are post-build analysis steps already marked `continue-on-error: true`, so they should never turn a green build red. A 5-minute `timeout-minutes` cap keeps them from hanging the entire job when a downstream script (e.g. fbuild vs PIO artifact-path divergence — readelf/nm/objdump returned exit 1 on the firmware.elf earlier in the same run) gets stuck in a wait loop. The build itself still passes; the report is just skipped for that run. Filed the underlying optimization_report.py / symbol_analysis_runner.py fbuild-path bug separately for proper investigation. Refs #2641. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request adds ChangesCI Step Timeout Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 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 |
…alive (#2658) * ci(optimization-report): cap stdout dump at 1 MiB to keep GHA runner alive With `-fopt-info-all` applied across the full example matrix (~110 sketches on nrf52840_dk + Adafruit BSP boards), the per-board optimization_report.txt routinely exceeds 100 MB. The Optimization Report step in build_template.yml prints the entire file to the GitHub Actions log, which overruns the runner's log-buffer limit and triggers an external shutdown signal — see master CI for nrf52840_supermini (run 26705682359) and adafruit_feather_nrf52840_sense (run 26705682371) where the build step succeeded but Optimization Report cancelled at ~37s with the runner dying mid-step, leaving downstream cleanup steps unrun and the workflow marked FAILURE despite the build being green. Default to printing the LAST 1 MiB of the report (most-recently emitted optimizer info, which is what's most useful for size-driven debugging), with a `--max-bytes 0` escape hatch for the rare local case where the full dump is desired. Snap the tail to the next line boundary so we don't lead with a truncated half-line, and announce up front how many bytes were elided. Refs #2641, #2653. Counterpart to #2655 (which added timeout-minutes:5 to the Symbol Analysis + Optimization Report steps but couldn't help when the runner shutdown comes faster than the step timeout). Co-Authored-By: Claude Opus 4.7 <[email protected]> * fix(optimization_report): env-var override + doc artifact-upload follow-up Address review feedback: - Allow FL_OPT_REPORT_MAX_BYTES env var to override the 1 MiB default so devs can bump it locally without editing the script. `0` disables the cap. The --max-bytes CLI flag still wins. - Document the durable fix (upload optimization_report.txt as a build artifact + print only a summary) as a follow-up so this PR remains a focused stop-gap. Co-Authored-By: Claude Opus 4.7 <[email protected]> * fix(optimization_report): inject argv into parse_args per repo contract Address CodeRabbit comment on PR #2658: make parse_args / main accept an optional argv list[str] | None so tests can supply arguments deterministically. Co-Authored-By: Claude Opus 4.7 <[email protected]> --------- Co-authored-by: Claude Opus 4.7 <[email protected]>
Summary
Add
timeout-minutes: 5to theSymbol AnalysisandOptimization Reportsteps inbuild_template.yml. Both are post-build analysis already markedcontinue-on-error: true, so they should never turn a green build red — but a hang in either script currently kills the entire runner.Why
xiaoblesense_adafruit post-merge run 26700835813 succeeded at every compile step (all 65 example builds green — variant.h / PCA10056 / LTO fixes from #2636 / #2638 / #2642 all worked) but the runner was killed at 04:20 after
ci/optimization_report.py --firstproduced no log output for 37 minutes. The underlying script bug (likely fbuild vs PIO artifact-path divergence —readelf/nm/objdumpreturned exit 1 on the firmware.elf earlier in the same run) is filed separately.A 5-minute timeout keeps the analysis steps from hanging the job; the build itself still passes when they get skipped.
Refs #2641.
Test plan
Optimization Reporteither completes within 5 min or is marked timed-out without failing the job.build_xiaoblesense_adafruitworkflow goes green post-merge.🤖 Generated with Claude Code
Summary by CodeRabbit