Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unrolling saga actions for external IPs and NICs #1474

Merged
merged 2 commits into from
Jul 22, 2022

Commits on Jul 21, 2022

  1. 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.
    bnaecker committed Jul 21, 2022
    Configuration menu
    Copy the full SHA
    0b873fd View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2022

  1. 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.
    bnaecker committed Jul 22, 2022
    Configuration menu
    Copy the full SHA
    e96ba07 View commit details
    Browse the repository at this point in the history