Skip to content

Add context cancellation and error aggregation to blink runner - #191

Merged
TomasVotruba merged 1 commit into
mainfrom
blink-runner-context
Oct 9, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
blink-runner-context

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Robustness improvements to the runner. The CLI now stops cleanly on interrupt and reports every failing file instead of just the first.

  • runner.Run takes a context.Context and stops feeding files once it is cancelled; in-flight files finish, then workers drain. main wires the context to SIGINT/SIGTERM via signal.NotifyContext, so Ctrl-C ends a run without a torn write.
  • File errors from all workers are collected and returned with errors.Join, replacing the previous sync.Once/firstErr that kept only the first error and silently dropped the rest.
  • Added a runner test for the cancellation path.

Independent of the quick-win cleanup PR; both touch runner.go imports, so one will need a trivial rebase after the other merges.

Run now takes a context and stops feeding files when it is cancelled, so
the CLI can be interrupted cleanly (main wires it to SIGINT/SIGTERM).
File errors from all workers are collected and returned with errors.Join
instead of keeping only the first and dropping the rest.
@TomasVotruba
TomasVotruba enabled auto-merge (squash) October 9, 2026 19:24
@TomasVotruba
TomasVotruba merged commit 5338637 into main Oct 9, 2026
21 checks passed
@TomasVotruba
TomasVotruba deleted the blink-runner-context branch October 9, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant