Skip to content

don't connect module closers to destroy nodes#26186

Merged
jbardin merged 1 commit intomasterfrom
jbardin/cbd-module-dep
Sep 9, 2020
Merged

don't connect module closers to destroy nodes#26186
jbardin merged 1 commit intomasterfrom
jbardin/cbd-module-dep

Conversation

@jbardin
Copy link
Copy Markdown
Member

@jbardin jbardin commented Sep 9, 2020

One of the tenets of the graph transformations is that resource destroy
nodes can only be ordered relative to other resources, and can't be
referenced directly. This was broken by the module close node which
naively connected to all nodes within the module, creating cycles in some
cases when edges are reversed from CreateBeforeDestroy.

Fixes #26166

One of the tenants of the graph transformations is that resource destroy
nodes can only be ordered relative to other resources, and can't be
referenced directly. This was broken by the module close node which
naively connected to all module nodes, creating cycles in some cases
when edges are reversed from CreateBeforeDestroy.
@jbardin jbardin requested a review from a team September 9, 2020 16:36
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 9, 2020

Codecov Report

Merging #26186 into master will decrease coverage by 0.02%.
The diff coverage is 35.13%.

Impacted Files Coverage Δ
terraform/graph.go 80.76% <0.00%> (-14.89%) ⬇️
terraform/graph_walk.go 14.28% <0.00%> (-23.22%) ⬇️
terraform/graph_walk_context.go 77.50% <0.00%> (-16.44%) ⬇️
terraform/transform_module_expansion.go 93.33% <92.85%> (+0.35%) ⬆️

Copy link
Copy Markdown
Contributor

@mildwonkey mildwonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll have to do some digging, I think there are a number of issues open at this point that this can close!

ModuleCall: modCall,
}
var v dag.Vertex = n
var expander dag.Vertex = n
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate this clearer variable name!

@jbardin jbardin merged commit b8b6cae into master Sep 9, 2020
@jbardin jbardin deleted the jbardin/cbd-module-dep branch September 9, 2020 18:16
@jbardin jbardin mentioned this pull request Sep 9, 2020
@Nuru
Copy link
Copy Markdown

Nuru commented Sep 12, 2020

@jbardin wrote:

One of the tenants of the graph transformations...

I'm confused. Did you mean tenets?

@jbardin
Copy link
Copy Markdown
Member Author

jbardin commented Sep 14, 2020

@Nuru, sorry, that was a typo. Thanks

@ghost
Copy link
Copy Markdown

ghost commented Oct 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cycle error when using create_before_destroy with depends_on referencing a module

3 participants