Skip to content

fix(main): Make Ctrl+C actually work: Do not use context.TODO in setup controllers - #222

Merged
indradhanush merged 1 commit into
mainfrom
dg/context-todo-main
Aug 21, 2026
Merged

fix(main): Make Ctrl+C actually work: Do not use context.TODO in setup controllers#222
indradhanush merged 1 commit into
mainfrom
dg/context-todo-main

Conversation

@indradhanush

Copy link
Copy Markdown
Collaborator

Today with context.TODO, controllers will not cleanly exit when the
parent context of the manager is canceled. Instead pass parent's ctx.

More follow up work required to remove context.TODO() from rest of the
codebase.

This is a bigger change so an isolated PR is important.

Also, refactor main so that we can unit test it.

@indradhanush
indradhanush requested review from a team and sebastian-pf9 August 20, 2026 19:12
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 26.38889% with 53 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
main.go 26.38% 50 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@sebastian-pf9 sebastian-pf9 changed the title fix(main): Do not use context.TODO in setup controllers fix(main): Make Ctrl+C actually work: Do not use context.TODO in setup controllers Aug 21, 2026
Today with context.TODO, controllers will not cleanly exit when the
parent context of the manager is canceled. Instead pass parent's ctx.

More follow up work required to remove context.TODO() from rest of the
codebase.

This is a bigger change so an isolated PR is important.

Also, refactor main so that we can unit test it.
@indradhanush
indradhanush merged commit 75b04a6 into main Aug 21, 2026
16 of 18 checks passed
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.

2 participants