feat(local): aggregate blocked-on-dependency reporting by dependency
With cascade detection live, a run surfaced ~30 root-cause dependencies, but the "blocked on a dependency" list repeated the same dependency once per fingerprint group (rstan x4, lpsymphony x4, salso x2, ...), burying the priority. Aggregate across all groups by the dependency each dependent waits on: expose `blocked_map` (package -> dependency) from build_triage_report, and add `blocked_by_dependency()` which dedupes dependents and ranks dependencies by how many they block. One line per dependency, sorted by impact, in the proposer and tracker (log + issue). Replaces the per-group `blocked_summary`.
This commit is contained in:
parent
118a92889f
commit
1b57d45c80
1 changed files with 68 additions and 39 deletions
|
|
@ -146,20 +146,35 @@ test_that("unclassified_summary ranks unknown groups and caps output", {
|
|||
expect_identical(capped$dropped_groups, 1L)
|
||||
})
|
||||
|
||||
test_that("blocked_summary lists each dependency and its dependent count", {
|
||||
test_that("blocked_by_dependency aggregates across groups, deduped and ranked", {
|
||||
# RcppParallel dependents split across platforms/fingerprints -> separate
|
||||
# groups, but one aggregated line; a dependent seen twice is counted once.
|
||||
failures <- data.frame(
|
||||
name = c("ACEsimFit", "AovBay", "AdaptGauss"),
|
||||
platform = "ubuntu-2604",
|
||||
name = c("ACEsimFit", "AovBay", "AdaptGauss", "ACEsimFit", "loner"),
|
||||
platform = c(
|
||||
"ubuntu-2604",
|
||||
"ubuntu-2604",
|
||||
"alpine-324",
|
||||
"alpine-324",
|
||||
"ubuntu-2604"
|
||||
),
|
||||
arch = "amd64",
|
||||
error_text = "Error: USE_TBB=Linux is not supported on this toolchain",
|
||||
error_text = c(
|
||||
rep("Error: USE_TBB=Linux is not supported on this toolchain", 4L),
|
||||
"Failed to build source package rstan.\nfatal error: tbb/tbb_stddef.h"
|
||||
),
|
||||
stringsAsFactors = FALSE
|
||||
)
|
||||
report <- build_triage_report(failures, registered_pkgs = character(0L))
|
||||
b <- blocked_summary(report, max_pkgs = 2L)
|
||||
expect_length(b, 1L)
|
||||
expect_identical(b[[1L]]$blocked_on, "RcppParallel")
|
||||
expect_identical(b[[1L]]$n_packages, 3L)
|
||||
expect_true(b[[1L]]$packages_truncated)
|
||||
agg <- blocked_by_dependency(report, max_pkgs = 2L)
|
||||
deps <- vapply(agg, function(b) b$dependency, character(1L))
|
||||
expect_true("RcppParallel" %in% deps && "rstan" %in% deps)
|
||||
rcpp <- Filter(function(b) b$dependency == "RcppParallel", agg)[[1L]]
|
||||
# ACEsimFit appears in two groups -> counted once (3 distinct dependents).
|
||||
expect_identical(rcpp$n_packages, 3L)
|
||||
expect_true(rcpp$packages_truncated) # capped at max_pkgs = 2
|
||||
# Ranked by dependent count: RcppParallel (3) before rstan (1).
|
||||
expect_identical(deps[[1L]], "RcppParallel")
|
||||
})
|
||||
|
||||
test_that("entry_applies_to_os matches codename, family, and wildcard", {
|
||||
|
|
|
|||
Loading…
Reference in a new issue