Provide deadlines or cancelations for all uses of context.Context
#600
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
priority/important-soon
Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
/kind feature
Describe the solution you'd like
An iteration of a reconcile loop should be bounded by a default deadline. In other words, a single execution of reconcile in a controller should not be able to run indefinitely.
As of today, there are several code paths where
context.TODO()
is used for a context. This context provides no ability to cancel or bound execution on those code paths. Some of these code paths will need to have a context piped in through functions up the call stack, and may have more widespread impact to function signatures.Examples:
cluster-api-provider-azure/exp/cloud/scope/machinepool.go
Lines 151 to 152 in 4d682a1
cluster-api-provider-azure/cloud/scope/machine.go
Line 214 in 4afe3c2
cluster-api-provider-azure/cloud/scope/cluster.go
Line 162 in 4778ca5
cluster-api-provider-azure/controllers/azuremachine_controller.go
Line 75 in 4afe3c2
TODOs:
context.TODO
and replace with bounded contextsSee Also
The text was updated successfully, but these errors were encountered: