fix: recompute package snapshot when missing from cache #95
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/recompute-missing-package-snapshot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
build-all.Rreads three snapshot files from/mnt/cache/packages/that thebuild-all-versions-install-depsstep precomputes:pkgs_to_build.rds,r_minor_sensitive_pkgs.rds, ands3_cache.rds.That cache volume is per-agent, so a build job scheduled on a different (fresh) agent than the one that ran install-deps finds the snapshot absent and dies at
readRDS(cannot open compressed file '/mnt/cache/packages/pkgs_to_build.rds').This adds a conditional guard at the top of
build-all.R: when any of the three files is missing, it sourceslocal/packages-to-build.R(which has all needed creds viaPGPASS/B2_S3_*env, already present in the build step) and writes the derived.rdsfiles — exactly mirroring the install-deps command.file.rename, so a concurrent reader never sees a half-written.rds.