fix(ci): make build-all self-sufficient on agents without install-deps #96

Merged
pat-s merged 2 commits from t3code/03edfe2f into main 2026-06-18 11:27:03 +00:00
Owner

Summary

Fixes the recurring build-all-* failure on agents where build-all-versions-install-deps did not run.

Both symptoms in the logs — Parameter 3 does not have length 1 (repeated, in the metadata DB queries) and argument is of length zero (system-dependency install) — were the same bug: inside bincraft, platform was zero-length. local/build-all.R calls build_binary_package() without passing platform, so bincraft resolves it from the container codename. The primary build step never (re)installed/pinned bincraft and relied on whatever sat in the per-agent cache volume; depends_on only orders steps, it does not co-locate them on the same agent, so a job landing where install-deps never ran got a stale bincraft that left platform empty.

Changes

  • build-all-versions.yaml: pin bincraft @v4.2.3 in the primary build step (mirroring the R-minor pass and process-updates.yaml), so every agent uses a known-good bincraft regardless of where install-deps ran.
  • Align the R-minor pass v4.2.2 → v4.2.3.
  • Export OS/OS_VERSION/ARCH as runtime env vars — previously only available for ${...} interpolation, so build-all.R's already-built dedup query matched platform "-" and skipped nothing.
  • Fix the unarchive call: pass the codename via bincraft::set_codename(NULL) instead of the malformed paste(OS, OS_VERSION) ("alpine 3.24"), matching archive-missed-packages.yaml.
  • build-all-versions-install-deps.yaml: pin install-deps to @v4.2.3 (was installing HEAD), so the precomputed snapshot and per-agent library stay consistent pipeline-wide.
## Summary Fixes the recurring `build-all-*` failure on agents where `build-all-versions-install-deps` did **not** run. Both symptoms in the logs — `Parameter 3 does not have length 1` (repeated, in the metadata DB queries) and `argument is of length zero` (system-dependency install) — were the same bug: inside bincraft, `platform` was zero-length. `local/build-all.R` calls `build_binary_package()` without passing `platform`, so bincraft resolves it from the container codename. The primary build step never (re)installed/pinned bincraft and relied on whatever sat in the **per-agent** cache volume; `depends_on` only orders steps, it does not co-locate them on the same agent, so a job landing where install-deps never ran got a stale bincraft that left `platform` empty. ## Changes - **`build-all-versions.yaml`**: pin bincraft `@v4.2.3` in the primary build step (mirroring the R-minor pass and `process-updates.yaml`), so every agent uses a known-good bincraft regardless of where install-deps ran. - Align the R-minor pass `v4.2.2 → v4.2.3`. - Export `OS`/`OS_VERSION`/`ARCH` as runtime env vars — previously only available for `${...}` interpolation, so `build-all.R`'s already-built dedup query matched platform `"-"` and skipped nothing. - Fix the unarchive call: pass the codename via `bincraft::set_codename(NULL)` instead of the malformed `paste(OS, OS_VERSION)` (`"alpine 3.24"`), matching `archive-missed-packages.yaml`. - **`build-all-versions-install-deps.yaml`**: pin install-deps to `@v4.2.3` (was installing HEAD), so the precomputed snapshot and per-agent library stay consistent pipeline-wide.
The install-deps step precomputes pkgs_to_build.rds, r_minor_sensitive_pkgs.rds
and s3_cache.rds into /mnt/cache, but that cache volume is per-agent.
A build job scheduled on a fresh agent (or racing install-deps) finds the
snapshot absent and fails at readRDS.

Guard the reads in build-all.R: when any snapshot file is missing, source
packages-to-build.R and save the derived files (atomic temp+rename so a
concurrent job never reads a half-written rds). The first job on an agent
repopulates the shared cache for subsequent jobs; jobs that also miss redo
the work.
The primary build-all pass relied on build-all-versions-install-deps having
populated the per-agent cache volume, but depends_on only orders the steps and
does not co-locate them on one agent. A job landing on an agent where
install-deps never ran used a stale bincraft that resolves `platform` to a
zero-length value, breaking every metadata query ("Parameter 3 does not have
length 1") and the system-dependency install ("argument is of length zero").

- Pin bincraft @v4.2.3 in the primary build step, mirroring the R-minor pass.
- Align the R-minor pass and install-deps to @v4.2.3 so the whole pipeline uses
  one version (install-deps previously installed HEAD).
- Export OS/OS_VERSION/ARCH as runtime env vars so build-all.R's already-built
  dedup query targets the real platform instead of "-".
- Derive the unarchive codename via bincraft::set_codename(NULL) instead of the
  malformed paste(OS, OS_VERSION).
pat-s merged commit 0f4330c05c into main 2026-06-18 11:27:03 +00:00
pat-s deleted branch t3code/03edfe2f 2026-06-18 11:27:03 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
devxy/build-cran-binaries!96
No description provided.