fix(ci): point LG_ENV at -dual-tftp target when staging kernel + ramdisk - #1277
Merged
francoriba merged 4 commits intoSep 26, 2026
Merged
francoriba merged 4 commits into
francoriba merged 4 commits into
Conversation
Follow-up to libremesh/libremesh-tests#5 which split the LibreRouter v1 target YAML into two variants: - targets/librerouter_librerouter-v1.yaml (single-image, default) - targets/librerouter_librerouter-v1-dual-tftp.yaml (kernel + rootfs uImage) The single-image variant is what mesh tests, LibreMesh releases and openwrt-tests healthcheck actually use (initramfs-kernel.bin, only LG_IMAGE set). The previous librerouter YAML required both LG_IMAGE and LG_IMAGE_INITRD unconditionally, breaking every non-dual flow. .github/workflows/build-firmware.yml pre-sets LG_ENV to targets/${device}.yaml, which after the libremesh-tests split points at the single-image variant. When lab_stage_firmware.sh detects the dual-tftp payload (bin + uimage pair produced by build_image.sh for devices like the LibreRouter v1 on ath79), it exports LG_IMAGE_INITRD but the single-image YAML does not reference that variable, so labgrid loads only the kernel and boot fails without a rootfs. Override LG_ENV with the -dual-tftp sibling target file in the dual-TFTP branch so labgrid resolves LG_IMAGE_INITRD and issues both TFTP loads. No change for single-image devices (openwrt_one, linksys_e8450, bananapi_bpi-r4, qemu_*): the else branch keeps the pre-set LG_ENV.
francoriba
force-pushed
the
fix/librerouter-dual-tftp-env-override
branch
from
September 8, 2026 18:33
318e3ea to
054c982
Compare
francoriba
temporarily deployed
to
physical-lab
September 8, 2026 18:42 — with
GitHub Actions
Inactive
francoriba
had a problem deploying
to
physical-lab
September 8, 2026 18:42 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 8, 2026 22:18 — with
GitHub Actions
Failure
lab_stage_firmware.sh may override LG_ENV to a -dual-tftp variant
(targets/${DEVICE}-dual-tftp.yaml) when staging a dual-TFTP payload.
Those target YAMLs contain:
RemotePlace:
name: !template "$LG_PLACE"
When labgrid-client parses the YAML at lock time, it expands the
template — but LG_PLACE is written to GITHUB_ENV *after* the lock call
succeeds (echo "LG_PLACE=$PLACE" >> "$GITHUB_ENV"), so the variable
is undefined and labgrid raises:
InvalidConfigError: configuration file 'targets/librerouter_v1-dual-tftp.yaml'
refers to unknown variable 'LG_PLACE'
Fix: declare LG_PLACE as a step-level env var using the matrix value so
it is present in the process environment when labgrid-client runs.
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 13:27 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 13:27 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 13:27 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:18 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:18 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:18 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:37 — with
GitHub Actions
Error
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:37 — with
GitHub Actions
Error
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:37 — with
GitHub Actions
Error
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:37 — with
GitHub Actions
Error
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:37 — with
GitHub Actions
Error
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 14:37 — with
GitHub Actions
Error
…ches
v7 fetches raw.githubusercontent.com/astral-sh/versions/main/v1/uv.ndjson
exactly once with no retry. Run 34356587946 died on that fetch for two
physical-DUT jobs (librerouter_1, belkin_rt3200_1) with:
##[error]Failed to fetch version data: 503 Backend.max_conn reached
before any stage/lock/test step could run. v10.0.1 wraps the manifest
fetch in up to 3 attempts with progressive backoff
(astral-sh/setup-uv#1016), covering exactly this class of failure.
v10's only breaking change is enable-cache: auto, which this workflow
does not set, so the bump is behavior-preserving.
francoriba
force-pushed
the
fix/librerouter-dual-tftp-env-override
branch
from
September 9, 2026 15:12
e835499 to
6018d35
Compare
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 15:19 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 15:19 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 15:19 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 15:19 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 15:19 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 15:19 — with
GitHub Actions
Failure
…raw ndjson 503) setup-uv fetches raw.githubusercontent.com/astral-sh/versions/main/v1/uv.ndjson to resolve versions and download URLs. That endpoint has returned HTTP 503 (Varnish/Backend.max_conn) throughout runs 34356587946 and 34368726582, killing every physical-DUT job at 'Install uv' before any stage/lock/test ran. setup-uv@v10 added retries only for thrown network errors, not for HTTP error statuses (astral-sh/setup-uv#1016), so 503 is not covered. The standalone installer (astral.sh/uv/$UV_VERSION/install.sh) resolves the version straight from releases.astral.sh (mirror) and falls back to github.com/astral-sh/uv/releases, both of which bypass the ndjson manifest entirely and are served by Cloudflare, not Fastly/Varnish. UV_VERSION is pinned to 0.12.11, the same version used by successful jobs in the affected runs (found in tool-cache log line 'Found uv in tool-cache for 0.12.11'). Bump deliberately.
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 16:09 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 18:17 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 18:43 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 9, 2026 21:38 — with
GitHub Actions
Failure
francoriba
had a problem deploying
to
physical-lab
September 23, 2026 11:24 — with
GitHub Actions
Failure
ilario
approved these changes
Sep 23, 2026
ilario
left a comment
Member
There was a problem hiding this comment.
You are the master of the continuous deployment, so I approve any change you consider that make sense to do on those workflows :) Feel free to merge yourself when you think think that the code is ready.
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Follow-up to libremesh/libremesh-tests#5 which splits the LibreRouter v1 target YAML into two variants:
targets/librerouter_librerouter-v1.yaml- single-image (default)targets/librerouter_librerouter-v1-dual-tftp.yaml- kernel + rootfs uImageWhy the split: the single-image variant is what mesh tests, LibreMesh releases and
openwrt-testshealthcheck actually use (initramfs-kernel.bin, onlyLG_IMAGEset). The previous librerouter YAML required bothLG_IMAGEandLG_IMAGE_INITRDunconditionally, breaking every non-dual flow with:Problem in this CI
.github/workflows/build-firmware.ymlpre-sets:After the libremesh-tests split, that path points at the single-image variant.
When
tools/ci/lab_stage_firmware.shthen detects the dual-tftp payload (bin+uimagepair produced bybuild_image.shfor devices like the LibreRouter v1 on ath79), it exportsLG_IMAGE_INITRD— but the single-image YAML does not reference that variable, so labgrid loads only the kernel and boot fails without a rootfs.Fix
When
lab_stage_firmware.shenters the dual-TFTP branch, overrideLG_ENVwith the-dual-tftpsibling target file so labgrid resolvesLG_IMAGE_INITRDand issues both TFTP loads:No change for single-image devices (
openwrt_one,linksys_e8450,bananapi_bpi-r4,qemu_*): the else branch keeps the pre-setLG_ENV.Depends on
-dual-tftptarget file exists in the checked-out libremesh-tests.