Skip to content

Commit 0d06d74

Browse files
authored
Prevent workflow cancellation while Terraform holds a state lock. (#1253)
* Prevent workflow cancellation while Terraform holds a state lock. * Switch to a different approach which still allows manual cancellation. * Revert "Switch to a different approach which still allows manual cancellation." This reverts commit 88101ff.
1 parent ae205d7 commit 0d06d74

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/deploy-backend.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ jobs:
7878
run: make init
7979

8080
- name: Terraform Plan
81+
# Ignore cancellations to prevent Terraform from being killed while it holds a state lock
82+
# A stuck process can still be killed with the force-cancel API operation
83+
if: ${{ !failure() }}
8184
working-directory: infrastructure/instance
8285
run: make plan-ci
8386

@@ -120,6 +123,9 @@ jobs:
120123
run: make init
121124

122125
- name: Terraform Apply
126+
# Ignore cancellations to prevent Terraform from being killed while it holds a state lock
127+
# A stuck process can still be killed with the force-cancel API operation
128+
if: ${{ !failure() }}
123129
working-directory: infrastructure/instance
124130
run: |
125131
make apply-ci

0 commit comments

Comments
 (0)