In order to test whether we need to update our Pipeline or ISBService based on the Rollout spec, we need to compare it with the one we get back from Kubernetes API Get() call. After the Pipeline or ISBService is created and reconciled, this value is the one that Numaflow Controller would have written back when it did an Update() as part of adding the Finalizer. Since Numaflow Controller would Unmarshal the JSON into a Pipelinestruct and then Marshal it back into JSON to do the Update, this means that empty values can get written in.
Previously, I was only ignoring these empty values:
reference=nil
map=empty
slice=empty
But I also need to ignore empty string, numeric = 0, and bool=false.
Modifications
In order to test whether we need to update our Pipeline or ISBService based on the Rollout spec, we need to compare it with the one we get back from Kubernetes API Get() call. After the Pipeline or ISBService is created and reconciled, this value is the one that Numaflow Controller would have written back when it did an Update() as part of adding the Finalizer. Since Numaflow Controller would Unmarshal the JSON into a
Pipeline
struct and then Marshal it back into JSON to do the Update, this means that empty values can get written in.Previously, I was only ignoring these empty values:
But I also need to ignore empty string, numeric = 0, and bool=false.
(This issue was noticed while testing)
Verification
unit test