Keep batch notification failures out of report counts

This commit is contained in:
2026-08-01 21:54:53 +00:00
parent bf1746a756
commit 76cd399c76
5 changed files with 96 additions and 13 deletions

View File

@@ -40,10 +40,11 @@ Options:
`
type Runner struct {
Clock timeutil.Clock
ExecutorFactory ExecutorFactory
Version string
WorkingDir string
Clock timeutil.Clock
ExecutorFactory ExecutorFactory
Version string
WorkingDir string
runBatchDetailed func(context.Context, app.BatchRequest) (*app.BatchResult, error)
}
func Run(ctx context.Context, args []string, stdout io.Writer, stderr io.Writer) error {
@@ -89,7 +90,11 @@ func (r Runner) Run(ctx context.Context, args []string, stdout io.Writer, stderr
if err != nil {
return err
}
result, err := app.RunBatchDetailed(ctx, req)
runBatchDetailed := r.runBatchDetailed
if runBatchDetailed == nil {
runBatchDetailed = app.RunBatchDetailed
}
result, err := runBatchDetailed(ctx, req)
if result != nil {
summary := newBatchSummary(result)
if encodeErr := writeActionResult(stdout, stderr, summary, outputOptions{Quiet: opts.Quiet}, func(w io.Writer) {