Skip to content
Draft
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
755e612
Add Action Invocation information to Stacks Protobuf
mutahhir Oct 10, 2025
f241e72
Generate code from protobuf definition
mutahhir Oct 10, 2025
b53aee4
Fix typo in ActionTriggerEvent
mutahhir Oct 10, 2025
80b270d
Allow requesting action schema from plan producer
mutahhir Oct 10, 2025
c907523
First pass at including action invocations within stacks proto
mutahhir Oct 10, 2025
df9454b
Populate ActionTrigger
mutahhir Oct 10, 2025
87911e2
Fix bug with getting schema
mutahhir Oct 13, 2025
11805bb
Start sending change event for action invocation planning
mutahhir Oct 13, 2025
23f96bd
Include action schema in dependencies provider
mutahhir Oct 17, 2025
382e8c6
Add action type to action instance for schema lookup
mutahhir Oct 17, 2025
56690c5
Send over action type in planned change
mutahhir Oct 17, 2025
236f734
update field name to ActionTypes after rename
mutahhir Oct 17, 2025
3afe760
Fix action type to send the type and not the name
mutahhir Oct 17, 2025
8a77b19
Add deferred actions support in stacks proto
mutahhir Oct 22, 2025
200e97c
Add Deferred Action Invocation to tfstackdata
mutahhir Oct 23, 2025
f375ae0
Populate Deferred Action Invocations
mutahhir Oct 23, 2025
a3d693e
Change comment
mutahhir Oct 30, 2025
a594c77
Just trying to allow this for now
RonRicardo Nov 5, 2025
d2a6676
WIP
RonRicardo Nov 12, 2025
b17c456
Add test for raw action invocation with malformed action address
RonRicardo Nov 18, 2025
f9d5ffc
Forward the existing StartAction, ProgressAction, CompleteAction even…
RonRicardo Nov 20, 2025
5c2888e
proto: Add ActionInvocationStatus message and enum to StackChangeProg…
RonRicardo Nov 21, 2025
d13bb34
Update stacks.go to add ReportActionInvocationStatus hook
RonRicardo Nov 21, 2025
93f472a
Add ParseAbsActionInvocationInstance helpers
RonRicardo Nov 21, 2025
73e78ca
Add ActionInvocationStatusHookData struct
RonRicardo Nov 21, 2025
f64c999
Update hooks.go to use ActionInvocationStatusHookData for tthe hook, …
RonRicardo Nov 21, 2025
f3475e8
Test and capture ActionInvocationStatus hooks
RonRicardo Nov 21, 2025
269f6aa
Use NewActionInvocationInStackAddr
RonRicardo Nov 25, 2025
e2a9b83
WIP: lots of debug logging, trying to follow the flow of action invoc…
RonRicardo Nov 26, 2025
7e35bab
Transfer action invocations to plan and populate ActionTargetAddrs:
RonRicardo Dec 1, 2025
ccdb2bc
Add more logging to action invocatinon hooks
RonRicardo Dec 1, 2025
9b67ab1
Test hooks + add generated code
RonRicardo Dec 1, 2025
15ccb9b
Restore transform_action_diff.go
RonRicardo Dec 2, 2025
15c3f0a
Don't populate plan.ActionTargetAddrs
RonRicardo Dec 2, 2025
5ca0f7c
Add applied action invocation message type
RonRicardo Dec 2, 2025
a3c278c
Add ActionInvocationProgress message
RonRicardo Dec 3, 2025
52517a5
Generated from the proto
RonRicardo Dec 3, 2025
362e61b
Add ActionInvocationProgressHookData type
RonRicardo Dec 3, 2025
7d59cb5
Implement ProgressAction reporting
RonRicardo Dec 3, 2025
1d0ae23
Fire pending status during preApply
RonRicardo Dec 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't populate plan.ActionTargetAddrs
  • Loading branch information
RonRicardo committed Dec 2, 2025
commit 15c3f0a7e5b12355341c7f899f2158cce47de4f4
18 changes: 1 addition & 17 deletions internal/stacks/stackruntime/internal/stackeval/applying.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package stackeval
import (
"context"
"fmt"
"log"

"github.com/hashicorp/hcl/v2"

Expand Down Expand Up @@ -175,7 +174,6 @@ func ApplyComponentPlan(ctx context.Context, main *Main, plan *plans.Plan, requi
hooks: hooksFromContext(ctx),
addr: inst.Addr(),
}
log.Printf("[DEBUG] ApplyComponentPlan: Created hook for %s", inst.Addr())
tfCtx, err := terraform.NewContext(&terraform.ContextOpts{
Hooks: []terraform.Hook{
tfHook,
Expand Down Expand Up @@ -229,23 +227,9 @@ func ApplyComponentPlan(ctx context.Context, main *Main, plan *plans.Plan, requi
// works, and so code after this point should not make any further use
// of either "modifiedPlan" or "plan" (since they share lots of the same
// pointers to mutable objects and so both can get modified together.)

// Populate ActionTargetAddrs with all action invocations so they will
// be added to the apply graph by the ActionInvokeApplyTransformer
if len(plan.Changes.ActionInvocations) > 0 {
plan.ActionTargetAddrs = make([]addrs.Targetable, 0, len(plan.Changes.ActionInvocations))
for _, actionInvocation := range plan.Changes.ActionInvocations {
plan.ActionTargetAddrs = append(plan.ActionTargetAddrs, actionInvocation.Addr)
}
log.Printf("[DEBUG] ApplyComponentPlan: Populated ActionTargetAddrs with %d action invocations for %s", len(plan.ActionTargetAddrs), inst.Addr())
}

log.Printf("[DEBUG] ApplyComponentPlan: About to call tfCtx.Apply() for %s", inst.Addr())
newState, moreDiags = tfCtx.Apply(plan, moduleTree, &terraform.ApplyOpts{
ExternalProviders: providerClients,
AllowRootEphemeralOutputs: false, // TODO(issues/37822): Enable this.
ExternalProviders: providerClients,
})
log.Printf("[DEBUG] ApplyComponentPlan: tfCtx.Apply() completed for %s", inst.Addr())
diags = diags.Append(moreDiags)
} else {
// For a non-applyable plan, we just skip trying to apply it altogether
Expand Down