fix(build-all): exclude previously-errored versions in prefilter #113

Merged
pat-s merged 1 commit from fix/prefilter-errored-versions into main 2026-07-13 09:28:46 +00:00
Owner

Motivation

Build jobs were cycling through hundreds of packages that were only ever printed as Skipping … due to previous build error recorded in metadata DB, wasting wall-clock on per-package preparation before dropping each one.

Cause

The prefilter query in local/build-all.R selected only successfully-built versions (error_occurred = FALSE) into built, so line 112 removed only those from the chunk.
Every previously-errored version stayed in the work list and was walked one-by-one, each hitting the internal skip in build_binary_package().
This also explains the misleading Skipped 0 already-built package versions line for alphabetical chunks whose leading packages only have error records.

Changes

  • local/build-all.R: drop the AND error_occurred = FALSE clause so built holds every version already attempted (built or errored) for this platform/arch; the existing filter then removes all of them up front.
  • Rename the log line to already-attempted so the reported count reflects successes and errors.
  • Update the surrounding comment to explain why errored versions are excluded.

Behaviour change

Previously-errored versions are now dropped before the build loop instead of being iterated and individually skipped.
No package that would otherwise build is affected, build_binary_package() already skipped these internally.
Retrying errored versions is out of scope and would need a separate opt-in flag on both the prefilter and the in-loop skip.

## Motivation Build jobs were cycling through hundreds of packages that were only ever printed as `Skipping … due to previous build error recorded in metadata DB`, wasting wall-clock on per-package preparation before dropping each one. ## Cause The prefilter query in `local/build-all.R` selected only successfully-built versions (`error_occurred = FALSE`) into `built`, so line 112 removed only those from the chunk. Every previously-errored version stayed in the work list and was walked one-by-one, each hitting the internal skip in `build_binary_package()`. This also explains the misleading `Skipped 0 already-built package versions` line for alphabetical chunks whose leading packages only have error records. ## Changes - `local/build-all.R`: drop the `AND error_occurred = FALSE` clause so `built` holds every version already attempted (built or errored) for this platform/arch; the existing filter then removes all of them up front. - Rename the log line to `already-attempted` so the reported count reflects successes and errors. - Update the surrounding comment to explain why errored versions are excluded. ## Behaviour change Previously-errored versions are now dropped before the build loop instead of being iterated and individually skipped. No package that would otherwise build is affected, `build_binary_package()` already skipped these internally. Retrying errored versions is out of scope and would need a separate opt-in flag on both the prefilter and the in-loop skip.
Prefilter query only removed successfully-built versions
(error_occurred = FALSE), so every previously-errored version stayed in
the chunk and was walked one-by-one, each hitting the internal skip in
build_binary_package(). Drop the error clause so all attempted versions
are filtered out up front, and rename the log to already-attempted so
the count is no longer misleadingly 0.
pat-s merged commit ffc2319558 into main 2026-07-13 09:28:46 +00:00
pat-s deleted branch fix/prefilter-errored-versions 2026-07-13 09:28:46 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
devxy/build-cran-binaries!113
No description provided.