Compare commits

...
Sign in to create a new pull request.
Author SHA1 Message Date
f9cbf5cf9c
feat(rebuild): allow rebuilding for an explicit R minor
All checks were successful
ci/crow/manual/weekly-rebuild-missing/50 Pipeline was successful
ci/crow/manual/weekly-rebuild-missing/49 Pipeline was successful
ci/crow/manual/weekly-rebuild-missing/51 Pipeline was successful
ci/crow/manual/weekly-rebuild-reindex/17 Pipeline was successful
The matrix pins each slot's primary R minor, and the weekly cron only
ever builds that one. Non-primary minors are filled in incidentally, by
process-cran-updates looping the installed interpreters for new and
updated packages, so older packages accumulate a backlog there.

That is why rlang exists for 4.4 and 4.5 on amd64/resolute but not 4.6,
and why an R 4.6.1 client got a 4.5.3 binary and 'undefined symbol:
SETLENGTH'. 2709 records across the 16 slots are in that state.

rebuild_r_version selects the interpreter; rebuild-missing.R derives its
target slot from the R it runs under, so that is the whole mechanism.
'matrix' keeps today's behaviour. An R minor absent from the image fails
the step with the available list rather than silently rebuilding the
wrong slot.
2026-08-31 11:53:39 +00:00

View file

@ -20,6 +20,19 @@ variables:
# Gates this pipeline. A manual pipeline creation instantiates every file in
# .crow/, and a declared default is applied even when the run never passed
# this variable, so the default must be a value that matches no matrix row.
# Which R minor to rebuild for. The matrix pins each slot's primary minor,
# which is the only one the weekly cron ever builds - that is why non-primary
# minors accumulate a backlog and why an ABI-risky package can exist for 4.4
# and 4.5 but not 4.6. Override this to work that backlog off.
rebuild_r_version:
description: "R version to rebuild with: 'matrix' for each slot's primary, or an explicit x.y.z."
options:
- matrix
- 4.6.0
- 4.5.3
- 4.4.3
default: matrix
weekly_rebuild_missing:
description: "Manual run target: a specific <os>-<arch>, 'all' to run every os/arch in parallel, or 'none' to run nothing."
options:
@ -410,6 +423,7 @@ steps:
UVR_PACKAGES_DIR: /mnt/cache/uvr/packages
R_LIBS_USER: /mnt/cache/R-pkgs
R_VERSION: ${R_VERSION}
REBUILD_R_VERSION: ${rebuild_r_version}
CCACHE_DIR: /mnt/cache/ccache
PLATFORM: ${OS}
ARCH: ${ARCH}
@ -424,12 +438,26 @@ steps:
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
- mkdir -p /mnt/cache/uvr/cache /mnt/cache/uvr/packages /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
# `matrix` keeps the slot's primary minor; anything else overrides it.
# rebuild-missing.R derives its target slot from the R it runs under, so
# selecting the interpreter is all that is needed to fill a minor's gap.
- |
if [ "$REBUILD_R_VERSION" = "matrix" ] || [ -z "$REBUILD_R_VERSION" ]; then
RV="$R_VERSION"
else
RV="$REBUILD_R_VERSION"
fi
if [ ! -x "/opt/R/$RV/bin/R" ]; then
echo "R $RV is not installed in this image; available: $(ls /opt/R)" >&2
exit 1
fi
echo "Rebuilding with R $RV"
- /opt/R/$RV/bin/Rscript local/install-bincraft.R
- /opt/R/$RV/bin/R -q -e 'packageVersion("bincraft")'
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS=""; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh httr2
- /opt/R/$R_VERSION/bin/R -q -e 'source("local/fetch-rebuild-packages-from-issue.R")'
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$R_VERSION/bin/Rscript local/rebuild-missing.R $SPLIT_INTO $SPLIT_INDEX $REBUILD_BUDGET_HOURS 2>&1
- UVR_R_BIN=/opt/R/$RV/bin/R local/uvr-install.sh httr2
- /opt/R/$RV/bin/R -q -e 'source("local/fetch-rebuild-packages-from-issue.R")'
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$RV/bin/Rscript local/rebuild-missing.R $SPLIT_INTO $SPLIT_INDEX $REBUILD_BUDGET_HOURS 2>&1
backend_options:
docker:
resources: