In the vast majority of production code, Contexts have been plumbed to most log messages and db operations.
There are a few one-off areas we still have work to do in; but in general, if you find yourself using context.Background()
or context.TODO()
in non-testing code, please take a look around and see if there is an easy way to get a context from whatever server component you are working in. As a rough rule, it’s probably a red flag if you are adding the only Background/TODO
context in the file you are modifying
Feel free to ask questions and/or CC me on PRs.
Thanks,
Radu