CI: stop rebuilding rserve on every PR run; pin R deps to a CRAN snapshot#849
Merged
Conversation
install_and_verify pins the packages it names, but their dependencies resolved from live CRAN. A mid-day CRAN publish on 2026-07-16 (ggrepel requiring ggplot2 >= 3.5.2/gtable >= 0.3.6) broke rserve image rebuilds that had passed hours earlier, plus transient cloud.r-project.org download failures. Resolve everything from the 2026-07-15 snapshot: same inputs every build until the date is bumped deliberately. The __linux__/jammy path serves prebuilt binaries for the base image (Ubuntu 22.04 + R 4.4) - install_packages.R drops from ~480s to ~100s - with the plain source snapshot as fallback. Verified locally: docker build of docker/R completes, 13/13 packages install and load. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every docker job rebuilt the rserve image from scratch: BuildKit (Docker 28 default) does not use pulled images as layer cache, so the docker-compose pull that used to make the build a cache no-op under the classic builder stopped helping. That cost ~10 min per run and exposed every PR to CRAN availability (see 2026-07-16 failure on #845's run). - PR runs build only web unless the PR changes docker/R (two-commit tree diff against the fetched base tip - works on the shallow merge-ref clone; any fetch/diff failure falls back to building everything). The pulled nrel/openstudio-rserve:latest, kept fresh by docker-upload on develop/master pushes, backs the stack instead - push runs still build everything (docker-upload deploys those images) - compose build config gains cache_from + BUILDKIT_INLINE_CACHE so images pushed from develop carry layer-cache metadata and can seed the builds that do still happen Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #847's CI work, prompted by the docker-job failure on #845's re-run (2026-07-16 ~19:03Z): the rserve image rebuild died in
Rscript install_packages.Ron transientcloud.r-project.orgdownload failures plus mid-day CRAN version drift (ggplot2 3.5.1 found, but >= 3.5.2 is required by 'ggrepel';gtable 0.3.5 loaded, but >= 0.3.6 required). The same rebuild had passed 2.5h earlier — nothing in the PR was at fault.Why every run rebuilt rserve
BuildKit (default since Docker 23, runners have 28) does not use pulled images as layer cache, so the
docker-compose pullbeforebuild— the original caching mechanism under the classic builder — stopped helping. Every docker job replayed the full R install (~10 min) against live CRAN.Changes
docker/R/**(two-commit tree diff against the fetched base tip, so it works on the shallow merge-ref clone; any fetch/diff failure falls back to building everything). The stack uses the pullednrel/openstudio-rserve:latest, whichdocker-uploadkeeps fresh on develop/master pushes. Push runs still build everything since those images get deployed.cache_from+BUILDKIT_INLINE_CACHEon all built services, so images pushed from develop carry layer-cache metadata and can seed the builds that do still happen.2026-07-15) instead of live CRAN —install_and_verifypinned its named packages but their dependencies floated, which is exactly what broke. The__linux__/jammypath serves prebuilt binaries for the base image (Ubuntu 22.04 + R 4.4):install_packages.Rdrops from ~480s to ~100s. Bump the snapshot date deliberately to take newer packages.Testing
docker build docker/Rwith the snapshot: completes, 13/13 packages install and pass their load check, R-install layer 102s (was 482s in CI).docker/R/**, so its own docker job exercises the "PR changed docker/R → rebuild" path end-to-end, including the snapshot install in CI.docker compose configvalidates; build args string-quoted for docker-compose 1.29's schema.🤖 Generated with Claude Code