numaflow
numaflow copied to clipboard
fix: create buffers and buckets before updating Vertices
Fixes #2083
I simply swapped 1. the Job creation to occur prior to 2. the creation/deletion/Update of the Vertex CRs.
Previously the creation of the Jobs was dependent on the Vertex specs (newBuffers and newBuckets are calculated based on Vertex specs).
So if there's a transient error that occurs after or in the middle of creating/updating the Vertex CRs, the next reconciliation will incorrectly calculate the Jobs it needs to perform, as some or all of the Vertex specs have changed.