Commit graph

11 commits

Author SHA1 Message Date
James Bardin
3b3e4bf003 update the rest of the go:generate calls 2025-02-12 12:25:58 -05:00
Liam Cervante
915b174da3
stacks: split the terraform1 RPC package into per-service packages (#35513)
* stacks: split the terraform1 RPC package into per-service packages

* pull latest changes
2024-08-07 17:33:51 +02:00
Daniel Schmidt
93cf093168
stacks: add new deferred plan status 2024-07-08 12:49:00 +02:00
Liam Cervante
c0499647fa
stacks: include moved and removed in API (#35360)
* stacks: include moved and removed in API

* fix race test
2024-06-20 11:04:22 +02:00
Liam Cervante
108bd85053
Refactor deferred variable name to defer in terraform1 API (#35343)
* Refactor deferred variable name to defer in terraform1 API

* fix tests
2024-06-14 11:30:54 +02:00
Liam Cervante
9b95898f63
stacks: emit events for deferred actions (#35325)
* stacks: emit events for deferred actions

* deferral allowed is always on

* Update internal/rpcapi/stacks.go

Co-authored-by: Daniel Schmidt <danielmschmidt92@gmail.com>

---------

Co-authored-by: Daniel Schmidt <danielmschmidt92@gmail.com>
2024-06-12 13:51:44 +02:00
Martin Atkins
2559151d0a stackruntime: Count actions successfully applied
Callers expect to be given an updated set of counts for how many of each
action were completed, which we'll achieve by having the terraform.Hook
implementation keep track of those and then announce them based on what
it collected.

We can't use the plan for this directly because terraform.Context.Plan
seems to modify the plan it's given during its work, and on success the
plan ends up being totally empty.
2023-11-15 12:38:56 -08:00
Martin Atkins
947c483c49 rpcapi: Stack plan and apply use the same progress message type
Previously we had the progress messages directly inlined as events of the
PlanStackChanges operation, but that means that there's no common
interface type for progress events across both the plan and apply phases,
making it hard for Go implementations to share marshaling code between
the two phases.

Now we'll use a new StackChangeProgress message type to contain all of
the progress message situations. This makes constructing and using the
progress messages a little more verbose -- an extra layer of message --
but means that we can write code that works generically with the
StackChangeProgress generated struct and thus share it between the two
phases, leading to less code overall.

As of this commit we don't yet have the apply phase generating any
progress messages, but we'll extend it in a subsequent commit now that
it's possible to share more of that event-generating code between the
two phases.
2023-11-15 12:38:55 -08:00
Martin Atkins
d1b0632e82 stackruntime: Add HashiCorp copyright comments 2023-11-15 12:38:55 -08:00
Alisdair McDiarmid
927350eca8 rpcapi: Add component expansion and change summary
We want to report the result of component expansion to the client as
early as possible, so that it can prepare to receive any following
information for each instance. This message is critical when a
component's expansion expression evaluates to an empty set: without this
message's confirmation of this case, it will be unable to determine that
the component will receive no plans for any instances until the plan
completes.

We also want to report a roll-up of the resource changes upon completion
of each component's plan and apply operations, so that a client can
summarize the operation changes without performing the roll-up operation
on all received change events.
2023-11-15 12:38:55 -08:00
Alisdair McDiarmid
54062a52cb stacks: More extensive in-progress plan events
Expand the existing hooks to emit events throughout the planning
process, providing enough information for the Terraform Cloud UI to
render a live-updating representation of the plan. We also sketch out
the equivalent hooks for the apply operation.
2023-11-15 12:38:54 -08:00