numaproj / numaplane

Control Plane for Numaproj
Apache License 2.0
4 stars 3 forks source link

fix: avoid error on status update #62

Closed afugazzotto closed 1 week ago

afugazzotto commented 1 week ago

Fixes #61

Modifications

Implemented RetryOnConflict to get the latest version of the resource and update it's status with the status of the in-memory object modified during reconciliation.

Verification

Running unit tests multiple times will no longer show the error mentioned in the issue.

afugazzotto commented 1 week ago

I tested a version of our code without performing any updates to the rollout objects nor updating the in-memory objects and the error was still showing up. The code was simply reading the rollout CR, create the child resource, and issue rollout status update (with no changes to it). There may be a different solution to solve this issue given the above observations.