Commit Graph

69 Commits

Author SHA1 Message Date
James Bardin
1b530b7d9d remove unused 2020-12-02 13:59:18 -05:00
James Bardin
f1657bb3e3 update some graph builder tests
Reduce the graphs, as they are too ungainly to compare without
reduction. We also depend on reduction in all use cases, so we should be
testing the graph as we use it anyway.
2018-10-16 19:14:11 -07:00
Martin Atkins
5e8938de98 core: Remove GraphWalkerPanicwrap, etc
These are some remnants of the shadow graph functionality that was added
to support the graph builder changes in v0.8, but that has since been
removed and so there are no remaining callers for these types and
functions.
2018-10-16 18:48:28 -07:00
Mitchell Hashimoto
755cef98b0
terraform: remove ConnectDependents and related interfaces 2017-02-03 14:25:54 +01:00
Mitchell Hashimoto
e9f6c9c429
terraform: run destroy provisioners on destroy 2017-01-20 18:07:51 -08:00
Mitchell Hashimoto
817a593280
terraform: destroy edges should take into account module variables
Fixes #10729

Destruction ordering wasn't taking into account ordering implied through
variables across module boundaries.

This is because to build the destruction ordering we create a
non-destruction graph to determine the _creation_ ordering (to properly
flip edges). This creation graph we create wasn't including module
variables. This PR adds that transform to the graph.
2016-12-14 21:48:09 -08:00
Mitchell Hashimoto
da508d6a8b
terraform: GraphWalkerPanicwrap catches panics during graph walks 2016-11-03 12:08:55 -07:00
Paul Hinze
52c4bfbe98 core: fix deadlock when dependable node replaced with non-dependable one
In #2884, Terraform would hang on graphs with an orphaned resource
depended on an orphaned module.

This is because orphan module nodes (which are dependable) were getting
expanded (replaced) with GraphNodeBasicSubgraph nodes (which are _not_
dependable).

The old `graph.Replace()` code resulted in GraphNodeBasicSubgraph being
entered into the lookaside table, even though it is not dependable.

This resulted in an untraversable edge in the graph, so the graph would
hang and wait forever.

Now, we remove entries from the lookaside table when a dependable node
is being replaced with a non-dependable node. This means we lose an
edge, but we can move forward. It's ~probably~ never correct to be
replacing depenable nodes with non-dependable ones, but this tweak
seemed preferable to tossing a panic in there.
2015-08-10 15:50:36 -05:00
Mitchell Hashimoto
8bf725e746 terraform: GraphNodeDependent 2015-02-19 12:07:53 -08:00
Mitchell Hashimoto
cb4e364aca terraform: more tests 2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
3820aea513 terraform: make adding config nodes a transformer 2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
c18825800b terraform: rename graph to graph_old*.go 2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
659f0db8cf terraform: Graph => GraphOld 2015-02-19 12:07:52 -08:00
Mitchell Hashimoto
71918efd96 terraform: Add more tests for cases we felt weren't well covered 2014-12-16 15:59:26 -08:00
Armon Dadgar
56a34087ba terraform: test orphan dependency inversion 2014-11-24 15:42:58 -08:00
Armon Dadgar
5376e05add terraform: test encoding module dependencies 2014-11-24 15:25:37 -08:00
Armon Dadgar
6af820f78b terraform: test graph with orphan module dependencies 2014-11-24 15:22:37 -08:00
Armon Dadgar
3bdaccdf5d terraform: testing the destroy order of modules 2014-11-24 14:58:52 -08:00
Mitchell Hashimoto
06889b8fc7 terraform: make sure taint destroys happen first for counts 2014-10-12 09:50:36 -07:00
Mitchell Hashimoto
7af9179edd terraform: remove old test 2014-10-12 09:45:01 -07:00
Mitchell Hashimoto
f74a27d75f terraform: provisioner dependencies are reflected in graph 2014-10-12 09:15:26 -07:00
Mitchell Hashimoto
d4d58ae44b terraform: turn resource expand into graph 2014-10-12 08:57:08 -07:00
Mitchell Hashimoto
129e4fc453 terraform: fix crash if depends_on used when state has orphans 2014-10-11 13:20:11 -07:00
Mitchell Hashimoto
36f225dea0 fmt 2014-10-10 14:50:35 -07:00
Mitchell Hashimoto
039531e9ca terraform: dependencies in the graph from count properly show up 2014-10-02 13:54:04 -07:00
Mitchell Hashimoto
4fe0c4ada4 terraform: don't use Meta node anymore 2014-10-01 18:06:25 -07:00
Armon Dadgar
9a6c8490a0 terraform: Updating tests for modules 2014-09-29 15:27:56 -07:00
Armon Dadgar
4fe05428b3 terraform: Avoid having multiple primaries 2014-09-29 15:20:03 -07:00
Armon Dadgar
f398708be2 terraform: Adding flag for CreateBeforeDestroy 2014-09-29 15:20:03 -07:00
Armon Dadgar
aef7718778 terraform: support create-before-destroy 2014-09-29 15:20:02 -07:00
Mitchell Hashimoto
2ac6c127bc terraform: orphans should properly depend on modules 2014-09-26 10:03:10 -07:00
Mitchell Hashimoto
4782e31e9d terraform: properly encode module dependencies in state 2014-09-26 09:38:53 -07:00
Mitchell Hashimoto
1fa3840a00 terraform: handle module dependencies with a diff 2014-09-26 09:20:01 -07:00
Mitchell Hashimoto
6904c131a7 terraform: test that unused providers are pruned 2014-09-24 16:02:42 -07:00
Mitchell Hashimoto
1f1563c95b terraform: provider inheritence is functional 2014-09-24 13:58:07 -07:00
Mitchell Hashimoto
8dbc7e0ccb terraform: change the graph a bit to better support providers with
modules

This doesn't cause inheritence to work yet. That is coming
2014-09-24 13:31:35 -07:00
Mitchell Hashimoto
6b2781d77c terraform: module orphans 2014-09-23 14:57:17 -07:00
Mitchell Hashimoto
d443202b31 terraform: fix copying dependencies 2014-09-23 14:20:26 -07:00
Mitchell Hashimoto
b1a583e3de terraform: plan with modules work 2014-09-23 14:15:40 -07:00
Mitchell Hashimoto
bc67e7c443 terraform: diff is split down into modules 2014-09-23 11:43:21 -07:00
Mitchell Hashimoto
a6f792b3aa terraform: update graph to build subgraphs for modules 2014-09-22 16:48:18 -07:00
Mitchell Hashimoto
a32833af2c terraform: Graph, Context, Plan all speak modules 2014-09-22 15:37:29 -07:00
Mitchell Hashimoto
1d106d3fa4 terraform: modules are put into the graph 2014-09-22 15:11:57 -07:00
Mitchell Hashimoto
73e2a43427 terraform: don't put the ResourceState in Resource 2014-09-21 22:08:21 -07:00
Mitchell Hashimoto
f89c2c5ff0 terraform: graph tainted resources into the graph 2014-09-19 21:29:48 -06:00
Armon Dadgar
5ef46b797b terraform: fixing dependency handling for orphans 2014-09-18 15:39:53 -07:00
Armon Dadgar
b2188d7fe8 terraform: properly handle diff generation with meta resources 2014-09-18 14:31:27 -07:00
Armon Dadgar
a9c4b523db terraform: Encode dependencies of ResourceMeta ndoes 2014-09-18 11:22:40 -07:00
Armon Dadgar
d61f199d6f terraform: test dependency encoding 2014-09-18 11:12:39 -07:00
Mitchell Hashimoto
7a2591190b terraform: fix graph test 2014-09-17 17:52:24 -07:00