perfectsense / gyro

Gyro is a command-line tool for creating, updating, and maintaining cloud infrastructure. Gyro makes infrastructure-as-code possible.
https://gyro.dev
Apache License 2.0
134 stars 7 forks source link

Workflow Resources with wait directives are not added to state file at correct time #358

Open RichieHowell opened 3 years ago

RichieHowell commented 3 years ago

Describe the bug When a workflow resource has a wait directive with a condition in it, the resource is not added to the state file until after the wait directive is complete. Any attempt to recover a workflow that is interrupted in the middle of a wait (which is most times that we need to recover a workflow) runs into an error where the workflow tries to recreate the object with the wait directive since it did not find it in the state file.

To Reproduce Create a workflow with any resource with a wait directive, run the workflow and then inturrupt it in the middle of the wait direct, try to resume the workflow.

Expected behavior A workflow which is interrupted in the middle of a wait should continue again at the wait directive.