Skip to content

ci(avr8js): replace fbuild test-emu with Docker runner (re-fix #2645) - #2651

Merged
zackees merged 1 commit into
masterfrom
ci/avr8js-switch-to-docker-runner-2645
May 31, 2026
Merged

zackees merged 1 commit into
masterfrom
ci/avr8js-switch-to-docker-runner-2645

Conversation

@zackees

@zackees zackees commented May 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Follow-up to #2646. That PR's daemon-restart workaround did not unblock the underlying fbuild test-emu hang on the avr8js path — verified on dispatched run 26701323431: the diagnostic dump step itself hung past 30 minutes because every fbuild CLI call (including `daemon status` / `show daemon`) blocks once the daemon is wedged.

Switch the workflow to invoke `ci.docker_utils.avr8js_docker.DockerAVR8jsRunner` directly. That's the same code path used by local `bash test --run uno`, pre-dates the fbuild migration, and is unaffected by fbuild#2645.

Verification

Dispatched on this branch's commits as run 26701823336 — completed: success. Compile + Docker emulate + serial-marker validation all green.

Changes

  • Drop the `fbuild test-emu --emulator avr8js` invocation, the daemon-restart shim, and the failure-diagnostic dump (the last two are not useful when fbuild itself is the hung process).
  • Drop the Node.js setup + npm pre-install — the Docker image bundles its own avr8js runtime.
  • New step builds via `ci-compile.py`, then a small Python block locates `firmware.elf` and hands it to `DockerAVR8jsRunner.run()` with a 30-s emulator timeout.
  • Add a serial-marker validation step ("Test setup starting" / "Test loop") because the Docker runner only surfaces the emulator exit code.
  • Keep `timeout-minutes: 8` caps on both build and emulate steps.

Test plan

  • `uno_avr8js_test` workflow_dispatch on this branch goes green (run 26701823336).
  • First push to master after merge produces a green `uno_avr8js_test`.
  • No QEMU workflow regressions (untouched).

Refs #2645, supersedes the workaround merged in #2646.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions testing workflow to migrate from Node.js-based emulation to Docker-based execution, streamlining firmware validation in the continuous integration pipeline.

…r runner

fbuild 2.2.10+ hangs the daemon's /api/test-emu handler indefinitely on
the avr8js path, and once the daemon is wedged every subsequent fbuild
call (including `daemon status` / `show daemon`) also hangs — the
daemon-restart workaround from the previous commit on this branch did
not unblock it (verified on run 26701323431: the diagnostic dump itself
hung past the 30-min mark).

Switch to invoking ci.docker_utils.avr8js_docker.DockerAVR8jsRunner
directly from the workflow. That's the same code path used by local
`bash test --run uno`, and it predates the fbuild migration that
introduced #2645.

- 8-min cap on both build and emulator steps still bounds CI burn if
  the Docker image pull or run misbehaves.
- The Test sketch's serial markers ("Test setup starting" / "Test
  loop") are validated explicitly because the Docker runner only
  surfaces the emulator exit code.
- Drops the Node.js setup, npm install, fbuild daemon restart, and
  failure-diagnostic steps from the previous attempt — none of them
  are needed for the Docker path and the diagnostic ones were
  themselves hanging on the wedged daemon.

Refs #2645, FastLED/fbuild#291, #292, #130.
@coderabbitai

coderabbitai Bot commented May 31, 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: d6b15aed-cd7b-4160-9d5a-69a02e840553

📥 Commits

Reviewing files that changed from the base of the PR and between 25e444c and c339a4f.

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

📝 Walkthrough

Walkthrough

The workflow template switches AVR8JS emulation execution from a Node.js/fbuild daemon-based approach to Docker container-based execution. Sketch compilation remains the same, but emulation now runs the firmware in a Docker container with platform-aware MCU/frequency selection, output logging, and serial marker validation.

Changes

AVR8JS Docker Emulation Workflow

Layer / File(s) Summary
Workflow header and documentation
.github/workflows/avr8js_docker_template.yml (lines 1–13)
Workflow template name and description updated to describe Docker-based AVR8JS execution path, replacing the prior fbuild test-emu daemon narrative.
Emulator execution pipeline
.github/workflows/avr8js_docker_template.yml (lines 62–144)
Node.js setup, npm cache prepopulation, and fbuild test-emu daemon orchestration removed. Replaced with Docker-based emulation: platform→MCU/frequency mapping, Docker image availability check, firmware.elf execution in niteris/fastled-avr8js container with fixed timeout, output logging to avr8js_output.log, and Test sketch serial marker validation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • FastLED/FastLED#2645: This PR directly addresses the fbuild daemon hang issue by removing all fbuild test-emu daemon invocations and replacing them with DockerAVR8jsRunner execution.
  • FastLED/FastLED#2287: This PR removes fbuild-based AVR8JS orchestration in the workflow, aligning with the issue's focus on choosing stable emulation execution paths.

Possibly related PRs

  • FastLED/FastLED#2296: Both PRs modify the same workflow file to change AVR8JS emulation runner; this PR switches from fbuild test-emu back to Docker DockerAVR8jsRunner.
  • FastLED/FastLED#2285: This PR's Docker runner requires firmware.elf artifacts from PlatformIO under .pio/build/, which would depend on the artifact-mirroring logic in that PR.

Poem

🐰 The daemon sleeps, the Docker wakes,
No fbuild chains to bind and break!
With nimble runners, clean and bright,
AVR8JS emulates the night. 🌙✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/avr8js-switch-to-docker-runner-2645

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 and usage tips.

@zackees
zackees merged commit 8560bd2 into master May 31, 2026
1 check failed
@zackees
zackees deleted the ci/avr8js-switch-to-docker-runner-2645 branch May 31, 2026 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant