opentofu/internal/tofu
Martin Atkins 2448204201 tofu: context.Context plumbed into the graph walk driver
Earlier commits arranged for each of our tofu.Context exported methods that
perform graph-based operations to take a context.Context from their
callers, and for the main callers in package command and package backend
to connect those contexts to the top-level context from "package main"
that can potentially have an OpenTelemetry span attached to it.

This propagates those contexts a little deeper into the guts of the
language runtime, getting it as far as the shared logic that drives a
graph walk.

The next step from here would be to change the interfaces
GraphNodeExecutable and GraphNodeDynamicExpandable so that their methods
both take a context.Context, but that would involve a big sprawling
update to every implementation of each of those interfaces and so
we'll save that for a later commit to keep this one relatively clean.

This commit also reaches the first point of ambiguity where our older
conventions call for "ctx" to be the variable name for a tofu.EvalContext
rather than a context.Context. Since "ctx context.Context" is a core idiom
in the Go community, we'll switch to using evalCtx as the variable name
for tofu.EvalContext both here and in our future commits that will
modify the two main graph walk interfaces that make extensive use of the
tofu.EvalContext interface.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2024-11-19 10:15:21 -08:00
..
testdata Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
context_apply2_test.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
context_apply_checks_test.go tofu: Context.Apply now takes a context.Context 2024-11-19 10:15:21 -08:00
context_apply_test.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
context_apply.go tofu: context.Context plumbed into the graph walk driver 2024-11-19 10:15:21 -08:00
context_eval_test.go tofu: Context.Eval now takes a context.Context 2024-11-19 10:15:21 -08:00
context_eval.go tofu: context.Context plumbed into the graph walk driver 2024-11-19 10:15:21 -08:00
context_fixtures_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
context_functions_test.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
context_functions.go Fix provider functions in child modules (#2082) 2024-10-23 10:42:38 -04:00
context_import_test.go tofu: Context.Import now takes a context.Context 2024-11-19 10:15:21 -08:00
context_import.go tofu: context.Context plumbed into the graph walk driver 2024-11-19 10:15:21 -08:00
context_input_test.go tofu: Context.Input now takes a context.Context 2024-11-19 10:15:21 -08:00
context_input.go tofu: Context.Input now takes a context.Context 2024-11-19 10:15:21 -08:00
context_plan2_test.go tofu: Context.Apply now takes a context.Context 2024-11-19 10:15:21 -08:00
context_plan_test.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
context_plan.go tofu: context.Context plumbed into the graph walk driver 2024-11-19 10:15:21 -08:00
context_plugins_test.go Cleanup ContextPlugins after function changes (#1550) 2024-04-25 07:19:15 -04:00
context_plugins.go Cleanup ContextPlugins after function changes (#1550) 2024-04-25 07:19:15 -04:00
context_refresh_test.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
context_refresh.go tofu: Context.Refresh now takes a context.Context 2024-11-19 10:15:21 -08:00
context_test.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
context_validate_test.go tofu: Context.Validate now takes a context.Context 2024-11-19 10:15:21 -08:00
context_validate.go tofu: context.Context plumbed into the graph walk driver 2024-11-19 10:15:21 -08:00
context_walk.go tofu: context.Context plumbed into the graph walk driver 2024-11-19 10:15:21 -08:00
context.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
eval_conditions.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
eval_context_builtin_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
eval_context_builtin.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
eval_context_mock.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
eval_context.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
eval_count_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
eval_import_test.go Support for_each syntax in import block (#1492) 2024-04-17 17:12:10 +03:00
eval_import.go 300/provider foreach (#1911) 2024-09-06 14:33:05 +01:00
eval_iteration.go 300/provider foreach (#1911) 2024-09-06 14:33:05 +01:00
eval_provider_test.go Partial revert of #1911, support provider for_each in aliases (#2121) 2024-11-05 06:19:52 -05:00
eval_provider.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
eval_variable_test.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
eval_variable.go Fix provider functions in child modules (#2082) 2024-10-23 10:42:38 -04:00
evaluate_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
evaluate_triggers_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
evaluate_triggers.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
evaluate_valid_test.go Integrate provider functions (#1439) 2024-04-10 08:04:08 -04:00
evaluate_valid.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
evaluate.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
execute.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
features.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
graph_builder_apply_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
graph_builder_apply.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
graph_builder_eval.go Fix provider functions in child modules (#2082) 2024-10-23 10:42:38 -04:00
graph_builder_plan_test.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
graph_builder_plan.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
graph_builder_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
graph_builder.go Only call StringWithNodeTypes for TRACE logs (#1810) 2024-07-24 13:44:20 -04:00
graph_dot_test.go Error handling fixes (#1816) 2024-07-15 11:58:43 +02:00
graph_dot.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
graph_interface_subgraph.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
graph_test.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
graph_walk_context.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
graph_walk_operation.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
graph_walk_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
graph_walk.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
graph.go tofu: context.Context plumbed into the graph walk driver 2024-11-19 10:15:21 -08:00
hook_mock.go Introduce locking on the hook mocks to avoid data race failures (#1505) 2024-04-18 08:31:11 +01:00
hook_stop_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
hook_stop.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
hook_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
hook.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
instance_expanders.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
marks_test.go Improve comparison of sensitive marks on resources, and propagate the sensitive_attributes correctly (#1640) 2024-07-09 08:42:02 -04:00
marks.go Improve comparison of sensitive marks on resources, and propagate the sensitive_attributes correctly (#1640) 2024-07-09 08:42:02 -04:00
node_check.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
node_data_destroy_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_data_destroy.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_external_reference.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
node_local_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
node_local.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
node_module_expand_test.go add override implementation for testing framework (#1499) 2024-06-06 13:20:41 +03:00
node_module_expand.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_module_variable_test.go tofu: Context.Apply now takes a context.Context 2024-11-19 10:15:21 -08:00
node_module_variable.go Fix function refs in variable validation (#2052) 2024-10-17 12:37:54 -04:00
node_output_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
node_output.go add override implementation for testing framework (#1499) 2024-06-06 13:20:41 +03:00
node_provider_abstract.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
node_provider_eval.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_provider_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_provider.go Improve log messages for providers with keys (#2152) 2024-11-07 11:56:21 -05:00
node_resource_abstract_instance_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_abstract_instance.go Fix destroy/orphan path with provider instances (#2150) 2024-11-07 12:41:13 -05:00
node_resource_abstract_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_abstract.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_apply_instance.go Fix destroy/orphan path with provider instances (#2150) 2024-11-07 12:41:13 -05:00
node_resource_apply_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_apply.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
node_resource_deposed_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_deposed.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_destroy.go Fix destroy/orphan path with provider instances (#2150) 2024-11-07 12:41:13 -05:00
node_resource_forget.go Add support for removed block (#1158) 2024-02-21 10:31:44 +02:00
node_resource_import.go Fix destroy/orphan path with provider instances (#2150) 2024-11-07 12:41:13 -05:00
node_resource_plan_destroy.go Fix destroy/orphan path with provider instances (#2150) 2024-11-07 12:41:13 -05:00
node_resource_plan_instance.go Fix destroy/orphan path with provider instances (#2150) 2024-11-07 12:41:13 -05:00
node_resource_plan_orphan_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_plan_orphan.go Fix destroy/orphan path with provider instances (#2150) 2024-11-07 12:41:13 -05:00
node_resource_plan.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_validate_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_resource_validate.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
node_root_variable_test.go Allow configured providers to provide additional functions. (#1491) 2024-04-18 15:11:38 +02:00
node_root_variable.go Assert that NodeRootVariable implements Execute (#1857) 2024-07-26 07:32:33 -04:00
node_value.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
opentf_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
phasestate_string.go Rename opentf package to tofu (#466) 2023-09-20 15:16:53 +03:00
provider_for_test_framework.go upgrade golangci-lint to v1.62 (#2174) 2024-11-18 19:56:29 +02:00
provider_mock.go Allow configured providers to provide additional functions. (#1491) 2024-04-18 15:11:38 +02:00
provisioner_mock_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
provisioner_mock.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
reduce_plan_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
reduce_plan.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
resource_provider_mock_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
schemas_test.go Cleanup ContextPlugins after function changes (#1550) 2024-04-25 07:19:15 -04:00
schemas.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
test_context_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
test_context.go Fix provider functions in child modules (#2082) 2024-10-23 10:42:38 -04:00
transform_attach_config_provider_meta.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_attach_config_provider.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_attach_config_resource_test.go add automated copyright header check (#1696) 2024-06-03 16:49:36 +03:00
transform_attach_config_resource.go Improve performance of AttachResourceConfigTransformer on big graphs (#1558) 2024-04-29 11:36:54 -04:00
transform_attach_schema.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_attach_state.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_check_starter.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_check.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_config_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_config.go add override implementation for testing framework (#1499) 2024-06-06 13:20:41 +03:00
transform_destroy_cbd_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
transform_destroy_cbd.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
transform_destroy_edge_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
transform_destroy_edge.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
transform_diff_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_diff.go Add support for removed block (#1158) 2024-02-21 10:31:44 +02:00
transform_expand.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_external_reference.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_import_state_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
transform_local.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_module_expansion_test.go Improve ModuleExpansionTransformer performance (#1809) 2024-07-29 15:55:37 -04:00
transform_module_expansion.go Improve ModuleExpansionTransformer performance (#1809) 2024-07-29 15:55:37 -04:00
transform_module_variable_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_module_variable.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_orphan_count_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
transform_orphan_count.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_orphan_output.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_orphan_resource_test.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
transform_orphan_resource.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_output.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_provider_test.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
transform_provider.go Implement Provider for_each (#2105) 2024-11-05 18:08:23 -05:00
transform_provisioner.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_reference_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_reference.go chore: fix some function names (#2108) 2024-10-29 12:07:10 +02:00
transform_removed_modules.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_resource_count.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_root_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_root.go add override implementation for testing framework (#1499) 2024-06-06 13:20:41 +03:00
transform_state.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_targets_test.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
transform_targets.go Add exclude flag support (#1900) 2024-11-05 10:16:00 -05:00
transform_transitive_reduction_test.go Integrate provider functions (#1439) 2024-04-10 08:04:08 -04:00
transform_transitive_reduction.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_variable.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_vertex_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform_vertex.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
transform.go Only call StringWithNodeTypes for TRACE logs (#1810) 2024-07-24 13:44:20 -04:00
ui_input_mock.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_input_prefix_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_input_prefix.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
ui_output_callback_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_output_callback.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_output_mock_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_output_mock.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_output_provisioner_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_output_provisioner.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
ui_output.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
update_state_hook_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
update_state_hook.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
upgrade_resource_state_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
upgrade_resource_state.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
util_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
util.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
validate_selfref_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
validate_selfref.go Fix typos (#1905) 2024-08-29 13:20:33 -04:00
valuesourcetype_string.go Rename opentf package to tofu (#466) 2023-09-20 15:16:53 +03:00
variables_test.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
variables.go Another batch of minor typos (#1953) 2024-09-09 07:51:39 -04:00
version_required.go Update copyright notice (#1232) 2024-02-08 09:48:59 +00:00
walkoperation_string.go Rename opentf package to tofu (#466) 2023-09-20 15:16:53 +03:00