Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unrolling saga actions for external IPs and NICs (#1474)
* Unrolling saga actions for external IPs and NICs Previously, for NICs and external IPs, the saga action that actually created the records and the corresponding undo were not together in a saga node. The undo was associated with a preceding action that created UUIDs for the records. That was because each action may have created multiple records, where the count was not known when we create the saga template, and so the forward action performed multiple fallible steps. To unwind it completely, including reverting the creation of N resources, in the case where the N + 1th failed, we put the undo in the preceding step. That worked, but was certainly confusing and bad for maintenance, since the action and its undo were in different nodes. It also resulted in a ton of extra complexity in some of the downstream queries, which now had to be aware of the fact that we might replay a partially-played saga node. This commit undoes all that. - Unroll the instance external IP address query - Unroll the network interface creation query - Actually delete NICs when we delete the instance, and add test for that - Simplify network interface query. An additional CTE detecting the partial-saga replay case is no longer needed, since we don't run the saga that way. * Review feedback - Create UUIDs in separate saga actions for NICs and external IPs - Remove remaining cruft from NIC-creation query that was required to handle the previous saga implementation.
- Loading branch information