Commit graph

5 commits

Author SHA1 Message Date
Martin Atkins
fde6277565 stackruntime: Pass ExperimentsAllowed into stackeval for apply
This was originally part of 7dad938fdb but
unfortunately seems to have got lost during some rebasing, or some other
similar sort of annoying reason.

This now allows the "experiments allowed" flag to propagate into the
stackeval package when we're running the apply phase, for consistency with
all of the other phases. Without this, it's possible to plan a
configuration that's participating in experiments, but then it fails in a
strange way during the apply step due to Terraform suddenly thinking it's
a stable release where experiments are disabled.
2024-02-15 10:25:20 -08:00
Martin Atkins
67d8a5137b rpcapi+stacks: Stacks runtime can see whether experiments are allowed
We allow experiments only in alpha builds, and so we propagate the flag
for whether that's allowed in from "package main". We previously had that
plumbed in only as far as the rpcapi startup.

This plumbs the flag all the way into package stackeval so that we can
in turn propagate it to Terraform's module config loader, which is
ultimately the one responsible for ensuring that language experiments can
be enabled only when the flag is set.

Therefore it will now be possible to opt in to language experiments in
modules that are used in stack components.
2024-02-12 12:13:08 -08:00
Martin Atkins
d1b0632e82 stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
Martin Atkins
8f00a7bf5a stackruntime: Make sure PlanResponse and ApplyResponse channels get closed
The closure of these channels is how a caller knows that the operation has
completed, so we must always close them before we return or the caller
is likely to get wedged.
2023-11-15 12:38:55 -08:00
Martin Atkins
2a0d407eb6 stackruntime: ApplyPlan function
This is the exported entry-point for applying a plan that was created
by an earlier call to stackruntime.Plan.
2023-11-15 12:38:54 -08:00