opentofu/internal
Martin Atkins 4bc1696fd1 core: Simplify our idea of "root node" and require it for DynamicExpand
The graph walking mechanism is specified as requiring a graph with a single
root, which in practice means there's exactly one node in the graph
which doesn't have any dependencies.

However, we previously weren't verifying that invariant is true for
subgraphs returned from DynamicExpand. It was working anyway, but it's not
ideal to be relying on a behavior that isn't guaranteed by our underlying
infrastructure.

We also previously had the RootTransformer being a bit clever and trying
to avoid adding a new node if there is already only a single graph with
no dependencies. That special case isn't particularly valuable since
there's no harm in turning a one-node graph into a two-node graph with
an explicit separate root node, and doing that allows us to assume that
the root node is always present and is always exactly terraform.rootNode.

Many existing DynamicExpand implementations were not producing valid
graphs and were previously getting away with it. All of them now produce
properly-rooted graphs that should pass validation, and we will guarantee
that with an explicit check of the DynamicExpand return value before we
try to walk that subgraph. For good measure we also verify that the root
node is exactly terraform.rootNode, even though that isn't strictly
required by our graph walker, just to help us catch potential future bugs
where a DynamicExpand implementation neglects to add our singleton root
node.
2022-10-13 14:01:08 -07:00
..
addrs addrs: ModuleSourceRemote.String correctly handles query string in URL 2022-08-31 09:13:24 -07:00
backend Add Private Service Connect endpoint support to GCS backend (#31967) 2022-10-11 18:57:09 +01:00
builtin add simple error indicating backend removal 2022-06-28 13:58:22 -04:00
checks core: Propagate check results accurately from plan to apply 2022-08-26 15:47:29 -07:00
cloud Add tests for cloud backend taskStage 2022-09-21 09:40:52 +08:00
command redact sensitive output values in run logs 2022-09-22 13:47:47 -04:00
communicator communicator/ssh: Fix crash using SSH+HTTP proxy 2022-05-03 08:24:59 -04:00
configs Do not apply type defaults to null values 2022-09-15 15:32:36 -04:00
copy test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
dag Clarify some comments in internal/dag 2022-10-06 15:10:33 -07:00
depsfile Ignore existing package hashes for providers lock command (#31389) 2022-07-20 13:27:24 +01:00
didyoumean didyoumean: move from "helper" to "internal" 2020-10-02 13:35:07 -07:00
e2e test: use T.TempDir to create temporary test directory (#30803) 2022-04-08 17:34:16 +01:00
earlyconfig tfdiags: Expose the "extra information" concept from HCL 2022-06-23 13:52:23 -07:00
experiments build: Use Go 1.19 2022-08-22 10:59:12 -07:00
getmodules add XTerraformGetLimit to prevent redirect loops 2022-06-01 12:46:22 -04:00
getproviders build: Use Go 1.19 2022-08-22 10:59:12 -07:00
grpcwrap s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
helper/slowmessage remove wrapped streams and readline 2021-10-28 11:51:39 -04:00
httpclient backend/azurerm: removing ADAL support 2022-05-18 16:56:10 +02:00
initwd expand module subdir globs 2022-08-17 16:27:58 -04:00
instances InstancesForModule should not panic 2021-12-17 13:31:41 -05:00
ipaddr build: Use Go 1.19 2022-08-22 10:59:12 -07:00
lang lang/funcs: "timecmp" function 2022-08-25 10:15:42 -07:00
legacy build: Use Go 1.19 2022-08-22 10:59:12 -07:00
logging cleanup panic output 2021-12-17 11:57:52 -05:00
modsdir Refactoring of module source addresses and module installation 2021-06-03 08:50:34 -07:00
moduledeps Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
moduletest fixup broken test fixtures 2022-07-06 13:47:35 -04:00
plans plans: indicate when resource deleted due to move (#31695) 2022-08-30 18:01:29 +01:00
plugin s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
plugin6 s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
provider-simple s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
provider-simple-v6 s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
provider-terraform/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
providercache providercache: Improve installation error message (#31898) 2022-09-29 13:37:04 +01:00
providers s/Capabilities/ServerCapabilities/ 2022-07-06 13:47:35 -04:00
provisioner-local-exec/main Move plugin/ and plugin6/ to internal/plugin{,6}/ 2021-05-17 14:09:07 -07:00
provisioners Move configs/ to internal/configs/ 2021-05-17 14:09:07 -07:00
refactoring allow cross-package move statements (#31556) 2022-08-16 16:52:57 +02:00
registry revert "run goimports" 2022-08-01 16:26:26 -05:00
repl lang: Further limit the console-only type function 2022-02-10 06:12:58 -05:00
replacefile Upgrade to Go 1.17 2021-08-17 15:20:05 -07:00
states Merge pull request #31698 from hashicorp/megan_tf563 2022-08-30 18:10:45 -05:00
terminal remove the use of panicwrap 2021-10-28 11:51:39 -04:00
terraform core: Simplify our idea of "root node" and require it for DynamicExpand 2022-10-13 14:01:08 -07:00
tfdiags build: Use Go 1.19 2022-08-22 10:59:12 -07:00
tfplugin5 docs/plugin-protocol: Add notes about missing configuration in ReadResource and UpgradeResourceState request messages (#31998) 2022-10-13 16:29:34 -04:00
tfplugin6 docs/plugin-protocol: Add notes about missing configuration in ReadResource and UpgradeResourceState request messages (#31998) 2022-10-13 16:29:34 -04:00