Skip to content

fix(byohctl): Make Ctrl+C actually work: take a context from the cobra command - #227

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

fix(byohctl): Make Ctrl+C actually work: take a context from the cobra command#227
indradhanush merged 1 commit into
mainfrom
dg/context-todo-byohctl

Conversation

@indradhanush

@indradhanush indradhanush commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Every API call built its own context.TODO, so nothing the CLI did could be
interrupted. The wait for a ByoHost's machineRef to clear was the worst of it:
a bare sleep loop that ignored Ctrl-C for up to its full timeout of 5 seconds.

Thread cmd.Context() down from each command. The wait loop now selects on
cancellation instead of sleeping through it.

@indradhanush
indradhanush force-pushed the dg/context-todo-byohctl branch from cd3d79c to b424332 Compare August 20, 2026 22:20
@sebastian-pf9 sebastian-pf9 changed the title fix(byohctl): take a context from the cobra command fix(byohctl): Make Ctrl+C actually work: take a context from the cobra command Aug 21, 2026
@indradhanush
indradhanush force-pushed the dg/context-todo-byohctl branch 2 times, most recently from 040330e to f532d20 Compare August 21, 2026 11:36
@indradhanush
indradhanush marked this pull request as ready for review August 21, 2026 11:36
@indradhanush
indradhanush force-pushed the dg/context-todo-byohctl branch from f532d20 to 2fc1e66 Compare August 21, 2026 12:13
Base automatically changed from dg/context-todo-agent to main August 21, 2026 12:50
Every API call built its own context.TODO, so nothing the CLI did could be
interrupted. The wait for a ByoHost's machineRef to clear was the worst of it:
a bare sleep loop that ignored Ctrl-C for up to its full timeout.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@indradhanush
indradhanush force-pushed the dg/context-todo-byohctl branch from 2fc1e66 to df3c043 Compare August 21, 2026 12:50
@indradhanush
indradhanush merged commit 678c889 into main Aug 21, 2026
13 of 15 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