fix(build): keep source fallbacks out of the S3 package cache #159
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/cache-excludes-source-fallback"
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?
Problem
This is the gap flagged in rpkgs/bincraft#106.
build_binary_package()has a fast path that compares againsts3_package_cacheinstead of querying S3 per package, and that cache is produced here:A raw bucket listing cannot tell a binary from a package whose build failed and was published as its CRAN source — the two occupy the same key. So every source fallback reads as "already built" and is skipped for good. That is how
alpine324accumulated ~13.5k of them.The same listing feeds
s3_dt, which is subtracted from the build list at line 194 (pkgs <- pkgs_no_error[!s3_dt]). That one matters more: it excludes the very packages that need building, beforebuild_binary_package()is even called.What this changes
Drops from the listing every object the slot's own index reports as served from source. bincraft leaves the
Builtstamp off exactly those records (rpkgs/bincraft#105), so the index already carries the answer and no credentials, downloads or extra API calls are needed.Both consumers are fixed: the saved cache and
s3_dt.The cache stays a plain filename vector, so the build container still needs no
s3fs/reticulate — that was the point of saving it in the first place.Two deliberately conservative edges:
Verification
The script parses, and the new block run against the live indices:
alpine324is re-indexed by bincraft 5.1.1, so 13 542 objects drop out and those packages become buildable.noblehas not been re-indexed yet, so every record still carriesBuilt, nothing is dropped, and its behaviour is exactly what it is today — the safe failure mode this relies on.The new log line makes it visible per run:
Sequencing
Needs rpkgs/bincraft#106 (and a release) before a rebuild actually builds: this fixes the bulk build path's list, #106 fixes the per-package pre-build skip.