Notebooks 2.0 // Controller // Replace reflect.DeepEqual
with equality.Semantic.DeepEqual
#69
Labels
area/controller
area - related to controller components
kind/enhancement
kind - new features or changes
project/notebooks-v2
project - kubeflow notebooks v2
Milestone
What's the problem?
We currently use
reflect.DeepEqual
to do a lot of comparisons in the Notebooks 2.0 controller.As a result of this, we have to take special care when comparing Kubernetes API objects for a number of reasons:
nil
map is not equal to an empty mapnil
slice is not equal to an empty sliceTherefore, we need to use helper method like
NormalizePodConfigSpec
and other cases to handle this complexity.What am I proposing?
We can replace this complexity by using Kubernetes built in API object semantic comparison:
Next Steps
reflect.DeepEqual
withequality.Semantic.DeepEqual
The text was updated successfully, but these errors were encountered: