fix(build-all): exclude previously-errored versions in prefilter #113
1 changed files with 6 additions and 3 deletions
|
|
@ -64,10 +64,13 @@ sprintf("# of package versions for this job: %s", nrow(chunk))
|
|||
exclude <- jsonlite::fromJSON("local/excluded-packages.json")[["package"]]
|
||||
chunk <- chunk[!chunk$Package %in% exclude, ]
|
||||
|
||||
# Skip package versions already built in a previous run.
|
||||
# Skip package versions already attempted in a previous run (built or errored).
|
||||
# pkgs_to_build.rds is a static snapshot from the install-deps step, so on a
|
||||
# restart it still lists everything an interrupted run already produced. The
|
||||
# metadata DB reflects that progress, so we re-derive the remaining set here.
|
||||
# We exclude *all* attempted versions, not just successful ones: a previously
|
||||
# errored version is skipped by build_binary_package() anyway, so leaving it in
|
||||
# the chunk only makes the job cycle through it one-by-one for no benefit.
|
||||
# Derive platform + arch from the running container, mirroring the codename ->
|
||||
# platform mapping bincraft uses internally. The OS/OS_VERSION selectors are
|
||||
# workflow-level CI variables that are not injected into the container
|
||||
|
|
@ -104,13 +107,13 @@ con <- DBI::dbConnect(
|
|||
)
|
||||
built <- DBI::dbGetQuery(
|
||||
con,
|
||||
"SELECT name, tag FROM single_builds WHERE platform = $1 AND arch = $2 AND error_occurred = FALSE",
|
||||
"SELECT name, tag FROM single_builds WHERE platform = $1 AND arch = $2",
|
||||
params = list(platform, arch)
|
||||
)
|
||||
DBI::dbDisconnect(con)
|
||||
before <- nrow(chunk)
|
||||
chunk <- chunk[!paste(chunk$Package, chunk$Version) %in% paste(built$name, built$tag), ]
|
||||
sprintf("Skipped %d already-built package versions; %d remaining for this job", before - nrow(chunk), nrow(chunk))
|
||||
sprintf("Skipped %d already-attempted package versions; %d remaining for this job", before - nrow(chunk), nrow(chunk))
|
||||
|
||||
# Read pre-computed S3 listing from install-deps step
|
||||
# This avoids loading s3fs/reticulate/Python in the build container,
|
||||
|
|
|
|||
Loading…
Reference in a new issue