Compare commits
| Author | SHA1 | Date |
|---|---|---|
|
56f3cf368a |
60 changed files with 2386 additions and 2765 deletions
|
|
@ -74,7 +74,6 @@ steps:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- mkdir -p /tmp/R-pkgs
|
- mkdir -p /tmp/R-pkgs
|
||||||
- /opt/R/4.5.3/bin/Rscript local/install-bincraft.R
|
- /opt/R/4.5.3/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/4.5.3/bin/R local/uvr-install.sh RPostgres
|
|
||||||
- |
|
- |
|
||||||
set -eu
|
set -eu
|
||||||
LIMIT=""
|
LIMIT=""
|
||||||
|
|
|
||||||
|
|
@ -140,11 +140,12 @@ steps:
|
||||||
from_secret: PGPASS
|
from_secret: PGPASS
|
||||||
REPO_RO_TOKEN:
|
REPO_RO_TOKEN:
|
||||||
from_secret: REPO_RO_TOKEN
|
from_secret: REPO_RO_TOKEN
|
||||||
# bincraft reads the DESCRIPTION of every new or replaced tarball from
|
# uvr resolves bincraft's dependencies through the GitHub API, including
|
||||||
# the CRAN mirror on raw.githubusercontent.com, and authenticates with
|
# the pat-s/cranlike@s3 fork. Unauthenticated it is rate limited, and the
|
||||||
# this token when it is set. A slot whose published index cannot be read
|
# failure is not loud: uvr warns, falls back to the registry copy of
|
||||||
# is re-read in full, ~25k requests, which the anonymous rate limit would
|
# cranlike, and the index write then dies on `unused argument (built =
|
||||||
# cut short.
|
# built)` because upstream has no such parameter. Intermittent by nature,
|
||||||
|
# since it depends on the rate-limit window.
|
||||||
GITHUB_PAT:
|
GITHUB_PAT:
|
||||||
from_secret: GITHUB_PAT
|
from_secret: GITHUB_PAT
|
||||||
GIT_USER: pat-s
|
GIT_USER: pat-s
|
||||||
|
|
@ -155,7 +156,6 @@ steps:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- mkdir -p /tmp/R-pkgs
|
- mkdir -p /tmp/R-pkgs
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres
|
|
||||||
- |
|
- |
|
||||||
set -eu
|
set -eu
|
||||||
LIMIT=""
|
LIMIT=""
|
||||||
|
|
|
||||||
|
|
@ -36,13 +36,6 @@ variables:
|
||||||
- 4.5.3
|
- 4.5.3
|
||||||
- 4.4.3
|
- 4.4.3
|
||||||
default: 4.5.3
|
default: 4.5.3
|
||||||
SEED_FROM:
|
|
||||||
# Only for bootstrapping a new slot. Copies the pure-R binaries of these
|
|
||||||
# slots (same OS family and arch, same primary R minor; see
|
|
||||||
# local/seed-pure-r.R) before the build list is computed, so build-all only
|
|
||||||
# compiles what actually needs compiling. Space-separated, first wins.
|
|
||||||
description: 'Existing slots to copy pure-R binaries from, e.g. "alpine324 alpine323". Empty: no seeding.'
|
|
||||||
default: ''
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: manual
|
- event: manual
|
||||||
|
|
@ -93,9 +86,8 @@ steps:
|
||||||
# Pin the same bincraft version the build steps use, so the precomputed
|
# Pin the same bincraft version the build steps use, so the precomputed
|
||||||
# snapshot and the per-agent library stay consistent across the pipeline.
|
# snapshot and the per-agent library stay consistent across the pipeline.
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres s3fs data.table future jsonlite purrr
|
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres s3fs data.table future jsonlite
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
|
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
|
||||||
- if [ -n "${SEED_FROM}" ]; then /opt/R/$R_VERSION/bin/Rscript local/seed-pure-r.R ${SEED_FROM}; fi
|
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e "source('local/packages-to-build.R'); saveRDS(pkgs, '/mnt/cache/packages/pkgs_to_build.rds'); saveRDS(pkgs[r_minor_sensitive == TRUE], '/mnt/cache/packages/r_minor_sensitive_pkgs.rds'); sprintf('Precomputed %s package versions (%s r-minor-sensitive)', nrow(pkgs), nrow(pkgs[r_minor_sensitive == TRUE]))"
|
- /opt/R/$R_VERSION/bin/R -q -e "source('local/packages-to-build.R'); saveRDS(pkgs, '/mnt/cache/packages/pkgs_to_build.rds'); saveRDS(pkgs[r_minor_sensitive == TRUE], '/mnt/cache/packages/r_minor_sensitive_pkgs.rds'); sprintf('Precomputed %s package versions (%s r-minor-sensitive)', nrow(pkgs), nrow(pkgs[r_minor_sensitive == TRUE]))"
|
||||||
backend_options:
|
backend_options:
|
||||||
docker:
|
docker:
|
||||||
|
|
|
||||||
|
|
@ -136,18 +136,10 @@ steps:
|
||||||
R_LIBS_USER: /mnt/cache/R-pkgs
|
R_LIBS_USER: /mnt/cache/R-pkgs
|
||||||
CCACHE_DIR: /mnt/cache/ccache
|
CCACHE_DIR: /mnt/cache/ccache
|
||||||
NCPUS: 2
|
NCPUS: 2
|
||||||
# Whole hours the build passes below may use, measured from the step's
|
|
||||||
# start. The repo timeout is 50h; the remainder is left for archiving the
|
|
||||||
# missed packages, so a long run ends cleanly instead of being killed.
|
|
||||||
BUILD_BUDGET_HOURS: 44
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${ARCH}-binaries-r-dep-cache-${OS}-${OS_VERSION//./}:/mnt/cache
|
- ${ARCH}-binaries-r-dep-cache-${OS}-${OS_VERSION//./}:/mnt/cache
|
||||||
commands:
|
commands:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- . local/compiler-cache.sh
|
|
||||||
# One deadline shared by every build pass in this step, read by
|
|
||||||
# local/build-all.R and local/build-newer-r.R before each package.
|
|
||||||
- export BUILD_DEADLINE=$(( $(date +%s) + BUILD_BUDGET_HOURS * 3600 ))
|
|
||||||
- mkdir -p /mnt/cache/uvr/cache /mnt/cache/uvr/packages /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
|
- mkdir -p /mnt/cache/uvr/cache /mnt/cache/uvr/packages /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
|
||||||
# The primary pass must not rely on build-all-versions-install-deps having
|
# The primary pass must not rely on build-all-versions-install-deps having
|
||||||
# run on *this* agent: depends_on only orders the steps, but the cache
|
# run on *this* agent: depends_on only orders the steps, but the cache
|
||||||
|
|
@ -160,7 +152,7 @@ steps:
|
||||||
# The dependency-prep job may run on another agent whose cache volume is
|
# The dependency-prep job may run on another agent whose cache volume is
|
||||||
# not visible here. Install the packages needed to recompute the snapshot
|
# not visible here. Install the packages needed to recompute the snapshot
|
||||||
# and query build metadata in every build job.
|
# and query build metadata in every build job.
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres s3fs data.table future jsonlite purrr
|
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres s3fs data.table future jsonlite
|
||||||
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
||||||
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$R_VERSION/bin/Rscript local/build-all.R $SPLIT_INTO $SPLIT_INDEX $NCPUS 2>&1
|
- $XVFB $XVFB_ARGS -n $SPLIT_INDEX -- /opt/R/$R_VERSION/bin/Rscript local/build-all.R $SPLIT_INTO $SPLIT_INDEX $NCPUS 2>&1
|
||||||
- |
|
- |
|
||||||
|
|
@ -201,8 +193,8 @@ steps:
|
||||||
from_secret: B2_S3_ACCESS_KEY
|
from_secret: B2_S3_ACCESS_KEY
|
||||||
B2_S3_SECRET_KEY:
|
B2_S3_SECRET_KEY:
|
||||||
from_secret: B2_S3_SECRET_KEY
|
from_secret: B2_S3_SECRET_KEY
|
||||||
# A per-minor index reads the ABI classifier cache and the flat-object
|
# The per-minor index reads the ABI classifier cache and the flat-object
|
||||||
# safety table from the build database, and is not republished without it.
|
# safety table, and aborts without the database password.
|
||||||
PGPASS:
|
PGPASS:
|
||||||
from_secret: PGPASS
|
from_secret: PGPASS
|
||||||
R_LIBS_USER: /mnt/cache/R-pkgs
|
R_LIBS_USER: /mnt/cache/R-pkgs
|
||||||
|
|
@ -212,15 +204,12 @@ steps:
|
||||||
- |
|
- |
|
||||||
CODENAME=$(/opt/R/$R_VERSION/bin/Rscript -e "cat(bincraft::set_codename(NULL))")
|
CODENAME=$(/opt/R/$R_VERSION/bin/Rscript -e "cat(bincraft::set_codename(NULL))")
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "bincraft::upload_package_index(codename = '$CODENAME', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'))"
|
/opt/R/$R_VERSION/bin/R -q -e "bincraft::upload_package_index(codename = '$CODENAME', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'))"
|
||||||
FAILED_MINORS=""
|
failed=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "bincraft::upload_package_index(codename = '$CODENAME', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "bincraft::upload_package_index(codename = '$CODENAME', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || failed="$failed $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$failed" ]; then echo "Per-minor reindex failed for:$failed" >&2; exit 1; fi
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
backend_options:
|
backend_options:
|
||||||
docker:
|
docker:
|
||||||
resources:
|
resources:
|
||||||
|
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
||||||
# Collect CDN access logs and publish the public download statistics.
|
|
||||||
#
|
|
||||||
# Each run reads the last 70 hours of cran-rpkgs access logs from Bunny into
|
|
||||||
# `download_stats.events` (build metadata Postgres), then rewrites
|
|
||||||
# https://cran.rpkgs.com/stats/downloads.json, which the rpkgs.com /stats page
|
|
||||||
# reads. Bunny keeps logs for only three days, so a run every hour leaves room
|
|
||||||
# for two days of failed runs before anything is lost. Re-reading the window is
|
|
||||||
# safe: events are keyed by Bunny's request id.
|
|
||||||
#
|
|
||||||
# The classification rules and what is excluded are documented in
|
|
||||||
# `stats/README.md`.
|
|
||||||
#
|
|
||||||
# Register the `download-stats` cron (hourly, `0 * * * *`) in the crow UI, or
|
|
||||||
# run manually:
|
|
||||||
# crow pipeline create --branch main --var download_stats=true devxy/build-cran-binaries
|
|
||||||
#
|
|
||||||
# Secrets:
|
|
||||||
# STATS_CLIENT_SALT HMAC key for the client hash. Rotating it resets
|
|
||||||
# distinct-client counts, so keep it stable.
|
|
||||||
# STATS_OWN_NETWORKS Comma-separated CIDRs of our own CI runners.
|
|
||||||
# Both live in OpenBao at development/agent-dev/rpkgs-download-stats.
|
|
||||||
variables:
|
|
||||||
download_stats:
|
|
||||||
description: 'Collect and publish download statistics. Also gates this pipeline.'
|
|
||||||
options:
|
|
||||||
- 'true'
|
|
||||||
- 'false'
|
|
||||||
default: 'false'
|
|
||||||
|
|
||||||
when:
|
|
||||||
- event: manual
|
|
||||||
evaluate: 'download_stats == "true"'
|
|
||||||
- event: cron
|
|
||||||
cron: download-stats
|
|
||||||
|
|
||||||
skip_clone: true
|
|
||||||
|
|
||||||
labels:
|
|
||||||
group: rpkgs-amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 'Collect and publish download stats'
|
|
||||||
image: oven/bun:1.4.5-alpine
|
|
||||||
pull: true
|
|
||||||
environment:
|
|
||||||
BUNNYNET_API_KEY:
|
|
||||||
from_secret: BUNNYNET_API_KEY
|
|
||||||
PGPASS:
|
|
||||||
from_secret: PGPASS
|
|
||||||
B2_S3_ACCESS_KEY:
|
|
||||||
from_secret: B2_S3_ACCESS_KEY
|
|
||||||
B2_S3_SECRET_KEY:
|
|
||||||
from_secret: B2_S3_SECRET_KEY
|
|
||||||
STATS_CLIENT_SALT:
|
|
||||||
from_secret: STATS_CLIENT_SALT
|
|
||||||
STATS_OWN_NETWORKS:
|
|
||||||
from_secret: STATS_OWN_NETWORKS
|
|
||||||
REPO_RO_TOKEN:
|
|
||||||
from_secret: REPO_RO_TOKEN
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache -q git
|
|
||||||
- git clone -q --depth 1 --branch "$CI_COMMIT_BRANCH" https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
|
||||||
- bun test stats
|
|
||||||
- bun stats/collect.ts
|
|
||||||
- bun stats/publish.ts
|
|
||||||
backend_options:
|
|
||||||
kubernetes:
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
memory: 256Mi
|
|
||||||
cpu: 250m
|
|
||||||
limits:
|
|
||||||
memory: 1Gi
|
|
||||||
cpu: 1000m
|
|
||||||
tolerations:
|
|
||||||
- key: 'CI'
|
|
||||||
operator: 'Equal'
|
|
||||||
value: 'true'
|
|
||||||
effect: 'NoSchedule'
|
|
||||||
|
|
@ -179,8 +179,6 @@ steps:
|
||||||
R_LIBS_USER: /mnt/cache/R-pkgs
|
R_LIBS_USER: /mnt/cache/R-pkgs
|
||||||
R_VERSION: ${R_VERSION}
|
R_VERSION: ${R_VERSION}
|
||||||
CCACHE_DIR: /mnt/cache/ccache
|
CCACHE_DIR: /mnt/cache/ccache
|
||||||
# parallel make within one package build, matched to the step's CPU limit
|
|
||||||
MAKE_JOBS: 3
|
|
||||||
PLATFORM: ${OS}
|
PLATFORM: ${OS}
|
||||||
OS_ID: ${OS_ID}
|
OS_ID: ${OS_ID}
|
||||||
ARCH: ${ARCH}
|
ARCH: ${ARCH}
|
||||||
|
|
@ -188,16 +186,15 @@ steps:
|
||||||
INTERVAL: lubridate::interval(lubridate::today() - 6, lubridate::today() - 3)
|
INTERVAL: lubridate::interval(lubridate::today() - 6, lubridate::today() - 3)
|
||||||
commands:
|
commands:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- . local/compiler-cache.sh
|
|
||||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-* /mnt/cache/R-pkgs/bincraft
|
- rm -rf /mnt/cache/R-pkgs/00LOCK-* /mnt/cache/R-pkgs/bincraft
|
||||||
- mkdir -p /mnt/cache/uvr/cache /mnt/cache/uvr/packages /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
|
- mkdir -p /mnt/cache/uvr/cache /mnt/cache/uvr/packages /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres progressr lubridate
|
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
|
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
|
||||||
# rhel-10 ships xwfb-run (Xwayland) instead of xvfb-run; prefer it and start weston, else fall back to xvfb-run
|
# rhel-10 ships xwfb-run (Xwayland) instead of xvfb-run; prefer it and start weston, else fall back to xvfb-run
|
||||||
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
||||||
# options(future.globals.onReference = NULL): for some reason s3fs::file_delete() throws 'Error: Detected a non-exportable reference ('externalptr') in one of the globals ('FUN' of class 'function') used in the future expression' otherwise
|
# options(future.globals.onReference = NULL): for some reason s3fs::file_delete() throws 'Error: Detected a non-exportable reference ('externalptr') in one of the globals ('FUN' of class 'function') used in the future expression' otherwise
|
||||||
- $XVFB $XVFB_ARGS -- /opt/R/$R_VERSION/bin/R -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = 'error', repos = structure(c(getOption('repos'),INLA='https://inla.r-inla-download.org/R/stable'))); progressr::handlers('cli'); progressr::handlers(global = TRUE); options(future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = ${PROCESS_NEW}, process_removed = TRUE, patches = 'local/patches', r_minor_detection = 'classifier',s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)"
|
- $XVFB $XVFB_ARGS -- /opt/R/$R_VERSION/bin/R -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = 'error', repos = structure(c(getOption('repos'),INLA='https://inla.r-inla-download.org/R/stable'))); progressr::handlers('cli'); progressr::handlers(global = TRUE); options(future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = ${PROCESS_NEW}, process_removed = TRUE, patches = 'local/patches', r_minor_detection = 'classifier',s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)"
|
||||||
- |
|
- |
|
||||||
PRIMARY_MINOR=$(echo "$R_VERSION" | cut -d. -f1-2)
|
PRIMARY_MINOR=$(echo "$R_VERSION" | cut -d. -f1-2)
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
|
|
@ -208,22 +205,19 @@ steps:
|
||||||
LIB="/mnt/cache/R-pkgs-$RMINOR"
|
LIB="/mnt/cache/R-pkgs-$RMINOR"
|
||||||
mkdir -p "$LIB"
|
mkdir -p "$LIB"
|
||||||
R_LIBS_USER="$LIB" "$(dirname "$RBIN")/Rscript" local/install-bincraft.R || true
|
R_LIBS_USER="$LIB" "$(dirname "$RBIN")/Rscript" local/install-bincraft.R || true
|
||||||
R_LIBS_USER="$LIB" UVR_R_BIN="$RBIN" local/uvr-install.sh RPostgres lubridate || true
|
R_LIBS_USER="$LIB" UVR_R_BIN="$RBIN" local/uvr-install.sh RPostgres || true
|
||||||
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/R" -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = FALSE, process_removed = FALSE, patches = 'local/patches', r_minor_detection = 'classifier',r_minor_sensitive_only = TRUE, s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)" || true
|
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/R" -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = FALSE, process_removed = FALSE, patches = 'local/patches', r_minor_detection = 'classifier',r_minor_sensitive_only = TRUE, s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)" || true
|
||||||
# Also build current packages whose required dependency tree needs a newer R.
|
# Also build current packages whose required dependency tree needs a newer R.
|
||||||
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/Rscript" local/build-newer-r.R "$R_VERSION"
|
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/Rscript" local/build-newer-r.R "$R_VERSION"
|
||||||
done
|
done
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e 'library(bincraft); upload_package_index(codename = "${OS_ID}", s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
- /opt/R/$R_VERSION/bin/R -q -e 'library(bincraft); upload_package_index(codename = "${OS_ID}", s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
||||||
- |
|
- |
|
||||||
FAILED_MINORS=""
|
failed=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(codename = '${OS_ID}', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(codename = '${OS_ID}', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || failed="$failed $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$failed" ]; then echo "Per-minor reindex failed for:$failed" >&2; exit 1; fi
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
backend_options:
|
backend_options:
|
||||||
docker:
|
docker:
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -250,7 +244,3 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache -q bash curl
|
- apk add --no-cache -q bash curl
|
||||||
- bash scripts/purge_cdn_cache.sh "$BUNNYNET_API_KEY" "$ARCH" "$OS_ID" "$SUBDOMAIN1" "$SUBDOMAIN2" "$SUBDOMAIN3"
|
- bash scripts/purge_cdn_cache.sh "$BUNNYNET_API_KEY" "$ARCH" "$OS_ID" "$SUBDOMAIN1" "$SUBDOMAIN2" "$SUBDOMAIN3"
|
||||||
# Run it even when a per-minor re-index above failed: the generic index
|
|
||||||
# and the objects were still replaced, and a stale edge keeps them hidden.
|
|
||||||
when:
|
|
||||||
- status: [success, failure]
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,6 @@ steps:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- mkdir -p /tmp/R-pkgs
|
- mkdir -p /tmp/R-pkgs
|
||||||
- /opt/R/4.5.3/bin/Rscript local/install-bincraft.R
|
- /opt/R/4.5.3/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/4.5.3/bin/R local/uvr-install.sh RPostgres
|
|
||||||
- |
|
- |
|
||||||
set -eu
|
set -eu
|
||||||
APPLY=""
|
APPLY=""
|
||||||
|
|
@ -209,20 +208,13 @@ steps:
|
||||||
echo "Dry run: nothing was deleted, so there is nothing to re-index."
|
echo "Dry run: nothing was deleted, so there is nothing to re-index."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
# /tmp is container-local, so the library installed by the prune step is gone here.
|
|
||||||
mkdir -p /tmp/R-pkgs
|
|
||||||
/opt/R/4.5.3/bin/Rscript local/install-bincraft.R
|
|
||||||
UVR_R_BIN=/opt/R/4.5.3/bin/R local/uvr-install.sh RPostgres
|
|
||||||
/opt/R/4.5.3/bin/R -q -e 'library(bincraft); upload_package_index(s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
/opt/R/4.5.3/bin/R -q -e 'library(bincraft); upload_package_index(s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
||||||
FAILED_MINORS=""
|
failed=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/4.5.3/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/4.5.3/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || failed="$failed $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$failed" ]; then echo "Per-minor reindex failed for:$failed" >&2; exit 1; fi
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
backend_options:
|
backend_options:
|
||||||
docker:
|
docker:
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -250,7 +242,3 @@ steps:
|
||||||
fi
|
fi
|
||||||
apk add --no-cache -q bash curl jq
|
apk add --no-cache -q bash curl jq
|
||||||
bash scripts/purge_cdn_zone.sh "$BUNNYNET_API_KEY" $BUNNY_PULLZONES
|
bash scripts/purge_cdn_zone.sh "$BUNNYNET_API_KEY" $BUNNY_PULLZONES
|
||||||
# Run it even when a per-minor re-index above failed: the generic index
|
|
||||||
# and the objects were still replaced, and a stale edge keeps them hidden.
|
|
||||||
when:
|
|
||||||
- status: [success, failure]
|
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,6 @@ steps:
|
||||||
export R_LIBS_USER="$$LIB"
|
export R_LIBS_USER="$$LIB"
|
||||||
rm -rf "$$LIB"/00LOCK-*
|
rm -rf "$$LIB"/00LOCK-*
|
||||||
"$$RBIN/Rscript" local/install-bincraft.R
|
"$$RBIN/Rscript" local/install-bincraft.R
|
||||||
UVR_R_BIN="$$RBIN/R" local/uvr-install.sh RPostgres
|
|
||||||
rc=0
|
rc=0
|
||||||
for spec in $$ABI_PACKAGES; do
|
for spec in $$ABI_PACKAGES; do
|
||||||
pkg=$${spec%@*}
|
pkg=$${spec%@*}
|
||||||
|
|
|
||||||
|
|
@ -141,11 +141,12 @@ steps:
|
||||||
from_secret: PGPASS
|
from_secret: PGPASS
|
||||||
REPO_RO_TOKEN:
|
REPO_RO_TOKEN:
|
||||||
from_secret: REPO_RO_TOKEN
|
from_secret: REPO_RO_TOKEN
|
||||||
# bincraft reads the DESCRIPTION of every new or replaced tarball from
|
# uvr resolves bincraft's dependencies through the GitHub API, including
|
||||||
# the CRAN mirror on raw.githubusercontent.com, and authenticates with
|
# the pat-s/cranlike@s3 fork. Unauthenticated it is rate limited, and the
|
||||||
# this token when it is set. A slot whose published index cannot be read
|
# failure is not loud: uvr warns, falls back to the registry copy of
|
||||||
# is re-read in full, ~25k requests, which the anonymous rate limit would
|
# cranlike, and the index write then dies on `unused argument (built =
|
||||||
# cut short.
|
# built)` because upstream has no such parameter. Intermittent by nature,
|
||||||
|
# since it depends on the rate-limit window.
|
||||||
GITHUB_PAT:
|
GITHUB_PAT:
|
||||||
from_secret: GITHUB_PAT
|
from_secret: GITHUB_PAT
|
||||||
GIT_USER: pat-s
|
GIT_USER: pat-s
|
||||||
|
|
@ -158,19 +159,15 @@ steps:
|
||||||
- mkdir -p /mnt/cache/R-pkgs
|
- mkdir -p /mnt/cache/R-pkgs
|
||||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres
|
|
||||||
# The codename is detected from the image's /etc/os-release.
|
# The codename is detected from the image's /etc/os-release.
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e 'library(bincraft); upload_package_index(s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
- /opt/R/$R_VERSION/bin/R -q -e 'library(bincraft); upload_package_index(s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
||||||
- |
|
- |
|
||||||
FAILED_MINORS=""
|
failed=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || failed="$failed $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$failed" ]; then echo "Per-minor reindex failed for:$failed" >&2; exit 1; fi
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Purge CDN cache
|
- name: Purge CDN cache
|
||||||
image: reg.devxy.io/docker.io/library/alpine:3.24
|
image: reg.devxy.io/docker.io/library/alpine:3.24
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
#
|
#
|
||||||
# uvr matches the stamp's platform triple plus R minor to decide binary vs
|
# uvr matches the stamp's platform triple plus R minor to decide binary vs
|
||||||
# source, so an unusable triple turns a whole slot source-only. See
|
# source, so an unusable triple turns a whole slot source-only. See
|
||||||
# local/repair-built-stamp.R for why this patches the published PACKAGES.rds in
|
# local/repair-built-stamp.R for why this patches PACKAGES.db in place instead
|
||||||
# place instead of forcing a full reparse.
|
# of forcing a full reparse.
|
||||||
#
|
#
|
||||||
# Run with `dry_run: true` first: it reports how many entries are broken per
|
# Run with `dry_run: true` first: it reports how many entries are broken per
|
||||||
# slot and changes nothing. Pick the R version the slot should advertise, which
|
# slot and changes nothing. Pick the R version the slot should advertise, which
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,6 @@ steps:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- mkdir -p /tmp/R-pkgs
|
- mkdir -p /tmp/R-pkgs
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres
|
|
||||||
- |
|
- |
|
||||||
set -eu
|
set -eu
|
||||||
CODENAME=$(/opt/R/$R_VERSION/bin/Rscript -e 'cat(bincraft::set_codename(NULL))')
|
CODENAME=$(/opt/R/$R_VERSION/bin/Rscript -e 'cat(bincraft::set_codename(NULL))')
|
||||||
|
|
@ -159,7 +158,6 @@ steps:
|
||||||
LIB="/tmp/R-pkgs-$$RMINOR"
|
LIB="/tmp/R-pkgs-$$RMINOR"
|
||||||
mkdir -p "$$LIB"
|
mkdir -p "$$LIB"
|
||||||
R_LIBS_USER="$$LIB" "$(dirname "$$RBIN")/Rscript" local/install-bincraft.R || true
|
R_LIBS_USER="$$LIB" "$(dirname "$$RBIN")/Rscript" local/install-bincraft.R || true
|
||||||
R_LIBS_USER="$$LIB" UVR_R_BIN="$$RBIN" local/uvr-install.sh RPostgres || true
|
|
||||||
while read -r pkg ver; do
|
while read -r pkg ver; do
|
||||||
[ -z "$$pkg" ] && continue
|
[ -z "$$pkg" ] && continue
|
||||||
R_LIBS_USER="$$LIB" "$(dirname "$$RBIN")/Rscript" \
|
R_LIBS_USER="$$LIB" "$(dirname "$$RBIN")/Rscript" \
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ steps:
|
||||||
- mkdir -p /mnt/cache/packages /mnt/cache/R-pkgs
|
- mkdir -p /mnt/cache/packages /mnt/cache/R-pkgs
|
||||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres httr2 jsonlite data.table
|
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres httr2 jsonlite
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e 'source("local/weekly-missing-binaries-audit.R")'
|
- /opt/R/$R_VERSION/bin/R -q -e 'source("local/weekly-missing-binaries-audit.R")'
|
||||||
backend_options:
|
backend_options:
|
||||||
docker:
|
docker:
|
||||||
|
|
|
||||||
|
|
@ -373,8 +373,6 @@ steps:
|
||||||
R_LIBS_USER: /mnt/cache/R-pkgs
|
R_LIBS_USER: /mnt/cache/R-pkgs
|
||||||
R_VERSION: ${R_VERSION}
|
R_VERSION: ${R_VERSION}
|
||||||
CCACHE_DIR: /mnt/cache/ccache
|
CCACHE_DIR: /mnt/cache/ccache
|
||||||
# parallel make within one package build, matched to the step's CPU limit
|
|
||||||
MAKE_JOBS: 3
|
|
||||||
PLATFORM: ${OS}
|
PLATFORM: ${OS}
|
||||||
ARCH: ${ARCH}
|
ARCH: ${ARCH}
|
||||||
NCPUS: 2
|
NCPUS: 2
|
||||||
|
|
@ -386,13 +384,12 @@ steps:
|
||||||
REBUILD_BUDGET_HOURS: 20
|
REBUILD_BUDGET_HOURS: 20
|
||||||
commands:
|
commands:
|
||||||
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
|
||||||
- . local/compiler-cache.sh
|
|
||||||
- mkdir -p /mnt/cache/uvr/cache /mnt/cache/uvr/packages /mnt/cache/R-pkgs /mnt/cache/ccache /mnt/cache/packages
|
- 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-*
|
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
|
- /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")'
|
||||||
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; 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 RPostgres httr2
|
- 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")'
|
- /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
|
- $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
|
||||||
backend_options:
|
backend_options:
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
# objects in place, so the slot's index still advertises the old MD5 and, for
|
# objects in place, so the slot's index still advertises the old MD5 and, for
|
||||||
# anything that had been served from source, no Built stamp. Re-indexing from
|
# anything that had been served from source, no Built stamp. Re-indexing from
|
||||||
# inside a shard would mean three concurrent `upload_package_index()` calls on
|
# inside a shard would mean three concurrent `upload_package_index()` calls on
|
||||||
# one prefix: each lists the live bucket, so an early lister that uploads last
|
# one prefix: `cranlike::update_PACKAGES()` lists the live bucket, so an early
|
||||||
# publishes an index missing its siblings' work.
|
# lister that uploads last publishes an index missing its siblings' work.
|
||||||
#
|
#
|
||||||
# So it happens exactly once per slot, here, after every shard has finished.
|
# So it happens exactly once per slot, here, after every shard has finished.
|
||||||
# `runs_on: [success, failure]` keeps that true when a shard fails; only an
|
# `runs_on: [success, failure]` keeps that true when a shard fails; only an
|
||||||
|
|
@ -144,11 +144,12 @@ steps:
|
||||||
from_secret: PGPASS
|
from_secret: PGPASS
|
||||||
REPO_RO_TOKEN:
|
REPO_RO_TOKEN:
|
||||||
from_secret: REPO_RO_TOKEN
|
from_secret: REPO_RO_TOKEN
|
||||||
# bincraft reads the DESCRIPTION of every new or replaced tarball from
|
# uvr resolves bincraft's dependencies through the GitHub API, including
|
||||||
# the CRAN mirror on raw.githubusercontent.com, and authenticates with
|
# the pat-s/cranlike@s3 fork. Unauthenticated it is rate limited, and the
|
||||||
# this token when it is set. A slot whose published index cannot be read
|
# failure is not loud: uvr warns, falls back to the registry copy of
|
||||||
# is re-read in full, ~25k requests, which the anonymous rate limit would
|
# cranlike, and the index write then dies on `unused argument (built =
|
||||||
# cut short.
|
# built)` because upstream has no such parameter. Intermittent by nature,
|
||||||
|
# since it depends on the rate-limit window.
|
||||||
GITHUB_PAT:
|
GITHUB_PAT:
|
||||||
from_secret: GITHUB_PAT
|
from_secret: GITHUB_PAT
|
||||||
GIT_USER: pat-s
|
GIT_USER: pat-s
|
||||||
|
|
@ -161,19 +162,15 @@ steps:
|
||||||
- mkdir -p /mnt/cache/R-pkgs
|
- mkdir -p /mnt/cache/R-pkgs
|
||||||
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
- rm -rf /mnt/cache/R-pkgs/00LOCK-*
|
||||||
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
- /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R
|
||||||
- UVR_R_BIN=/opt/R/$R_VERSION/bin/R local/uvr-install.sh RPostgres
|
|
||||||
# The codename is detected from the image's /etc/os-release.
|
# The codename is detected from the image's /etc/os-release.
|
||||||
- /opt/R/$R_VERSION/bin/R -q -e 'library(bincraft); upload_package_index(s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
- /opt/R/$R_VERSION/bin/R -q -e 'library(bincraft); upload_package_index(s3_endpoint = "https://s3.eu-central-003.backblazeb2.com", s3_region = "eu-central-003", s3_bucket = "devxy-rpkgs-binaries", s3_access_key_id = Sys.getenv("B2_S3_ACCESS_KEY"), s3_secret_access_key = Sys.getenv("B2_S3_SECRET_KEY"))'
|
||||||
- |
|
- |
|
||||||
FAILED_MINORS=""
|
failed=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || failed="$failed $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$failed" ]; then echo "Per-minor reindex failed for:$failed" >&2; exit 1; fi
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Purge CDN cache
|
- name: Purge CDN cache
|
||||||
image: reg.devxy.io/docker.io/library/alpine:3.24
|
image: reg.devxy.io/docker.io/library/alpine:3.24
|
||||||
|
|
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -102,7 +102,3 @@ docs/
|
||||||
|
|
||||||
# Superpowers SDD scratch (briefs, reports, ledger)
|
# Superpowers SDD scratch (briefs, reports, ledger)
|
||||||
.superpowers/
|
.superpowers/
|
||||||
|
|
||||||
# Internal design docs (plans and specs) are kept out of the repo.
|
|
||||||
plans/
|
|
||||||
specs/
|
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,6 @@
|
||||||
ignores:
|
ignores:
|
||||||
- LICENSE.md
|
- LICENSE.md
|
||||||
- docs/superpowers/**
|
- docs/superpowers/**
|
||||||
|
# Internal design docs (specs/plans) are not user-facing reference material.
|
||||||
|
- specs/**
|
||||||
|
- plans/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,8 @@ exclude: |
|
||||||
# here. The exclusions are per-hook, not global, so `validate patch registry`
|
# here. The exclusions are per-hook, not global, so `validate patch registry`
|
||||||
# still runs when a patch changes.
|
# still runs when a patch changes.
|
||||||
repos:
|
repos:
|
||||||
- repo: builtin
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
exclude: ^local/patches/.*\.patch$
|
exclude: ^local/patches/.*\.patch$
|
||||||
|
|
@ -23,15 +24,15 @@ repos:
|
||||||
args:
|
args:
|
||||||
- --markdown-linebreak-ext=md
|
- --markdown-linebreak-ext=md
|
||||||
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
||||||
rev: v0.24.2
|
rev: v0.23.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: markdownlint-cli2
|
- id: markdownlint-cli2
|
||||||
- repo: https://github.com/rbubley/mirrors-prettier
|
- repo: https://github.com/rbubley/mirrors-prettier
|
||||||
rev: v3.10.1
|
rev: v3.9.10
|
||||||
hooks:
|
hooks:
|
||||||
- id: prettier
|
- id: prettier
|
||||||
- repo: https://github.com/posit-dev/air-pre-commit
|
- repo: https://github.com/posit-dev/air-pre-commit
|
||||||
rev: 0.13.0
|
rev: 0.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: air-format
|
- id: air-format
|
||||||
- repo: https://github.com/editorconfig-checker/editorconfig-checker
|
- repo: https://github.com/editorconfig-checker/editorconfig-checker
|
||||||
|
|
|
||||||
134
.terraform.lock.hcl
generated
134
.terraform.lock.hcl
generated
|
|
@ -2,79 +2,79 @@
|
||||||
# Manual edits may be lost in future updates.
|
# Manual edits may be lost in future updates.
|
||||||
|
|
||||||
provider "registry.opentofu.org/hashicorp/http" {
|
provider "registry.opentofu.org/hashicorp/http" {
|
||||||
version = "3.6.3"
|
version = "3.6.2"
|
||||||
hashes = [
|
hashes = [
|
||||||
"h1:4Qcn3THnwpzEH7EJvhnDYw82YM/+Fs4x5rjtaOdHIGg=",
|
"h1:7+Ewr07oLewLfoe5K7Fhy4T5JUU4y7I7iRGTG2hrzy4=",
|
||||||
"h1:DWXJhjYQ66frFZ2edx766sUWDPoPTsWcO8VeL1TQmj0=",
|
"h1:8AvJ6H30J1tgxwEoVKxe0B0Ac9XFn1gwOzidrIc+F5o=",
|
||||||
"h1:ISETodakZAv3gUBLFHm1+JpKB0vUXzOSmJGlyTvap0A=",
|
"h1:AllxtaK2m88aY+QitHui6kik/qJmBakrH5o5W7vOKI0=",
|
||||||
"h1:IWCGxH32+DkaMeH7xd1SCggVeuhKnKOlkKxlRfQnSlc=",
|
"h1:OimQGm1/9sIkdDCuUb8D5sxDorhektHeCQ337DHDfGk=",
|
||||||
"h1:JrmuoX6FTlDFJDqveHpyO0xCOyWd40BVTAEFGmwbsPI=",
|
"h1:T5zxkFXQ9To+ZysjCZu6gFqE8G1aTGh58Ol20bCk1Fc=",
|
||||||
"h1:OqnVFnmMgeKLZ0l32P80o6DdAhd2ug0nJmEcngf6u/U=",
|
"h1:TZlCCHsmKXSI3FyzmSgCU+TarKOHgiOft0wiYh85Y+E=",
|
||||||
"h1:Se19S4Etttxlm6u/fT0JbvqfsTJjNusWK5pe2Hb1Aso=",
|
"h1:VgyzPdGw1U/KU8gKhefKlIhy5kQYdpoZkpNcGiTgvVs=",
|
||||||
"h1:Sj+741LS543TKq6nf2MXCKzhzEygGgE8ptZKZhWh1N0=",
|
"h1:aF+Ztfy9m0Ll6nFOtC90NxN6WIEKAmfmVFhXAtFF8CI=",
|
||||||
"h1:T8pVs0L1oME182/NXYte0G65aOxNod8fhKd6Gi7l+04=",
|
"h1:bgViIoXF7kMXA7xgNikFYfv1D15rregO8I8Sq95sLGQ=",
|
||||||
"h1:VYtHHeZQ+jzrqFppK/eAzdj3dMXn4wPYvfWn9STSaKg=",
|
"h1:d7tCAc1wr1seWpGMBx7tpRyGKOCicvozaHvn5X8ZFfM=",
|
||||||
"h1:Xkog5MBnip5VSOe8gkMAg/s+fBSpuc2yOPtoMY78mVQ=",
|
"h1:dRCrpHH2UrkKs/lCqewyA00L0VfOCETVM14NBhyxHaM=",
|
||||||
"h1:Xoun8WNhPBF/Acv6vvBJcOtPS30rWL8bDbPBXAZkWXA=",
|
"h1:eIqaNIixQTlhmr2GU1fAFH+eVYLQIfeGw7Ec+JT/bEo=",
|
||||||
"h1:b8JSDcp7TH6fQYII+ZZSrMlyAyyP8oSA6FPLs+2Hm3g=",
|
"h1:hrK+Jzpgivi4Jo356K3LYDoeWBV1bMqKPBEqrEHwgpA=",
|
||||||
"h1:bK4m/bKTU8PjLG4G3wEdoRjqmFSB222h1ue0Jxdsp1U=",
|
"h1:mrpIAC+TK3rQQz2jllAF8o2WLMKM14/WoclLgYKc4WA=",
|
||||||
"h1:sIiP0wiUT/sXTzwxUoAcEnTgxDkWQZUspChLs/SbXI8=",
|
"h1:zwE/uNBapBDpkKa5I24moawVPTanbG+eKumHRm/qINw=",
|
||||||
"zh:0551a71cf3c063c8c4925fb3bc95e9145da6440887e8513040ea49ea1ecf61ed",
|
"zh:0cf6173a426f65a85e8baf4f9a7808dc94d0e02a82b34bc903555fda1eb45d7a",
|
||||||
"zh:19f379bb524434d05f5c917371c8d993491058cf577a6c66ebbf1b26a9924003",
|
"zh:2b5fa2b0487e692014fa86745a2a98d43f34f7aaea044acd3e2cee139627c9f1",
|
||||||
"zh:2da5794d9f33f5ba8bdc74de7422b3289f1862be7583fcd86328d28a35a533d9",
|
"zh:2c9c18893ce0f34e077559632c88237d172ac6646853bf00c84a5a4ec3b6c241",
|
||||||
"zh:3e3d463e11d3a0d1eb54d4a4936d5de42395271e00a0aa884b27f00ca98d246d",
|
"zh:316c848e892764aa10a890cf2455f52b592c6051a92ac8451955ca1d47ca1d2f",
|
||||||
"zh:476a140b360acb9ca589b7de6a5a8a379aabab4e034fd2dbf4be033c21749907",
|
"zh:4300e32ecaa967ca0ed56ca48f8dcd10796e70203bf6b8311e71dc43cd0d2aa1",
|
||||||
"zh:47f46c2a71075a414049f9c3382dad1b6a0fa3b02a67ed8b7db1e7e24dac1960",
|
"zh:4a0a555d85a31bd257399253b502ad03816ccdba7b8fbbbd1e07a313d04d83fb",
|
||||||
"zh:5845ccfc22524f8b2b76a8b790569183e70962b05f8767738edcd4a1b86c0c23",
|
"zh:6278773c31c1605c6d780fc982eacb83944e2807c8d8afe11534253b225c5aa3",
|
||||||
"zh:80b341609f5f962f709bae424860334e69e1fe6d12b9027f9c0355a1da63eb02",
|
"zh:81b73da8dbcedf54604f131e0acd7ebd36cf673276174b4b4f10af0b0f10de11",
|
||||||
"zh:94cd85fd04a0b36a8e622efc63e08c34a6ba135713dd9c7a60059af55aea6876",
|
"zh:887beaa6ef6521d3f5e2b1193d458575fb91855f36bc66dd26a10988127a39fb",
|
||||||
"zh:abee98f71480a9485f85dee138d9c120d0a0bccb77c700e03fe9585ad0538673",
|
"zh:91b2260424c5f8e5968d9e6d5bdbbdb60d61ccc4ff001aa0d637427629349c54",
|
||||||
"zh:ba330dc3fd22cb646d225b0e5e1263a1aa5493c7e880f97b22788e3702a93acd",
|
"zh:a5d9d7032d00a6dd844e8d0d374b5ae89e25f9a6635a90e01c5f65e9dd14a93e",
|
||||||
"zh:c3534ef0998dba2a3b79d4c993197ed86f1482dd451479ae8244d92cf7b3b3a9",
|
"zh:bcf8b2aca448774e4701f221b74d762847be55dc312022b4aad66da3b389bf5d",
|
||||||
"zh:d2a2d76caa8256430cae2238f91ca4d5cdb8aa50cccd0c057c97c229ae8508d5",
|
"zh:d62a3ad37ee1fb943ad0590978f4e7ee0ac064d19554c1c05ec98e9d2bb658f7",
|
||||||
"zh:ec3f1132210103816061bcff2043e852d9dc2add1857af4620f49059771e1646",
|
"zh:e517b8b81fe88bf49868923f076515b9157771d1d3a80849cc8a73b9a19039a1",
|
||||||
"zh:f3294fc74d18ada739f968b4e0b5ec65c0acb6a821c777909c6c54e3c54cf771",
|
"zh:fa9e0e39ef3e5ed2e6cf5886a0b569415ca3b89b9289fd6d01824ff11e470618",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
provider "registry.terraform.io/bunnyway/bunnynet" {
|
provider "registry.terraform.io/bunnyway/bunnynet" {
|
||||||
version = "0.20.3"
|
version = "0.19.2"
|
||||||
constraints = "~> 0.20"
|
constraints = "~> 0.19"
|
||||||
hashes = [
|
hashes = [
|
||||||
"h1:09RqUsHrSx1IZ7GZsjn5J7vxqG5jv9aTJe9qR7amJJs=",
|
"h1:1RGbDsnU2r+Fp7AVTZkPE29CIY6z/qfSzb47YnCBCTs=",
|
||||||
"h1:0HE3kahGf8gl1wWze3+wA8+oMkRnIQwdVeDmwm6LtZc=",
|
"h1:6tyZaU4EVdCFkSaCF2Rn14s29CjPfiIZzn8rEleluH4=",
|
||||||
"h1:1QQgmqEu46pDn0KR27VSQ0Bi2E87CjcNseP4JgQn8C8=",
|
"h1:9Hb0HF83T+cIl/jFyFBxVjTfSgUZHWlxFQpCcct767M=",
|
||||||
"h1:3oouE6cghziTZJ+l+udbXi03wNjH/aYKZETkQ3z9+hU=",
|
"h1:BPwOWd/UY7MNt71Gat+TApEdQtME6LojWBLR3BAGHhw=",
|
||||||
"h1:4ABuqzs2BlJu1bNHkHvd0b4NY1PmWYeqtd+32fR3Wmk=",
|
"h1:Bvg7QNBJXsniFMQfxYQvRSuZJQYl9vtrIY5k1wyuIww=",
|
||||||
"h1:5u3+Nk4DpAIuW0mDbItelbiZL5KWKcLLdh/szuXJfEM=",
|
"h1:C+Q6JJU8K0yoaXv9n1fKKTsRz92uYaPWQ/N+jxZHXNU=",
|
||||||
"h1:DC9++/g5hv8W9M3YvWn27PC/NBXbfKjtI7XbfNy4Y+Q=",
|
"h1:GExlP3x5XDYbQvPSXBq8GrWNMbWTxNP005hUnFXzIKY=",
|
||||||
"h1:DH3JLDv9oGtUxQi3eCLzUm9OILS4oBO+/T2iSu7fFAg=",
|
"h1:IyU50/IJkOjGJm1zuEH7Ui0w3//xv/V2H+lWcUWLMbM=",
|
||||||
"h1:FnFnDiIyzoroOSf6zHyejpN1bvyo9PqwfSfWm0FcThs=",
|
"h1:QooUpHtR0U8G0E2p5VThFHiHiy1YHGPnefNrNqFC1Oo=",
|
||||||
"h1:Lb95sYGHhBThec7qXeUPFyVdkM1ViDytYkA3vYtUfYo=",
|
"h1:RElSrKI43XR3coq4XGfF3AInuAS4cPphqq6NsxIeDU0=",
|
||||||
"h1:RFA0Pm6G8ZbaIrDnDrSHGXGqcfPIJJCXiWQcO83R5CE=",
|
"h1:cL/YPyl/h1ZOuJAJ49xZUO6mKes62uxWJ8esHi7vUmk=",
|
||||||
"h1:dqebzlaxgTHfPfotskbJ72Nl6ft/exl04CwR9f8Zqz8=",
|
"h1:jQYXBctHWU34H0VoIT7OULdNAgngUEsfo3HJMZIYNeE=",
|
||||||
"h1:iHUmCyzRcantigqlJYtTjFUhjt8udTpShton09isK2c=",
|
"h1:kZ5NHHgmovqTexzDrksOiAq5tdhQbQBs4SQn+nA23uk=",
|
||||||
"h1:lltTH48SIjhUY1v5TBIxp96xqC8aaiik0HoAJYUHqQM=",
|
"h1:lh4A6QWikA6duGgOT8FmdvAKigOo1CEuCFnbdcqLCQs=",
|
||||||
"h1:o09J6fw7vV/M7J/DYfVHsNUZnk8c3aYMU3p+nnpMWj8=",
|
"h1:mFkPTvdXHXiDCtRmgAlPcOPYKms4IR0/VrgI0S/tUWQ=",
|
||||||
"h1:ofBGqkMXdAtVMpmGCXoKQj6hlwsYYk1L7mvuESSxLHk=",
|
"h1:rjKiZjk7HBNKY5dQPmLI0v7JO4o0zrfXeGB/mMRlnOo=",
|
||||||
"h1:t/YBNaqpoJuMz7b+TjRdzNuwWbnGZvByAz7wUklX22M=",
|
"h1:uV5e4h8EfgFvppbg1jUfGhEK42xkluVgddbvSzjOu5o=",
|
||||||
"zh:256f3fbfbebb6383ce720001d024bf267c299a48c559d96c20f8f95262030267",
|
"zh:0f46034291455bd8382716f7c7b8a942fa3a3e652c7241c3b224573d9855c93a",
|
||||||
"zh:28dfae8191b836bad53fab92305298d6ce111c825ab6d857794e95c447c09d83",
|
"zh:10c9f68f4df54353d2c2f3ed2dbe1de970da45418fa5847d933d916ba7c27190",
|
||||||
"zh:315a6a933184bf7aed0e45bec3e820b7196bdc643bed9194a760b74ffb12fd62",
|
"zh:31e62093ea11e9c234740d02ab5b83dce15cea6e1887e8eb2090584ec58e4b7b",
|
||||||
"zh:427c563c207efc9b8805b90fcd79b200510ab8d2e5216a3ece6c44806027dfd5",
|
"zh:3656a1c51f7bf8a60584c8798040cdd9159e6d6736160e68c4e3149a45d8b80e",
|
||||||
"zh:4a71a7f161416d4c3270724c62d04f75c24d0c009b06b1d3521a0df755395d60",
|
"zh:3706d49aaae6c7be206b500505e52b1b8aa0bb6345806f421d2360d5c38368f6",
|
||||||
"zh:4edb43070df5112a58baa85bac209465f479713bd722800723bdbf7686f518d6",
|
"zh:4971a5cfa0550eac793bd4ab3fb2e50cf0afe8769a003ef7454e75ddf3c48a91",
|
||||||
"zh:533cdd87680b68c56025a9c60ca0cfc582c285136292be2dd79046126e76bc0d",
|
"zh:5d172a3f57677a37e5bd924ac1ca642125b89616fb1424146b733c73566f6138",
|
||||||
"zh:59c1a09dcd148f053ce26ed34788ca05b7307c2e8e8e1f78e6d621b93533f1bf",
|
"zh:61ab3d637a93032556e72aa602b663acfb4e957ea394877e2ea6c16da70e3a30",
|
||||||
"zh:60e1bbe4f679bf5c7565ebea38c4cbca84b578e1458d3ba92e75b31433647516",
|
"zh:6a2e646c90795a054d389c6be313da284d1347607f0a542799befde5716b01b3",
|
||||||
"zh:7621c7380f91d44727d53c238bc78c66a04cd2f8e302ae173e2f48d7558fdec6",
|
"zh:74c87f30d7b19210de708d669192228da2a29966be5c42bb8d9f4393c427902b",
|
||||||
"zh:876a61ff9b46f5092531b6808903002285952683e05625d6180acbc8f5d642b0",
|
"zh:8846d868864c384004caef674a9338115080ab9ef5c0b94242c6674f83b0b2cc",
|
||||||
"zh:8840722da44ebbf4286b1f2da6263d1f550cad2f7445d4136c98758f7adcfe79",
|
|
||||||
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
|
"zh:890df766e9b839623b1f0437355032a3c006226a6c200cd911e15ee1a9014e9f",
|
||||||
"zh:b2fd5fb60183750d6403a2411eb7a36f3a9a3fad39e9ad4c65c8536f58d54614",
|
"zh:8bbfa009c19853d1208423b720d9a0e72e0df1ae2ca261a8dfb3c597d447919c",
|
||||||
"zh:b69bdd246040e3792a87acbf963d5c3f6bb5b5513dd49b5df3d7ba629450cd79",
|
"zh:9c78b14820ef626e896dfb815bc7d2366e3476ef1ec7c148d433c424989c961d",
|
||||||
"zh:cbbd0b28082eae5585860a4cac1d19b42c9fe692caa167bec4ec0571bcf4634c",
|
"zh:cb5d42561f86cf20506d0f164d08f2dd93147d58b6359f973033117d74f3d559",
|
||||||
"zh:e08440881ef438969bab652af115e471e5645ed25b4c7e983ec6ba9cf6933505",
|
"zh:d4b68f306ff8e23a5748f70871e0a7ceaff7d2ae0f4df279db0fe519de868b8b",
|
||||||
"zh:ff7540cebcb08f8a211890dad58777d54a74649a9231b25d10751208371f2826",
|
"zh:e13d71751b65aa64b7d5460ab0626a61f33008b728178547534499c66ff29ae8",
|
||||||
|
"zh:f885b9fb40d4f8da8401b2a62525951e3b8e95b96839b3f32d42b4645df7718d",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,8 @@ Patching uses a two-tier approach:
|
||||||
The system is implemented in `bincraft`: when a package needs patching, `bincraft` pre-builds it with the patch and serves the patched binary to `pak`, ensuring transitive dependents receive the fixed package.
|
The system is implemented in `bincraft`: when a package needs patching, `bincraft` pre-builds it with the patch and serves the patched binary to `pak`, ensuring transitive dependents receive the fixed package.
|
||||||
This way, the fix cascades to all packages that depend on it.
|
This way, the fix cascades to all packages that depend on it.
|
||||||
|
|
||||||
|
For the design rationale and architecture, see `specs/2026-06-30-package-patching-design.md`.
|
||||||
|
|
||||||
## Build Environment
|
## Build Environment
|
||||||
|
|
||||||
Binaries are built on a mixed-architecture Kubernetes cluster using CI.
|
Binaries are built on a mixed-architecture Kubernetes cluster using CI.
|
||||||
|
|
@ -101,13 +103,11 @@ Preview the selection without building or accessing storage or build metadata:
|
||||||
|
|
||||||
### Creating/Updating the PACKAGES Index Files
|
### Creating/Updating the PACKAGES Index Files
|
||||||
|
|
||||||
Tools such as `tools::write_PACKAGES()` and {cranlike} only index files on a local file system.
|
Currently, the {cranlike} and {desc} packages only work with files on a local file system.
|
||||||
This is infeasible if the goal is to store binaries in S3.
|
This is infeasible if the goal is to store binaries in S3.
|
||||||
Storing binaries permanently on a disk-based file system would incur significantly higher costs, especially when operating in the cloud.
|
Storing binaries permanently on a disk-based file system would incur significantly higher costs, especially when operating in the cloud.
|
||||||
|
|
||||||
Hence, `bincraft::upload_package_index()` builds the index from a listing of the slot in S3 (through {s3fs}).
|
Hence, [{cranlike}](https://devxy.gitlab.io/r-package-binaries/bincraft/) and [{desc}](https://github.com/pat-s/desc/tree/description-from-remote) were forked to handle files in S3 (through {s3fs}).
|
||||||
Each record is read from the package's CRAN `DESCRIPTION` on the GitHub mirror of CRAN, falling back to the `DESCRIPTION` inside the tarball for a package the mirror does not have.
|
|
||||||
The previously published `PACKAGES.rds` serves as a cache, so only new or replaced tarballs are read.
|
|
||||||
|
|
||||||
### Resources
|
### Resources
|
||||||
|
|
||||||
|
|
@ -139,7 +139,6 @@ For Alpine, no rules existed until recently, establishing a foundation for semi-
|
||||||
|
|
||||||
The build metadata is stored in a PostgreSQL database.
|
The build metadata is stored in a PostgreSQL database.
|
||||||
The database has a public endpoint at `r-binaries.devxy.io` and port `15432`.
|
The database has a public endpoint at `r-binaries.devxy.io` and port `15432`.
|
||||||
It serves a Let's Encrypt certificate for that name, so connect with `sslmode=verify-full`; from R, pass `sslrootcert = bincraft::postgres_sslrootcert("verify-full")` as well, since libpq does not read the system trust store by default.
|
|
||||||
It contains one table named `single_builds`, which holds the build metadata for each package:
|
It contains one table named `single_builds`, which holds the build metadata for each package:
|
||||||
|
|
||||||
| package_name | tag | platform | error_occurred | build_timestamp | build_duration | error | size | removed |
|
| package_name | tag | platform | error_occurred | build_timestamp | build_duration | error | size | removed |
|
||||||
|
|
|
||||||
17
cdn.tf
17
cdn.tf
|
|
@ -164,23 +164,6 @@ resource "bunnynet_pullzone" "cran_rpkgs_com" {
|
||||||
|
|
||||||
add_canonical_header = true
|
add_canonical_header = true
|
||||||
|
|
||||||
# Access logs feed the public download statistics (`stats/`, published to
|
|
||||||
# `/stats/downloads.json`). Both settings were already on; declaring them
|
|
||||||
# keeps an apply from quietly switching off the only source of that data.
|
|
||||||
# Bunny keeps the logs for three days, which is why `download-stats` runs on
|
|
||||||
# a schedule. IPs stay anonymized to /24 (/64 for IPv6) at the edge.
|
|
||||||
log_enabled = true
|
|
||||||
log_anonymized = true
|
|
||||||
log_anonymized_style = "OneDigit"
|
|
||||||
|
|
||||||
# The rpkgs.com website reads `/stats/downloads.json` from the browser, so
|
|
||||||
# JSON needs the CORS header too. The rest is the zone's existing list.
|
|
||||||
cors_enabled = true
|
|
||||||
cors_extensions = [
|
|
||||||
"css", "eot", "gif", "jpeg", "jpg", "js", "json", "mp3", "mp4", "mpeg", "png", "svg", "ttf", "webm", "webp",
|
|
||||||
"woff", "woff2",
|
|
||||||
]
|
|
||||||
|
|
||||||
cache_stale = ["offline", "updating"]
|
cache_stale = ["offline", "updating"]
|
||||||
|
|
||||||
block_ips = var.cdn_block_ips
|
block_ips = var.cdn_block_ips
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue