fix(build): scope the already-attempted skip to the running R minor #187

Merged
pat-s merged 1 commit from fix/build-all-skip-per-minor into main 2026-08-31 13:34:33 +00:00
Owner

Motivation

The run meant to close the 4.6 gap on amd64/resolute barely built anything:

[1] "Skipped 2334 already-attempted package versions; 59 remaining for this job"

single_builds records r_version per attempt — store_build_metadata() both writes and queries it — but the skip query here ignored that column:

SELECT name, tag FROM single_builds WHERE platform = $1 AND arch = $2

So a non-primary pass skipped every package the primary pass had already attempted under a different minor. build-all.R --sensitive-only running under R 4.6 skipped packages that had only ever been built for 4.5.

That is the reason the per-minor slots never fill, and why the backlog cannot be worked off by rebuilding: amd64/resolute serves a 4.6 client 22322 packages against the 4.5 slot's 26346.

It is also, ultimately, why an R 4.6.1 client got a 4.5-built rlang and undefined symbol: SETLENGTH. Every other fix in this chain addressed a consequence; this is the cause.

Change

Scope the skip to the R minor the pass is running under.

Matched on the major.minor prefix rather than the full r_version string, so a patch bump (4.6.0 → 4.6.1) does not re-attempt the entire catalogue. Verified the prefix extraction against 4.5.3, 4.6.0, 4.4.3 and a bare 4.6, and that the derivation matches what store_build_metadata() records.

Expected effect

The non-primary passes stop skipping wholesale. The first run per slot will be long, since it works off a backlog that has been accumulating for as long as the per-minor slots have existed.

Verification

  • local/build-all.R parses.
  • Minor derivation checked under R 4.6.1: 4.6.
  • Real effect is only observable from a run; the number to watch is the "Skipped N ... M remaining" line, which should show a far larger M for a non-primary pass.
## Motivation The run meant to close the 4.6 gap on `amd64/resolute` barely built anything: ``` [1] "Skipped 2334 already-attempted package versions; 59 remaining for this job" ``` `single_builds` records `r_version` per attempt — `store_build_metadata()` both writes and queries it — but the skip query here ignored that column: ```sql SELECT name, tag FROM single_builds WHERE platform = $1 AND arch = $2 ``` So a non-primary pass skipped every package the **primary** pass had already attempted under a different minor. `build-all.R --sensitive-only` running under R 4.6 skipped packages that had only ever been built for 4.5. That is the reason the per-minor slots never fill, and why the backlog cannot be worked off by rebuilding: `amd64/resolute` serves a 4.6 client 22322 packages against the 4.5 slot's 26346. It is also, ultimately, why an R 4.6.1 client got a 4.5-built `rlang` and `undefined symbol: SETLENGTH`. Every other fix in this chain addressed a consequence; this is the cause. ## Change Scope the skip to the R minor the pass is running under. Matched on the `major.minor` prefix rather than the full `r_version` string, so a patch bump (4.6.0 → 4.6.1) does not re-attempt the entire catalogue. Verified the prefix extraction against `4.5.3`, `4.6.0`, `4.4.3` and a bare `4.6`, and that the derivation matches what `store_build_metadata()` records. ## Expected effect The non-primary passes stop skipping wholesale. The first run per slot will be long, since it works off a backlog that has been accumulating for as long as the per-minor slots have existed. ## Verification - `local/build-all.R` parses. - Minor derivation checked under R 4.6.1: `4.6`. - Real effect is only observable from a run; the number to watch is the "Skipped N ... M remaining" line, which should show a far larger `M` for a non-primary pass.
single_builds records r_version per attempt, but the skip query ignored
it and matched on platform and arch alone. A non-primary pass therefore
skipped every package the primary pass had already attempted under a
different minor: build-all.R --sensitive-only under R 4.6 skipped
packages that had only ever been built for 4.5, so the per-minor slots
never filled and the backlog could not be worked off by rebuilding.

That is why amd64/resolute serves a 4.6 client 22322 packages against
the 4.5 slot's 26346, and why the run intended to close that gap
reported 'Skipped 2334 already-attempted package versions; 59 remaining'.

Matching on the major.minor prefix rather than the full string keeps a
patch bump (4.6.0 -> 4.6.1) from re-attempting the whole catalogue.
pat-s merged commit 4bf88ed378 into main 2026-08-31 13:34:33 +00:00
pat-s deleted branch fix/build-all-skip-per-minor 2026-08-31 13:34:33 +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!187
No description provided.