depot: report sweep progress to stderr instead of discarding it (#35)
Sweep prints `probed N/M` every 1000 blobs, but every caller passed `io.Discard`, so a full ~71k-blob verify ran ~56 minutes with zero output and looked hung in CI (sow-assets-manifest run 245). `go test ./internal/depot` passes; verified live against the cdn (progress lines now appear on stderr). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: vickydotbat <vickydotbat@tutamail.com> Reviewed-on: #35 Co-authored-by: gitea-bot <gitea-bot@noreply.git.westgate.pw> Co-committed-by: gitea-bot <gitea-bot@noreply.git.westgate.pw>
This commit is contained in:
@@ -143,7 +143,7 @@ func runStatus(args []string, stdout, stderr io.Writer, getenv func(string) stri
|
|||||||
}
|
}
|
||||||
shas := shaKeys(shaSizes)
|
shas := shaKeys(shaSizes)
|
||||||
|
|
||||||
res, err := Sweep(context.Background(), backend, shas, cfg, io.Discard)
|
res, err := Sweep(context.Background(), backend, shas, cfg, stderr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(stderr, "depot status:", err)
|
fmt.Fprintln(stderr, "depot status:", err)
|
||||||
return exitInternal
|
return exitInternal
|
||||||
@@ -185,7 +185,7 @@ func runPush(args []string, stdout, stderr io.Writer, getenv func(string) string
|
|||||||
}
|
}
|
||||||
shas := shaKeys(shaSizes)
|
shas := shaKeys(shaSizes)
|
||||||
|
|
||||||
res, err := Sweep(context.Background(), backend, shas, cfg, io.Discard)
|
res, err := Sweep(context.Background(), backend, shas, cfg, stderr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(stderr, "depot push:", err)
|
fmt.Fprintln(stderr, "depot push:", err)
|
||||||
return exitInternal
|
return exitInternal
|
||||||
@@ -266,7 +266,7 @@ func runVerify(args []string, stdout, stderr io.Writer, getenv func(string) stri
|
|||||||
}
|
}
|
||||||
shas := shaKeys(shaSizes)
|
shas := shaKeys(shaSizes)
|
||||||
|
|
||||||
res, err := Sweep(context.Background(), backend, shas, cfg, io.Discard)
|
res, err := Sweep(context.Background(), backend, shas, cfg, stderr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(stderr, "depot verify:", err)
|
fmt.Fprintln(stderr, "depot verify:", err)
|
||||||
return exitInternal
|
return exitInternal
|
||||||
@@ -389,7 +389,7 @@ func runPull(args []string, stdout, stderr io.Writer, getenv func(string) string
|
|||||||
|
|
||||||
// Sweep the source to distinguish "not there" (exit 1, listed) from
|
// Sweep the source to distinguish "not there" (exit 1, listed) from
|
||||||
// "there, download it".
|
// "there, download it".
|
||||||
res, err := Sweep(context.Background(), backend, toCheck, cfg, io.Discard)
|
res, err := Sweep(context.Background(), backend, toCheck, cfg, stderr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(stderr, "depot pull:", err)
|
fmt.Fprintln(stderr, "depot pull:", err)
|
||||||
return exitInternal
|
return exitInternal
|
||||||
|
|||||||
Reference in New Issue
Block a user