opentofu/internal
Martin Atkins 3d5039f1f3 tofu: Context.Plan now takes a context.Context
This continues our ongoing effort to get a coherent chain of
context.Context all the way from "package main" to all of our calls to
external components.

Context.Plan does not yet do anything with its new context, but this gets
the context plumbed in enough that we should be able to pass values like
telemetry spans all the way from the top-level in future.

OpenTofu has some historical situational private uses of context.Context
to handle the graceful shutdown behaviors. Those use context.Context as
a private implementation detail rather than public API, and so this commit
leaves them as-is and adds a new "primary context" alongside. Hopefully
in future refactoring we can simplify this to use the primary context also
as the primary cancellation signal, but that's too risky a change to bundle
in with this otherwise-mostly-harmless context plumbing.

All of the _test.go file updates here are purely mechanical additions of
the extra argument. No test is materially modified by this change, which
is intentional to get some assurance that isn't a breaking change.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2024-11-19 10:15:21 -08:00
..
addrs Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
backend tofu: Context.Plan now takes a context.Context 2024-11-19 10:15:21 -08:00
builtin Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
checks Fix typos (#1905) 2024-08-29 13:20:33 -04:00
cloud Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
cloudplugin Error handling fixes (#1816) 2024-07-15 11:58:43 +02:00
collections add automated copyright header check (#1696) 2024-06-03 16:49:36 +03:00
command tofu: Context.Plan now takes a context.Context 2024-11-19 10:15:21 -08:00
communicator chore: fix some function names (#1957) 2024-09-16 13:36:15 -04:00
configs Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
copy CopyDir cmd code refactoring suggestions (#2070) 2024-11-04 21:21:06 +02:00
dag Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
depsfile Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
didyoumean Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
e2e Add support for GOCOVERDIR to e2e tests (#1622) 2024-05-07 15:22:35 -04:00
encryption upgrade golangci-lint to v1.62 (#2174) 2024-11-18 19:56:29 +02:00
experiments Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
genconfig Ensure config generation does not crash when importing sensitive values (#2077) 2024-10-23 15:32:48 +01:00
getmodules Fix typos (#1905) 2024-08-29 13:20:33 -04:00
getproviders Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
grpcwrap Update to tfplugin proto 5.5 and 6.5 (#1435) 2024-03-26 14:36:26 -04:00
helper/slowmessage Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
httpclient issue 966: different user agent for unit tests (#1279) 2024-02-22 08:45:06 +00:00
initwd initwd: Commentary on version constraint parsing compromises 2024-11-06 11:10:52 -08:00
instances Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ipaddr Fix typos (#1954) 2024-09-17 12:04:30 +02:00
lang Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
legacy Fix typos (#1954) 2024-09-17 12:04:30 +02:00
logging Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
modsdir initwd Windows tests fixes (#1723) 2024-06-18 10:49:30 -04:00
moduletest Adds warning if tests don't provide valid variable (#2057) 2024-10-15 09:20:11 +01:00
plans Use Equal instead of address strings (#2172) 2024-11-18 09:53:19 +01:00
plugin Partially unknown provider functions arguments fixed (#2127) 2024-11-04 14:23:53 -05:00
plugin6 Partially unknown provider functions arguments fixed (#2127) 2024-11-04 14:23:53 -05:00
provider-simple Allow configured providers to provide additional functions. (#1491) 2024-04-18 15:11:38 +02:00
provider-simple-v6 Allow configured providers to provide additional functions. (#1491) 2024-04-18 15:11:38 +02:00
providercache Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
providers Partially unknown provider functions arguments fixed (#2127) 2024-11-04 14:23:53 -05:00
provisioner-local-exec/main Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
provisioners Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
refactoring Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
registry Fallback to reading the x-terraform-get header if the module registry returns an empty json body (#2079) 2024-10-23 15:33:56 +01:00
repl Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
replacefile Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
states Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
terminal Fix typos (#1905) 2024-08-29 13:20:33 -04:00
tfdiags Warning and Error consolidation CLI options (#1894) 2024-09-23 07:31:06 -04:00
tfplugin5 Fix typos (#1905) 2024-08-29 13:20:33 -04:00
tfplugin6 Fix typos (#1905) 2024-08-29 13:20:33 -04:00
tofu tofu: Context.Plan now takes a context.Context 2024-11-19 10:15:21 -08:00
tofumigrate Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00