terraform/internal/stacks/stackruntime
Martin Atkins 7d2d4dec5e stackeval: When being destroyed, component instance result comes from plan
Because we treat dependency edges as reversed when a component instance
is being destroyed, the final result (an object representing output values)
for a component instance being destroyed must not depend on anything else
in the evaluation graph, or else we'd cause a promise self-reference as
the downstream component tries to configure itself based on our outputs.

As a special case then, for a component instance being destroyed we take
the planned output values directly from the plan, relying on the fact that
the plan phase sets them to the prior state output values in that case,
and therefore the result for such a component is available immediately
without blocking on any other expression evaluation during the apply phase.

This combines with several previous commits to create a first pass at
handling ordering correctly when planning and applying a full destroy.

This commit also incorporates some fixes and improvements to stackeval's
apply-time testing helpers, which had some quirks and bugs when first
added in a recent commit. One of those problems also revealed that the
raw state loader was not resilient to a buggy caller setting a state
entry to nil instead of removing it altogether, and that mistake seems
relatively easy to make (as I did here in the test helper) so we'll
tolerate it to make it possible to recover if such a bug does end up
occurring in real code too.
2024-01-15 15:20:48 -08:00
..
hooks stacks+rpcapi(stacks): Model deposed objects for resource instances 2023-11-15 12:38:56 -08:00
internal/stackeval stackeval: When being destroyed, component instance result comes from plan 2024-01-15 15:20:48 -08:00
testdata/mainbundle stackruntime: Support sensitive component inputs 2024-01-08 15:27:06 -05:00
apply.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
doc.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
eval_expr.go stacks+rpcapi: Add some missing copyright comments 2023-11-15 12:38:57 -08:00
helper_test.go stackruntime: Support sensitive component inputs 2024-01-08 15:27:06 -05:00
hooks.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
plan.go stacks+rpcapi: Wire through the "plan mode" to the stacks runtime 2023-11-15 12:38:56 -08:00
plan_test.go stackruntime: Support sensitive component inputs 2024-01-08 15:27:06 -05:00
telemetry.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
telemetry_test.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
validate.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
validate_test.go stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00