opentofu/internal/command
Martin Atkins 1134f19467 tofu: Context.Apply 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.Apply 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
..
arguments Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
cliconfig Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
clistate Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
e2etest Handle static variable secret flag (#2045) 2024-10-03 10:46:58 -04:00
format Warning and Error consolidation CLI options (#1894) 2024-09-23 07:31:06 -04:00
jsonchecks Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
jsonconfig Fix typos (#1905) 2024-08-29 13:20:33 -04:00
jsonformat Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
jsonfunction Integrate provider functions (#1439) 2024-04-10 08:04:08 -04:00
jsonplan Fixes: show insensitive plan details when resource in set with sensitive value (#1313) 2024-06-20 14:06:33 -04:00
jsonprovider Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
jsonstate Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
testdata test: ensure test vars are not used in tf plan (#2128) 2024-11-12 17:23:54 +02:00
testing Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
views Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
webbrowser Fix typos (#1905) 2024-08-29 13:20:33 -04:00
workdir Fix typos (#1905) 2024-08-29 13:20:33 -04:00
alias.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
apply_destroy_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
apply_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
apply.go command: Meta.RunOperation takes a context.Context 2024-11-19 10:15:21 -08:00
autocomplete_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
autocomplete.go Remove encryption diags from autocomplete (#1793) 2024-07-10 10:07:11 -04:00
cli_ui_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
cli_ui.go Fix struct names (#1494) 2024-04-25 08:15:46 +02:00
cloud.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
command_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
command.go Better var file type detection (#1881) 2024-08-02 07:29:40 -04:00
console_interactive_test.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
console_interactive.go Fix exit command in console interactive mode (#2086) 2024-10-29 12:13:44 +02:00
console_state_test.go Adds multi line support to console (#1875) 2024-08-02 10:21:44 +01:00
console_state.go Adds multi line support to console (#1875) 2024-08-02 10:21:44 +01:00
console_test.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
console.go Warning and Error consolidation CLI options (#1894) 2024-09-23 07:31:06 -04:00
flag_kv_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
flag_kv.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
fmt_test.go Include .tofu in tofu fmt (#1790) 2024-07-10 09:06:08 -04:00
fmt.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
get_test.go Add test cases for GetCommand to cover invalid args scenarios (#1940) 2024-09-27 10:22:47 -04:00
get.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
graph_test.go Fix tofu validate with static variables (#1788) 2024-07-11 10:16:20 -04:00
graph.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
helper.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
hook_module_install.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
import_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
import.go Warning and Error consolidation CLI options (#1894) 2024-09-23 07:31:06 -04:00
init_test.go Adds prompt for missing static variables (#2047) 2024-10-07 18:30:42 +01:00
init.go Warning and Error consolidation CLI options (#1894) 2024-09-23 07:31:06 -04:00
login_test.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
login.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
logout_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
logout.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta_backend_migrate_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta_backend_migrate.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
meta_backend_test.go Fix regression of backend reinit detection when backend schema has required arguments (#2119) 2024-11-04 14:23:32 -05:00
meta_backend.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
meta_config.go Adds prompt for missing static variables (#2047) 2024-10-07 18:30:42 +01:00
meta_dependencies.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
meta_encryption.go Fix plan static variable injection (#1771) 2024-07-09 07:17:45 -04:00
meta_new.go Initial wiring of encryption through the command package (#1316) 2024-03-07 08:55:57 -05:00
meta_providers.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
meta_ui.go add automated copyright header check (#1696) 2024-06-03 16:49:36 +03:00
meta_vars_test.go Better var file type detection (#1881) 2024-08-02 07:29:40 -04:00
meta_vars.go Adds prompt for missing static variables (#2047) 2024-10-07 18:30:42 +01:00
meta.go command: Meta.RunOperation takes a context.Context 2024-11-19 10:15:21 -08:00
metadata_command.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
metadata_functions_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
metadata_functions.go Integrate provider functions (#1439) 2024-04-10 08:04:08 -04:00
output_test.go Add -show-sensitive flag to tofu plan, apply, state-show and output commands (#1554) 2024-07-22 10:58:57 +01:00
output.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
plan_test.go test: ensure test vars are not used in tf plan (#2128) 2024-11-12 17:23:54 +02:00
plan.go command: Meta.RunOperation takes a context.Context 2024-11-19 10:15:21 -08:00
plugins_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
plugins.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
providers_lock_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
providers_lock.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
providers_mirror_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
providers_mirror.go Prevents providers mirror from crashing with bad lock file (#1985) 2024-09-25 09:01:17 -04:00
providers_schema_test.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
providers_schema.go Add missing [options] to help text where applicable (#1855) 2024-07-24 09:27:07 -04:00
providers_test.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
providers.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
push.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
refresh_test.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
refresh.go command: Meta.RunOperation takes a context.Context 2024-11-19 10:15:21 -08:00
show_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
show.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
state_command.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
state_list_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
state_list.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_meta.go Error handling fixes (#1816) 2024-07-15 11:58:43 +02:00
state_mv_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_mv.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_pull_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
state_pull.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_push_test.go Integrate Encryption into State Backends (#1288) 2024-03-04 09:25:14 -05:00
state_push.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_replace_provider_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_replace_provider.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_rm_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_rm.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
state_show_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_show.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
state_test.go Initial wiring of encryption through the command package (#1316) 2024-03-07 08:55:57 -05:00
taint_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
taint.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
telemetry.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
test_test.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
test.go tofu: Context.Apply now takes a context.Context 2024-11-19 10:15:21 -08:00
ui_input_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_input.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
unlock_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
unlock.go bug: add error handling for missing state lock config in S3, HTTP and OSS backends (#1977) 2024-09-20 18:29:36 +02:00
untaint_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
untaint.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
validate_test.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
validate.go Warning and Error consolidation CLI options (#1894) 2024-09-23 07:31:06 -04:00
version_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
version.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
workspace_command_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
workspace_command.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
workspace_delete.go Add missing [options] to help text where applicable (#1855) 2024-07-24 09:27:07 -04:00
workspace_list.go Add missing [options] to help text where applicable (#1855) 2024-07-24 09:27:07 -04:00
workspace_new.go Update help text for static variable support (#1804) 2024-07-11 11:00:18 -04:00
workspace_select.go Add missing [options] to help text where applicable (#1855) 2024-07-24 09:27:07 -04:00
workspace_show.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00