feat(cdn): enable per-R-minor routing in production #184

Merged
pat-s merged 1 commit from feat/enable-union-slots into main 2026-08-31 12:52:30 +00:00
Owner

Motivation

Everything built today is unreachable until this is set.

> install.packages("rlang")
trying URL 'https://cran.rpkgs.com/amd64/resolute/latest/src/contrib/rlang_1.3.0.tar.gz'
> library(rlang)
  undefined symbol: SETLENGTH

No 4.6/ in that path. With UNION_SLOTS empty the client resolves against the generic index and never reaches a per-minor binary:

artifact size
generic, R 4.5-built 2079570 — what R downloaded
4.6/, R 4.6-built 2075106 — correct, unused

The working binary has existed since 12:13 today. Nothing routes anyone to it.

Change

Sets production UNION_SLOTS to all 16 slots, from the same local.rpkgs_slots the staging zone uses.

Verified before enabling

Against the staging zone, which runs the identical script against the identical origin:

check result
regressions against the generic slot 0 across all 16 slots
R minor served the per-minor index 48/48
excluded R minor sent to CRAN 16/16
client with no R minor still gets generic 16/16
tarball never rewritten 16/16

Trade-off, stated plainly

Coverage on a non-primary minor drops where the per-minor build backlog has not been worked off. amd64/resolute serves a 4.6 client 22169 packages rather than the generic slot's 24310.

Those ~2100 are ABI-risky packages built under another R minor. They are exactly the ones that would install and then fail at load, so the drop trades a confusing runtime crash for an honest "not available". It shrinks as the 4.6 builds land.

If that trade is unwelcome for some slots, local.rpkgs_slots can be narrowed to a subset — amd64/rhel10 and amd64/alpine323 have the smallest backlogs — and widened as builds catch up.

After applying

BASE=https://cran.rpkgs.com scripts/verify-r-minor-routing.sh --live

and the reported case directly:

docker run --rm --platform linux/amd64 reg.devxy.io/r/r-ubuntu:4.6-resolute \
  R -q -e 'install.packages("rlang"); library(rlang); cat("loaded OK\n")'
## Motivation Everything built today is unreachable until this is set. ``` > install.packages("rlang") trying URL 'https://cran.rpkgs.com/amd64/resolute/latest/src/contrib/rlang_1.3.0.tar.gz' > library(rlang) undefined symbol: SETLENGTH ``` No `4.6/` in that path. With `UNION_SLOTS` empty the client resolves against the generic index and never reaches a per-minor binary: | artifact | size | |---|---| | generic, R 4.5-built | **2079570** — what R downloaded | | `4.6/`, R 4.6-built | 2075106 — correct, unused | The working binary has existed since 12:13 today. Nothing routes anyone to it. ## Change Sets production `UNION_SLOTS` to all 16 slots, from the same `local.rpkgs_slots` the staging zone uses. ## Verified before enabling Against the staging zone, which runs the identical script against the identical origin: | check | result | |---|---| | regressions against the generic slot | 0 across all 16 slots | | R minor served the per-minor index | 48/48 | | excluded R minor sent to CRAN | 16/16 | | client with no R minor still gets generic | 16/16 | | tarball never rewritten | 16/16 | ## Trade-off, stated plainly Coverage on a non-primary minor drops where the per-minor build backlog has not been worked off. `amd64/resolute` serves a 4.6 client 22169 packages rather than the generic slot's 24310. Those ~2100 are ABI-risky packages built under another R minor. They are exactly the ones that would install and then fail at load, so the drop trades a confusing runtime crash for an honest "not available". It shrinks as the 4.6 builds land. If that trade is unwelcome for some slots, `local.rpkgs_slots` can be narrowed to a subset — `amd64/rhel10` and `amd64/alpine323` have the smallest backlogs — and widened as builds catch up. ## After applying ```sh BASE=https://cran.rpkgs.com scripts/verify-r-minor-routing.sh --live ``` and the reported case directly: ```sh docker run --rm --platform linux/amd64 reg.devxy.io/r/r-ubuntu:4.6-resolute \ R -q -e 'install.packages("rlang"); library(rlang); cat("loaded OK\n")' ```
Everything built today is unreachable until this is set. An R 4.6.1
client on amd64/resolute resolves against the generic index, downloads
the 4.5-built rlang (2079570 bytes) and dies at load with 'undefined
symbol: SETLENGTH', while the correct 4.6 build (2075106 bytes) sits
unused one directory away.

Verified on the staging zone first, which runs the same script against
the same origin: 16/16 slots report zero regressions against the generic
slot, an excluded R minor is sent to CRAN for sources, a client that
reports no R minor still gets the generic index, and tarball requests are
never rewritten.

Coverage on a non-primary minor drops where the per-minor build backlog
has not been worked off - resolute serves a 4.6 client 22169 packages
rather than the generic slot's 24310. Those are ABI-risky packages built
under another minor: the ones this removes are the ones that would have
failed at load.
pat-s merged commit 0a6c155dca into main 2026-08-31 12:52:30 +00:00
pat-s deleted branch feat/enable-union-slots 2026-08-31 12:52:30 +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!184
No description provided.