cockroachdb / cockroachdb/cockroach

cli: make context in cli commands cancelable

Open
#95,080 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

CLI commands talking to the cluster require a cancelable context to create a grpc client. Currently individual commands just create a cancellable context as needed, but it would be more consistent to inject cancellable context in:
https://github.com/cockroachdb/cockroach/blob/93511965459f96fb590b8c6e688f35423b962c5c/pkg/cli/cli.go#L300
using ExecuteContext and remove customized contexts in favour of cmd.Context() in places like
https://github.com/cockroachdb/cockroach/blob/8ae602660d16be76331c6705b748eb3ba7799cb0/pkg/cli/debug.go#L976

Jira issue: CRDB-23312

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.