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

don't connect module closers to destroy nodes #26186

Merged
merged 1 commit into from Sep 9, 2020
Merged

Conversation

jbardin
Copy link
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

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
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!

@@ -84,17 +89,17 @@ func (t *ModuleExpansionTransformer) transform(g *Graph, c *configs.Config, pare
Config: c.Module,
ModuleCall: modCall,
}
var v dag.Vertex = n
var expander dag.Vertex = n
Copy link
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

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
Member Author

jbardin commented Sep 14, 2020

@Nuru, sorry, that was a typo. Thanks

@ghost
Copy link

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.

@hashicorp hashicorp 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