Commit Graph

354 Commits (da74b59ea1d3aa4d7706579c95f63c778f2e515e)

Author SHA1 Message Date
Martin Atkins c57f709b1d stackruntime: Pass the apply-time variable values to stackeval
2 years ago
Liam Cervante b646dff26a
stacks: apply nested default values to inputs (#35349)
2 years ago
Liam Cervante 284ce63947
stacks: applyable status should be dependent on applyable components (#35350)
2 years ago
Martin Atkins 1714729f87 stackeval: terraform.applying symbol
2 years ago
Martin Atkins e74896bd24 stackruntime: Handle apply-time-specified input variables
2 years ago
Martin Atkins 79f78b268f stackeval: Ephemeral output values
2 years ago
Martin Atkins 71749d9682 stackeval: Ephemeral input variables
2 years ago
Liam Cervante 517f9944f7
stacks: support deferred imports in stacks events (#35334)
2 years ago
Liam Cervante 108bd85053
Refactor deferred variable name to defer in terraform1 API (#35343)
2 years ago
Mutahhir Hayat d398fa50c6 handle overlooked error in test
2 years ago
Mutahhir Hayat cb28bf3379 remove unused test
2 years ago
Mutahhir Hayat e20891ac1d add tests for local values through data sources
2 years ago
Liam Cervante 9b95898f63
stacks: emit events for deferred actions (#35325)
2 years ago
Liam Cervante 1bb78c14c2
deferred actions: always enable deferred actions in stacks (#35321)
2 years ago
Liam Cervante fc390038f3
stacks: add tests for and refactor steps when a provider can't be configured (#35294)
2 years ago
Liam Cervante eeb2c53385
stacks: remove wildcard key from computed instances (#35284)
2 years ago
Liam Cervante dc06717f69
stacks: add support for unknown for_each expressions in providers (#35267)
2 years ago
Liam Cervante 1e9a186059
stacks: return dynamic types when referencing partial components (#35254)
2 years ago
Liam Cervante 7096ec85cc
stacks: Enable resource deferrals within stack tests (#35168)
2 years ago
Daniel Schmidt 59ead5356f
stacks: update RPC APIs with deferral information (#35125)
2 years ago
Alisdair McDiarmid c8eec89c3d
Merge pull request #35247 from hashicorp/alisdair/rpcapi-stop
2 years ago
Liam Cervante b5d6b13b3b
stacks: convert sourcebundle source into directory for config SourceDir field (#35245)
2 years ago
Martin Atkins 5003af8335 stackeval: If context is cancelled, ask provider instances to stop
2 years ago
Alisdair McDiarmid 39373cc0d6 stackeval: Stop operations on context cancellation
2 years ago
Martin Atkins 9448845e91 stackeval: Improve coverage of namedPromiseReporter impls
2 years ago
Martin Atkins a4d19a8d13 stackeval: Stack.ProviderByLocalAddr must memoize its results
2 years ago
Liam Cervante 7a8ffff66e
stacks: Fix unknown provider values crashing validation phase (#35155)
2 years ago
Daniel Schmidt 2c65affe05
stacks: add comments to tests
2 years ago
Daniel Schmidt b1e50d0475
chore: fix comment
2 years ago
Daniel Schmidt 664bb21738
stacks: add comment
2 years ago
Mutahhir Hayat 6bbc8cdc76 Add more tests for local values
2 years ago
Mutahhir Hayat 2667a0f2c3 cleanup comments
2 years ago
Mutahhir Hayat 5e12bdf048 Stack evaluation should also visit local values when walking the stack
2 years ago
Mutahhir Hayat be317d4d3a Make Stack and Stack config aware of local values
2 years ago
Mutahhir Hayat 6554ce6bfd Add planning test to test for locals usage
2 years ago
Mutahhir Hayat 129d58fed3 Create local value structs, including config and tests
2 years ago
Mutahhir Hayat d695f8197c Add local values test
2 years ago
Daniel Schmidt 3267718d3d
stacks: support unknown for_each on embedded stacks
2 years ago
kmoe b74715e5fb
stacks: fix invalid filename (#35111)
2 years ago
Daniel Schmidt 35f44b01f0
stacks: fix comment and add assertion for diagnostics
2 years ago
Daniel Schmidt aeb5b47723
stacks: remove unused test case
2 years ago
Daniel Schmidt f847360a40
stacks: component.CheckInstances now reports on for each value diagnostics
2 years ago
Daniel Schmidt c370e5e71d
stacks: use more precise name for variable
2 years ago
Daniel Schmidt 1afc9789ef
stacks: use UnknownForEachRepetitionData for instance map repetition data in for_each
2 years ago
Daniel Schmidt 91a18a6b30
stacks: fix typo
2 years ago
Daniel Schmidt 7d0c4cfc4d
stacks: early exit on invalid for_each values for components
2 years ago
Daniel Schmidt d1168ffa62
stacks: return instance value for wildcard component instances
2 years ago
Daniel Schmidt 6f95225a91
stacks: handle unknown dynamic values
2 years ago
Daniel Schmidt 3cbfd39721
stacks: validate unknown component for_each type
2 years ago
Daniel Schmidt 3a7150b27e
stacks: handle unknown values in component for_each
2 years ago
Martin Atkins 30e2fd6525 Handle marks a little more consistently
2 years ago
Nick Fagerlund 4d46cc81e3 Fix several deferred actions tests by setting DeferralAllowed
2 years ago
Nick Fagerlund 2b4147e0ba Add DeferralAllowed to stackeval.PlanOpts (temporary)
2 years ago
Nick Fagerlund d5be799cb9 End unknown_instances language experiment, in favor of whole-plan option
2 years ago
Alisdair McDiarmid f409639934
Merge pull request #34765 from hashicorp/alisdair/stack-root-input-variable-defaults
2 years ago
Alisdair McDiarmid f3ec86b17b stackruntime: Treat unset and null equally
2 years ago
Alisdair McDiarmid 0fe26468cd stackruntime: Apply defaults to root variables
2 years ago
CJ Horton 5a750561e6 round-trip check results through stack plans
2 years ago
Daniel Schmidt 49ad27f1c9
Merge pull request #34737 from hashicorp/stacks-for-each
2 years ago
Nick Fagerlund c9c24706aa
Merge pull request #34741 from hashicorp/nf/feb24-provider-addrs-in-statuses
2 years ago
Daniel Schmidt 2a0962328d
stacks: make error message more precise
2 years ago
Daniel Schmidt 8da61e2d20
stacks: reword for_each error message
2 years ago
Daniel Schmidt 217879e510
stacks: make component for_each more robust
2 years ago
Liam Cervante cec4b7b74c
stacks: validate providers based on types instead of local names (#34735)
2 years ago
Nick Fagerlund f58c71e77c Stacks: Update expectations in TestTerraformHook
2 years ago
Nick Fagerlund 7703a5aead Stacks: Add ProviderAddr field to ResourceInstanceStatusHookData
2 years ago
Nick Fagerlund 94ea534e40 Refactor terraform.Hook to use a resource-identifying wrapper struct
2 years ago
Liam Cervante 31a7fa88d5
stacks: validate provider configurations during static analysis (#34730)
2 years ago
Alisdair McDiarmid 1459825e53
Merge pull request #34725 from hashicorp/alisdair/configs-sourcebundle-parser
2 years ago
Alisdair McDiarmid 2c22c213e9 stackeval: More robust absolute source addrs
2 years ago
Alisdair McDiarmid 7a043fe54a stackeval: Another module source test case
2 years ago
Alisdair McDiarmid 7d956bbc11 stackeval: Fix module loader source addr building
2 years ago
Martin Atkins a45d4467f1 stackeval: Don't fail when data resource is removed
2 years ago
Liam Cervante b2cc7dbadf
stacks: validate the types of input variables during validation (#34722)
2 years ago
Liam Cervante 68fd15dfdd
stacks: expand reference scope of static validations (#34721)
2 years ago
Liam Cervante 831630fabe
stacks: the plan function should stop on validation errors (#34720)
2 years ago
Alisdair McDiarmid 97a220fb82 stacks: Use source bundle aware config parser
2 years ago
Liam Cervante b3abff5750
stacks: check providers blocks in components during validatation (#34707)
2 years ago
Liam Cervante bced645a4d
stacks: call terraform.Validate on stack component configs (#34705)
2 years ago
Liam Cervante 2472f7c773
stacks: fix flaky tests (#34708)
2 years ago
Alisdair McDiarmid 48148eda5f
Merge pull request #34687 from hashicorp/alisdair/stackeval-hook-replace-action-counts
2 years ago
Liam Cervante 64b311d53a
stacks: apply sensitive marks to outputs from components (#34684)
2 years ago
Liam Cervante f0b61090a2
Move the testing MockProvider into a dedicated shared package (#34681)
2 years ago
Alisdair McDiarmid 06723d3d4b stackeval: Add support for replace actions to hook
2 years ago
Martin Atkins fde6277565 stackruntime: Pass ExperimentsAllowed into stackeval for apply
2 years ago
Liam Cervante 07f6621091
stacks: include resources in state when calculating required providers (#34645)
2 years ago
Martin Atkins e6665c4f43 stackeval: Basic support for deferred-change propagation
2 years ago
Martin Atkins 67d8a5137b rpcapi+stacks: Stacks runtime can see whether experiments are allowed
2 years ago
Liam Cervante 3475d22741
Fix nil pointer exception when planning stacks with undeclared variables (#34638)
2 years ago
Alisdair McDiarmid 55675b990a stackeval: Unmark provider config for plugin RPC
2 years ago
Martin Atkins 884e1fb2a4 terraform: Plans can be "complete" and "applyable"
2 years ago
Martin Atkins 0994e6fbf9 stacks: The terraform.workspace attr is not available in Stacks
2 years ago
Martin Atkins 7d2d4dec5e stackeval: When being destroyed, component instance result comes from plan
2 years ago
Martin Atkins dcb176a557 stackeval: A Main for applying knows the plan it's applying
2 years ago
Martin Atkins c06ad051a1 stackeval: Respect inter-component dependencies during apply
2 years ago
Martin Atkins c345cde93c stackeval: Extended utilities for plan and apply testing
2 years ago
Liam Cervante 9246b3a994
stacks: on module load convert relative paths to absolute (#34523)
2 years ago
Liam Cervante 7d143388f3
Add support for the cross resource type move operation in the proto schema (#34480)
2 years ago
Martin Atkins 3c14eeb945 stackeval: Make some provisioners available to stack components
2 years ago
Alisdair McDiarmid 1d3f863f2b stackruntime: Support sensitive component inputs
2 years ago
Alisdair McDiarmid e4b319401e stacksruntime: Add sensitive outputs tests
2 years ago
Martin Atkins 3961c18420 stackeval: Return an error if a module contains a provider config
2 years ago
Martin Atkins a51c034cc3 stackeval: Include component configurations in our static walks
2 years ago
Martin Atkins a3cd4a11ce stackeval: Use relative, slashy paths in module-related diagnostics
2 years ago
Martin Atkins a4d61733f6 stackplan: Include extra info in raw component instance plan
2 years ago
Martin Atkins 25a514f846 stackeval: Populate planned component instance more thoroughly
2 years ago
Martin Atkins 524da4f278 stackeval: Applyable objects have a set of required components
2 years ago
Martin Atkins 00761a9f70 stackeval: ApplyChecker is now Applyable
2 years ago
Martin Atkins 11bb10ba72 stackeval: Find references in arbitrary expressions and bodies
2 years ago
Martin Atkins 306b9008c4 stackeval: Clean some debug junk in ComponentInstance
2 years ago
James Bardin 2574b899e7
Merge pull request #34385 from hashicorp/jbardin/provider-functions-impl
2 years ago
Matej Risek 039cced8ae
Add component address to ComponentInstance under AppliedChanges (#34418)
2 years ago
James Bardin 2923ba6ac3 add CallFunction to stub provider
2 years ago
Martin Atkins be33a7e9e0 stackeval: Use prior state outputs when planning component destroy
2 years ago
Martin Atkins a47dc447c1 stackeval: Additional testing utilities
2 years ago
Martin Atkins 2aba28eb1a stacks: Track component instance existence in the state
2 years ago
Martin Atkins b0b8d4aa6f states: Only track root module output values
2 years ago
Martin Atkins b64953dba3 stacks: Summary docs giving an overview and some details about stackeval
2 years ago
Martin Atkins 3f569b55c5 stacks: Some code consistency cleanups in preparation for first merge
2 years ago
Martin Atkins 8a99c3c0e5 stacks+rpcapi: Add some missing copyright comments
2 years ago
Martin Atkins 3678815bb3 stackeval: Tests for provider instance configuration evaluation
2 years ago
Martin Atkins 1872c9d9be stackeval: inPromisingTask cancels context when test completes
2 years ago
Martin Atkins 94ca9bc613 stackeval: testEvaluator arranges for its result to be cleaned up
2 years ago
Martin Atkins d7461ce202 stackeval: Initial tests for type "Provider"
2 years ago
Martin Atkins d3e0b89e02 stackeval: Some initial tests for the Component type
2 years ago
Martin Atkins 91b8ea3d76 stackstate: A helper for loading state during tests
2 years ago
Martin Atkins 95ff474ee9 stackeval: Tests for StackCall.ResultValue
2 years ago
Martin Atkins 333c502990 stackeval: Support each.key, each.value, count.index and self references
2 years ago
Martin Atkins 75602fa9eb stackeval: Tests for StackCall.Instances
2 years ago
Martin Atkins 48d2d15a40 stackeval: Some basic tests for OutputValue.CheckResultValue
2 years ago
Martin Atkins 13edd30479 stackeval: Test-only globals
2 years ago
Martin Atkins bb0e833785 stackeval: Remove stale comment about output value changes
2 years ago
Martin Atkins 0281170645 stackeval: Remove stale todo about prior state in plans
2 years ago
Martin Atkins 992f6d4115 stackeval: Fix input variable evaluation in embedded stacks
2 years ago
Martin Atkins 9a943af56d stackruntime: Arbitrary expression evaluation
2 years ago
Martin Atkins d689237a48 stackeval: Tests for the "perEvalPhase" helper
2 years ago
Martin Atkins 5aaed3111e stackeval: Reusable and testable for_each handling
2 years ago
Martin Atkins 1180096850 stackeval: Unit tests for EvalExpr and EvalBody
2 years ago
Martin Atkins 3c6c5effd5 stackeval: Applying must use apply-time provider clients
2 years ago
Martin Atkins 6e7eff9b4b stackruntime: Report deletion of resource instance objects
2 years ago
Martin Atkins c6894cc617 stackeval: ComponentInstance: all output values during planning
2 years ago
Martin Atkins 972f1c0678 stackplan: Track provider config for every resource instance change
2 years ago
Martin Atkins 4e34e6ebfa stacks: Track prior state for all resource instance objects
2 years ago
Martin Atkins 61ccc09681 stacks+rpcapi: Wire through the "plan mode" to the stacks runtime
2 years ago
Martin Atkins af0c4764ef stackeval: A FIXME about emitting prior state snapshots during apply
2 years ago
Martin Atkins 8fd29e9439 stacks: Preserve prior state from plan to apply
2 years ago
Martin Atkins 5372d5eb98 stacks+rpcapi(stacks): Model deposed objects for resource instances
2 years ago
Martin Atkins 2559151d0a stackruntime: Count actions successfully applied
2 years ago
Martin Atkins 5d9cac85bc stackruntime: Emit "pending" events for component instance plan/apply
2 years ago
Martin Atkins 947c483c49 rpcapi: Stack plan and apply use the same progress message type
2 years ago
Martin Atkins 1943ed2395 stackruntime: Emit some more progress hooks during the apply phase
2 years ago
Martin Atkins c4d7ee93fb stackeval: Use the right EvalPhase in various places
2 years ago
Martin Atkins 69aa51b9ff stackruntime: Fix some quirks of data sent from plan to apply
2 years ago
Martin Atkins 569f0f553b stackruntime: ComponentInstance considers previous state
2 years ago
Martin Atkins aaba750095 rpcapi: Stacks: pass previous state to stack runtime during planning
2 years ago
Martin Atkins 49511fe9a8 stackstate: Fuller round-tripping of resource instance object state
2 years ago
Martin Atkins 13e26b60dd addrs: Adopt DeposedKey as an address type; remove states.Generation
2 years ago
Martin Atkins d1b0632e82 stackruntime: Add HashiCorp copyright comments
2 years ago
Martin Atkins 74215a4451 stacks: Include resource type schema in PlannedChange and AppliedChange
2 years ago
Martin Atkins 48518b8233 stacks: A very basic stub of applied resource instance change announcements
2 years ago
Martin Atkins d99985720f stacks: Carry input variable values from plan to apply
2 years ago
Martin Atkins b887d29894 stackeval: NewForApplying must save the ChangeExecResults object
2 years ago
Martin Atkins de170a9a30 stackeval: InputVariable should respect EvalPhase when deciding value
2 years ago
Martin Atkins 373f39d6ac stackeval: ApplyPlan's ChangeExec must be in main task
2 years ago
Martin Atkins b8923a5f94 stackruntime: Persist a component's plantimestamp in the plan
2 years ago
Martin Atkins 8f00a7bf5a stackruntime: Make sure PlanResponse and ApplyResponse channels get closed
2 years ago
Alisdair McDiarmid 927350eca8 rpcapi: Add component expansion and change summary
2 years ago
Martin Atkins f1ceee5e69 rpcapi: Stacks.ApplyStackChanges initial implementation
2 years ago
Martin Atkins 2a0d407eb6 stackruntime: ApplyPlan function
2 years ago
Martin Atkins 8719f13b58 stackeval: Stubby implementation of applying changes to components
2 years ago
Martin Atkins f8d2fef129 stackeval: Factor out the two "walk drivers"
2 years ago
Martin Atkins fafa36e73a stackeval: ApplyPlan function and initial supporting internals
2 years ago
Martin Atkins 985b110afa stackeval: ChangeExec returns states.State from component instance change
2 years ago
Martin Atkins 959b02daa3 stackeval: ChangeExec allows component changes to return diagnostics
2 years ago
Martin Atkins 0ec4acb4ce stackeval: ChangeExec for orchestrating apply-time changes
2 years ago
Alisdair McDiarmid 54062a52cb stacks: More extensive in-progress plan events
2 years ago
Martin Atkins 6a45cdf7b0 stacks/stackruntime: Report if provider schema fetching fails
2 years ago
Martin Atkins 2095a7d000 stacks/stackruntime: Don't panic if component modules are invalid
2 years ago
Martin Atkins afd2282aa6 stacks/stackruntime: fix TestPlanWithSingleResource
2 years ago
Martin Atkins c1e7abafc3 stackruntime: Configure and assign provider instances
2 years ago
Martin Atkins 3dc3781904 stackruntime: Starting up and configuring provider plugins
2 years ago
Martin Atkins 373889ae25 stackeval: Actually use the component block "inputs" argument
2 years ago
Martin Atkins 7c1dbc9061 stackeval: Don't share objects between AsyncTask closures
2 years ago
Martin Atkins d1eaf199c9 stackeval: Don't panic if we don't know the input type for a component
2 years ago
Martin Atkins fbc34005ba stackeval: Emit PlannedChange for each component instance
2 years ago
Martin Atkins 2d2baee72d staticcheck: Broadly ignore unused stuff in all of "stacks"
2 years ago
Martin Atkins ea3b70abf0 stackeval: Component calls are now referenceable
2 years ago
Martin Atkins 4a179ed969 stackeval: Very very basic component planning
2 years ago
Martin Atkins d435cd5a1b stackconfig: Bring the source bundle with the config
2 years ago
Martin Atkins d3e93e4a31 stackruntime: Initial stubbing of Plan
2 years ago
Martin Atkins e76e203c77 stackeval: walkState with custom diagnostics handling
2 years ago
Martin Atkins 355bae32da stackruntime: Allow hooking the start and end of the overall plan operation
2 years ago
Martin Atkins 863a91359a stackruntime: Plan calls into stackeval
2 years ago
Martin Atkins 0111408ca8 stackruntime: Stub of "Plan" function
2 years ago
Martin Atkins 8af46fd38b stackruntime: An extensible "hooks" API
2 years ago
Martin Atkins 2b7fad5bee stackruntime: Our fake telemetry span must be passed by pointer
2 years ago
Martin Atkins 03c981d9d0 promising,rpcapi,stackruntime: Quiet some staticcheck errors
2 years ago
Martin Atkins 791a5fb8a6 stackruntime: Top-level "Validate" function
2 years ago
Martin Atkins 8c7acd5378 stackruntime: Helper for viewing traces in tests
2 years ago
Martin Atkins 4754889950 stackruntime: Beginnings of Validate function
2 years ago