-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
Description
The project uses context.TODO() extensively because no proper context is implemented in some scope methods. This is an accepted solution for a simplified use of contexts in testing code and we can keep this unchanged, but it should be fixed in any non-test files as this context configuration is essentially a placeholder that will never time out.
A quick search shows that this should be addressed in the following files:
cloud/scope/machine.gocloud/scope/cluster.gocloud/scope/managedcluster.gocloud/scope/managedcontrolplane.gocloud/scope/managedmachinepool.go
I may have missed other occurrences of this syntax
One possible solution is to pass contexts as a scope method parameter:
func (s *ClusterScope) PatchObject(ctx context.Context) error {
...
}This solution is aligned with other CAPI projects, i.e. CAPZ
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.