Harden Streamlined Build workflow against intermittent download and nbd-lock failures - #10
mobileskyfi with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: mobileskyfi <45924209+mobileskyfi@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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.
🟡 Changes recommended
NBD teardown timeout can still allow conversion to proceed while the lock remains.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Harden the Streamlined Build workflow against transient downloads and NBD teardown races.
Changes:
- Expands curl retry handling.
- Polls NBD device teardown before image conversion.
File summaries
| File | Description |
|---|---|
.github/workflows/auto.yaml |
Updates download retries and NBD cleanup handling. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| for i in $(seq 1 10); do | ||
| [ -f "/sys/class/block/$dev/pid" ] || break | ||
| sleep 1 | ||
| done |
There was a problem hiding this comment.
Good catch — fixed. The loop now explicitly checks whether the sysfs pid file still exists after the 10s wait and fails the step with a clear error instead of silently falling through to the conversion step, so we no longer risk hitting the same lock race with a confusing downstream error.
Co-authored-by: mobileskyfi <45924209+mobileskyfi@users.noreply.github.com>
Recent "Streamlined Build" CI runs failed intermittently. Investigation of the run logs turned up two distinct causes.
Root causes
download.mikrotik.com. A prior fix bumped timeouts, which only covers exit 28 — curl's default--retrydoesn't retry the other error classes, so those runs failed outright.qemu-img: Could not open 'chr-efi.qcow2': Failed to get shared "write" lock. Race condition —qemu-nbd -dreturns before the kernel finishes releasing the file lock on the qcow2 image, so the immediately-followingqemu-img convertsometimes loses the race.Changes (
.github/workflows/auto.yaml)--retry-all-errors(with increased retry count/delay) so curl retries on any failure, not just its default transient-error subset.qemu-nbd -d, poll/sys/class/block/<dev>/piduntil each device is fully torn down before moving on to image conversion, removing the lock race.