(list any, res []string, replaceMap map[string]string)
| 452 | |
| 453 | // deferred so the copy errors below cannot skip it: a partial count on an |
| 454 | // aborted cycle beats a stale full one, and the point of the gauge is that it |
| 455 | // keeps moving. Every reason is written every cycle, zero included, so a |
| 456 | // cleared condition reads as cleared rather than staying at its last value |
| 457 | defer func() { |
| 458 | for reason, n := range kept { |
| 459 | buildManager.metrics.waitingUnmovable.WithLabelValues(fullRepo, reason).Set(float64(n)) |
| 460 | } |
| 461 | }() |
| 462 | |
| 463 | for _, file := range pkgFiles { |
| 464 | pkg := Package(file) |
| 465 | dbPkg, err := pkg.DBPackageIsolated(ctx, march, repo, db) |
| 466 | if err != nil { |
| 467 | switch moveDisposition(err, pkg.IsDebug()) { |
| 468 | case dispDebug: |
| 469 | if err := storeDebugPackage(pkg, march); err != nil { |
| 470 | return err |
| 471 | } |
| 472 | debugPkgs++ |
| 473 | discardPackage(file) |
| 474 | continue |
| 475 | case dispResolve: |
| 476 | // a stale row still claims this pkgname; ask the archive who owns it |
| 477 | dbPkg, err = resolveOwner(ctx, pkg, march, repo, db) |
| 478 | if err != nil { |
no test coverage detected