Closed bobh66 closed 8 months ago
I ran the same tests and it does clean up the lock, however the crossplane.io/external-create-pending
annotation is left on the Workspace so reconciliation will still be blocked until someone manually removes the annotation.
After we merge this PR, let's also consider putting the async mode of reconciliation for the provider into our roadmap.
How does async apply to running the CLI command? It seems like we would still be CPU-bound even if we are running the command async.
Description of your changes
This change executes the terraform CLI command inside a wrapper that will terminate the CLI command if the context terminates via timeout or signal before the command finishes.
This will help with handling provider shutdown cleanly but it may also leave the Workspace in an unknown state if the running command was
apply
ordestroy
.I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested
This code needs to soak in a test environment for a while but I wanted to get the changes reviewed in the mean time. I'll take the PR out of WIP when the changes have been tested locally.
Test procedure: