fix(images): one router's extras must not cancel the whole lab - #14
Merged
Conversation
`docker compose build` puts every router in one buildkit solve, and buildkit cancels the solve on the first target that fails. The extras step ran under `set -eu` with no guard, so one unusable staged file turned into a failed lab: measured on a three-router stand, an .ipk with an unsatisfiable dependency exited 255 and took `#16 CANCELED`, `#13 CANCELED` and `owlab: build failed` with it. Both release lines did it -- it is `set -eu`, not the package manager: the same stand with a .apk apk answers `unable to select packages` exited 27 and cancelled its neighbour. Neither `docker compose build` nor `docker buildx bake` has a --keep-going, so the tolerance has to live in the RUN. The extras step now installs the set as before and, only if that fails, installs each file on its own in the staged order, so the good ones still land. The successful path is unchanged. Tolerance without a report would be worse than the cancelled builds it replaces, so what still fails is named once per package and recorded in /etc/owlab/extras-failed. `owlab up` reads that back off each running router and prints it under the ready table, exiting non-zero; `owlab test` gains an `extra_packages` step that fails the router before any assertion runs against a box missing what it was told to have. Fixes #12
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.
docker compose buildputs every router in one buildkit solve, and buildkit cancels thesolve on the first target that fails. The extras step ran under
set -euwith no guard,so one unusable staged file failed the whole lab.
Measured on a three-router stand — an
.ipkwith an unsatisfiable dependency:Both release lines do it: the same stand with an
.apkthat apk refuses(
unable to select packages: breaks: luci-base-…[ucode>=2026.02.27]) exited 27 andcancelled its neighbour. It is
set -eu, not the package manager.Neither
docker compose build(v5.1.2) nordocker buildx bake(v0.33.0) has a--keep-going, so tolerance has to live in the RUN itself.Tolerance is not silence
The step installs the set in one command as before — that is what lets the package
manager resolve among the staged files. Only if that fails does it retry them one at a
time, in staged order, which is the order the developer wrote them in: a dependent
package staged after the one it needs installs second and resolves against a router that
already has it.
What still will not install is named, not swallowed:
owlab: FAILED to install: <file>;/etc/owlab/extras-failedinside the image;owlab upready table:! bad2410 is running WITHOUT owlab-bad-extra_1.0_all.ipk,with
owlab up --rebuild bad2410as the next step;owlab testfails the router on a newextra_packagesstep, before any assertion runs.Extras are files the developer staged and explicitly asked for. Skipping one quietly and
returning a green build would be worse than failing — a check that could not run counts
as failed here, not as skipped.
After
No
CANCELED. The healthy path is unchanged: the same stand with working extras exits 0with no
!line, the packages are installed, and a staleextras-failedfrom an earlierbuild is cleared at the top of the layer — this Dockerfile also runs on top of an
already-built owlab image.
Contract change
owlab upcan now exit 1 with the lab running. That is deliberate and documented indocs/reference*.md,docs/troubleshooting*.mdand the changelog: a router missing apackage the developer asked for is not a successful run, and the lab is still up so it
can be inspected.
Fixes #12