fix(build): scope the already-attempted skip to the running R minor
single_builds records r_version per attempt, but the skip query ignored it and matched on platform and arch alone. A non-primary pass therefore skipped every package the primary pass had already attempted under a different minor: build-all.R --sensitive-only under R 4.6 skipped packages that had only ever been built for 4.5, so the per-minor slots never filled and the backlog could not be worked off by rebuilding. That is why amd64/resolute serves a 4.6 client 22322 packages against the 4.5 slot's 26346, and why the run intended to close that gap reported 'Skipped 2334 already-attempted package versions; 59 remaining'. Matching on the major.minor prefix rather than the full string keeps a patch bump (4.6.0 -> 4.6.1) from re-attempting the whole catalogue.
This commit is contained in:
parent
448349d075
commit
b5b6221b80
1 changed files with 19 additions and 3 deletions
|
|
@ -110,10 +110,25 @@ con <- DBI::dbConnect(
|
|||
password = Sys.getenv("PGPASS"),
|
||||
sslmode = "require"
|
||||
)
|
||||
# Scope the skip to the R minor this pass is running under. `single_builds`
|
||||
# records `r_version` per attempt, but querying without it made a non-primary
|
||||
# pass skip everything the primary pass had already attempted under a different
|
||||
# minor - so `--sensitive-only` under 4.6 skipped packages that had only ever
|
||||
# been built for 4.5, and the per-minor slots never filled. That is why
|
||||
# amd64/resolute served 4000 fewer packages to a 4.6 client than to a 4.5 one.
|
||||
r_minor <- paste(
|
||||
R.version$major,
|
||||
strsplit(R.version$minor, ".", fixed = TRUE)[[1L]][1L],
|
||||
sep = "."
|
||||
)
|
||||
built <- DBI::dbGetQuery(
|
||||
con,
|
||||
"SELECT name, tag FROM single_builds WHERE platform = $1 AND arch = $2",
|
||||
params = list(platform, arch)
|
||||
paste(
|
||||
"SELECT name, tag FROM single_builds",
|
||||
"WHERE platform = $1 AND arch = $2",
|
||||
"AND substring(r_version from '^[0-9]+[.][0-9]+') = $3"
|
||||
),
|
||||
params = list(platform, arch, r_minor)
|
||||
)
|
||||
DBI::dbDisconnect(con)
|
||||
before <- nrow(chunk)
|
||||
|
|
@ -121,8 +136,9 @@ chunk <- chunk[
|
|||
!paste(chunk$Package, chunk$Version) %in% paste(built$name, built$tag),
|
||||
]
|
||||
sprintf(
|
||||
"Skipped %d already-attempted package versions; %d remaining for this job",
|
||||
"Skipped %d package versions already attempted under R %s; %d remaining for this job",
|
||||
before - nrow(chunk),
|
||||
r_minor,
|
||||
nrow(chunk)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue