From a56a95ceac8aa3d9a7c96caa582c1f4190a6052a Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 9 Feb 2024 11:26:48 +0000 Subject: [PATCH 1/2] CI: Add retries to TF apply in aio job We sometimes hit temporary failures during VM creation. Adding a retry may help to keep things running. (cherry picked from commit 6329f1c83b18f1db7a0ceb875126249c62d24a8e) --- .github/workflows/stackhpc-all-in-one.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stackhpc-all-in-one.yml b/.github/workflows/stackhpc-all-in-one.yml index ba6fa26cb..6df546799 100644 --- a/.github/workflows/stackhpc-all-in-one.yml +++ b/.github/workflows/stackhpc-all-in-one.yml @@ -154,7 +154,17 @@ jobs: OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} - name: Terraform Apply - run: terraform apply -auto-approve + run: | + for attempt in $(seq 5); do + if terraform apply -auto-approve; then + echo "Created infrastructure on attempt $attempt" + break + fi + echo "Failed to create infrastructure on attempt $attempt" + sleep 10 + terraform destroy -auto-approve + sleep 60 + done working-directory: ${{ github.workspace }}/terraform/aio env: OS_CLOUD: ${{ inputs.OS_CLOUD }} From f849d26b9f527c8244a630b234e773d9dc7df898 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 9 Feb 2024 09:46:17 +0000 Subject: [PATCH 2/2] CI: Trim down package dependencies (cherry picked from commit 8d9e620717217745b41726cd7f7100bc8d6bd53c) --- .github/workflows/stackhpc-all-in-one.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stackhpc-all-in-one.yml b/.github/workflows/stackhpc-all-in-one.yml index 6df546799..26de98f66 100644 --- a/.github/workflows/stackhpc-all-in-one.yml +++ b/.github/workflows/stackhpc-all-in-one.yml @@ -80,7 +80,7 @@ jobs: - name: Install Package uses: ConorMacBride/install-package@main with: - apt: build-essential git unzip nodejs python3 python3-pip python3-wheel python-is-python3 + apt: git unzip nodejs - uses: actions/checkout@v4 with: