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

prevent cycles when connecting destroy nodes #31857

Merged
merged 1 commit into from Sep 26, 2022
Merged

Commits on Sep 26, 2022

  1. prevent cycles when connecting destroy nodes

    When adding destroy edges between resources from different providers,
    and a provider itself depends on the other provider's resources, we can
    get cycles in the final dependency graph.
    
    The problem is a little deeper than simply not connecting these nodes,
    since the edges are still needed when doing a full destroy operation.
    For now we can get by assuming the edges are required, and reverting
    them only if they result in a cycle. This works because destroy edges
    are the last edges added to managed resources during graph building.
    
    This was rarely a problem before v1.3, because noop nodes were not added
    to the apply graph, and unused values were aggressively pruned. In v1.3
    however all nodes are kept in the graph so that postcondition blocks are
    always evaluated during apply, increasing the chances of the cycles
    appearing.
    jbardin committed Sep 26, 2022
    Copy the full SHA
    ce02344 View commit details
    Browse the repository at this point in the history