Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(peering): Capture the source execution BEFORE the source stage du…
…ring peering (#3467) It's important that we capture the executions BEFORE we capture their stages becuase we use the execution's `updated_at` for our diff calculation. Before this change, it was possible to see a peered execution that was `SUCCEEDED` but a stage within that execution still showing as `RUNNING`. This happens becuase we would grab the stages from the source DB, persist them to the dest DB (this can take some time) and only then we would grab the executions and persist those. But in this flow our peer could have updated the stage in the time between we capture stages and capture the execution and we would forever miss that update (if the execution was completed now) It's totally fine for the stages to be "newer" than their execution since that will be fixed up in the next agent run Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information