From 48e1ee98c756e4268a4073ceadbdad023a899923 Mon Sep 17 00:00:00 2001 From: rishav-karanjit Date: Thu, 23 Apr 2026 17:12:52 -0700 Subject: [PATCH] add retries --- .github/workflows/check_only_keyword.yml | 8 +- .github/workflows/ci_static-analysis.yaml | 6 +- .github/workflows/dafny_format_version.yaml | 16 +- .../dafny_interop_library_go_tests.yml | 57 +- .github/workflows/dafny_interop_test_net.yml | 55 +- .../dafny_interop_test_vector_net.yml | 193 ++++--- .github/workflows/dafny_verify_version.yaml | 16 +- .github/workflows/dafny_version.yaml | 16 +- .github/workflows/duvet.yaml | 18 +- .github/workflows/go-release.yml | 30 +- .github/workflows/library_codegen.yml | 32 +- .../workflows/library_dafny_verification.yml | 14 +- .github/workflows/library_format.yml | 8 +- .github/workflows/library_go_tests.yml | 44 +- .../library_interop_keyring_test_vectors.yml | 478 ++++++++++------ .../library_interop_mkp_test_vectors.yml | 519 ++++++++++++------ .github/workflows/library_interop_tests.yml | 171 ++++-- .github/workflows/library_java_tests.yml | 68 ++- .../library_legacy_interop_test_vectors.yml | 70 ++- .github/workflows/library_net_tests.yml | 92 +++- .github/workflows/library_rust_tests.yml | 108 +++- .github/workflows/nighly_dafny.yml | 22 +- .../workflows/performance-benchmarks-go.yml | 44 +- .../workflows/performance-benchmarks-java.yml | 40 +- .../workflows/performance-benchmarks-net.yml | 46 +- .../performance-benchmarks-python.yml | 51 +- .../workflows/performance-benchmarks-rust.yml | 54 +- .github/workflows/sem_ver.yml | 52 +- .github/workflows/semantic_release.yml | 50 +- .github/workflows/smithy-diff.yml | 8 +- 30 files changed, 1666 insertions(+), 720 deletions(-) diff --git a/.github/workflows/check_only_keyword.yml b/.github/workflows/check_only_keyword.yml index 96af01bd4..804371a2c 100644 --- a/.github/workflows/check_only_keyword.yml +++ b/.github/workflows/check_only_keyword.yml @@ -13,9 +13,13 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - fetch-depth: 0 + action: actions/checkout@v6 + with: | + fetch-depth: 0 + attempt_limit: 3 + attempt_delay: 2000 - name: Check only keyword id: only-keyword diff --git a/.github/workflows/ci_static-analysis.yaml b/.github/workflows/ci_static-analysis.yaml index 559c3268e..bebdf0643 100644 --- a/.github/workflows/ci_static-analysis.yaml +++ b/.github/workflows/ci_static-analysis.yaml @@ -7,6 +7,10 @@ jobs: not-grep: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: not-grep uses: mattsb42-meta/not-grep@1.0.1 diff --git a/.github/workflows/dafny_format_version.yaml b/.github/workflows/dafny_format_version.yaml index 293a37dfd..cc62e4da3 100644 --- a/.github/workflows/dafny_format_version.yaml +++ b/.github/workflows/dafny_format_version.yaml @@ -16,10 +16,18 @@ jobs: outputs: version: ${{ steps.read_property.outputs.dafnyFormatVersion }} steps: - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Read version from Properties-file id: read_property - uses: christian-draeger/read-properties@1.1.1 + uses: Wandalen/wretry.action@master with: - path: "./project.properties" - properties: "dafnyFormatVersion" + action: christian-draeger/read-properties@1.1.1 + with: | + path: "./project.properties" + properties: "dafnyFormatVersion" + attempt_limit: 3 + attempt_delay: 2000 diff --git a/.github/workflows/dafny_interop_library_go_tests.yml b/.github/workflows/dafny_interop_library_go_tests.yml index 44cb9b248..d4e994430 100644 --- a/.github/workflows/dafny_interop_library_go_tests.yml +++ b/.github/workflows/dafny_interop_library_go_tests.yml @@ -40,19 +40,32 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 + - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: GoTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: GoTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup MPL Dafny uses: ./mpl/.github/actions/setup_dafny @@ -60,21 +73,29 @@ jobs: dafny-version: ${{ inputs.mpl-dafny }} - name: Update MPL submodule - working-directory: mpl - run: | - git fetch - git checkout ${{inputs.mpl-commit}} - git pull - git submodule update --init --recursive - git rev-parse HEAD + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + cd mpl + git fetch + git checkout ${{inputs.mpl-commit}} + git pull + git submodule update --init --recursive + git rev-parse HEAD - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Install Go - uses: actions/setup-go@v6 + uses: Wandalen/wretry.action@master with: - go-version: ${{ matrix.go-version }} + action: actions/setup-go@v6 + with: | + go-version: ${{ matrix.go-version }} + attempt_limit: 3 + attempt_delay: 2000 - name: Compile MPL with Dafny ${{inputs.mpl-dafny}} shell: bash diff --git a/.github/workflows/dafny_interop_test_net.yml b/.github/workflows/dafny_interop_test_net.yml index 32499c3cd..59de4f127 100644 --- a/.github/workflows/dafny_interop_test_net.yml +++ b/.github/workflows/dafny_interop_test_net.yml @@ -46,15 +46,23 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: recursive - fetch-depth: 0 + action: actions/checkout@v6 + with: | + submodules: recursive + fetch-depth: 0 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup MPL Dafny uses: ./mpl/.github/actions/setup_dafny @@ -62,24 +70,35 @@ jobs: dafny-version: ${{ inputs.mpl-dafny }} - name: Update MPL submodule - working-directory: mpl - run: | - git fetch - git checkout ${{inputs.mpl-commit}} - git pull - git submodule update --init --recursive - git rev-parse HEAD + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + cd mpl + git fetch + git checkout ${{inputs.mpl-commit}} + git pull + git submodule update --init --recursive + git rev-parse HEAD - name: Download Dependencies - working-directory: AwsEncryptionSDK - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: cd AwsEncryptionSDK && make setup_net - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Compile MPL with Dafny ${{inputs.mpl-dafny}} shell: bash diff --git a/.github/workflows/dafny_interop_test_vector_net.yml b/.github/workflows/dafny_interop_test_vector_net.yml index 00c583819..9f95cc47a 100644 --- a/.github/workflows/dafny_interop_test_vector_net.yml +++ b/.github/workflows/dafny_interop_test_vector_net.yml @@ -45,15 +45,23 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: recursive - fetch-depth: 0 + action: actions/checkout@v6 + with: | + submodules: recursive + fetch-depth: 0 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup MPL Dafny uses: ./mpl/.github/actions/setup_dafny @@ -61,24 +69,35 @@ jobs: dafny-version: ${{ inputs.mpl-dafny }} - name: Update MPL submodule - working-directory: mpl - run: | - git fetch - git checkout ${{inputs.mpl-commit}} - git pull - git submodule update --init --recursive - git rev-parse HEAD + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + cd mpl + git fetch + git checkout ${{inputs.mpl-commit}} + git pull + git submodule update --init --recursive + git rev-parse HEAD - name: Download Dependencies - working-directory: AwsEncryptionSDK - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: cd AwsEncryptionSDK && make setup_net - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Compile MPL with Dafny ${{inputs.mpl-dafny}} shell: bash @@ -103,15 +122,18 @@ jobs: make transpile_test_net - name: Fetch Python 2.3.0 Test Vectors - working-directory: ./ - shell: bash - run: | - PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors - mkdir -p $PYTHON_23_VECTOR_PATH - DOWNLOAD_NAME=python23.zip - curl --no-progress-meter --output $DOWNLOAD_NAME --location $VECTORS_URL - unzip -o -qq $DOWNLOAD_NAME -d $PYTHON_23_VECTOR_PATH - rm $DOWNLOAD_NAME + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors + mkdir -p $PYTHON_23_VECTOR_PATH + DOWNLOAD_NAME=python23.zip + curl --no-progress-meter --output $DOWNLOAD_NAME --location $VECTORS_URL + unzip -o -qq $DOWNLOAD_NAME -d $PYTHON_23_VECTOR_PATH + rm $DOWNLOAD_NAME - name: Decrypt Python 2.3.0 Test Vectors on .net48 (Windows ONLY) working-directory: ./AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors @@ -152,15 +174,23 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: recursive - fetch-depth: 0 + action: actions/checkout@v6 + with: | + submodules: recursive + fetch-depth: 0 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup MPL Dafny uses: ./mpl/.github/actions/setup_dafny @@ -168,24 +198,35 @@ jobs: dafny-version: ${{ inputs.mpl-dafny }} - name: Update MPL submodule - working-directory: mpl - run: | - git fetch - git checkout ${{inputs.mpl-commit}} - git pull - git submodule update --init --recursive - git rev-parse HEAD + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + cd mpl + git fetch + git checkout ${{inputs.mpl-commit}} + git pull + git submodule update --init --recursive + git rev-parse HEAD - name: Download Dependencies - working-directory: AwsEncryptionSDK - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: cd AwsEncryptionSDK && make setup_net - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Compile MPL with Dafny ${{inputs.mpl-dafny}} shell: bash @@ -251,19 +292,31 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Set up Dirs working-directory: ./AwsEncryptionSDK @@ -272,20 +325,32 @@ jobs: mkdir -p $NET_41_VECTOR_PATH - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_mpl-${{inputs.mpl-dafny}}_esdk-${{inputs.esdk-dafny}}_vectors - path: AwsEncryptionSDK/net41/vectors - - - uses: actions/setup-node@v6 + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_mpl-${{inputs.mpl-dafny}}_esdk-${{inputs.esdk-dafny}}_vectors + path: AwsEncryptionSDK/net41/vectors + attempt_limit: 3 + attempt_delay: 2000 + + - uses: Wandalen/wretry.action@master with: - node-version: 17 + action: actions/setup-node@v6 + with: | + node-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Install deps - run: | - openssl version - npm install @aws-crypto/integration-node - npm install fast-xml-parser + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + openssl version + npm install @aws-crypto/integration-node + npm install fast-xml-parser - name: Decrypt Generated Test Vectors with ESDK-JS working-directory: ./AwsEncryptionSDK diff --git a/.github/workflows/dafny_verify_version.yaml b/.github/workflows/dafny_verify_version.yaml index 5a07e474e..e6d8038d3 100644 --- a/.github/workflows/dafny_verify_version.yaml +++ b/.github/workflows/dafny_verify_version.yaml @@ -16,10 +16,18 @@ jobs: outputs: version: ${{ steps.read_property.outputs.dafnyVerifyVersion }} steps: - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Read version from Properties-file id: read_property - uses: christian-draeger/read-properties@1.1.1 + uses: Wandalen/wretry.action@master with: - path: "./project.properties" - properties: "dafnyVerifyVersion" + action: christian-draeger/read-properties@1.1.1 + with: | + path: "./project.properties" + properties: "dafnyVerifyVersion" + attempt_limit: 3 + attempt_delay: 2000 diff --git a/.github/workflows/dafny_version.yaml b/.github/workflows/dafny_version.yaml index 822cbd48f..e697e2a1a 100644 --- a/.github/workflows/dafny_version.yaml +++ b/.github/workflows/dafny_version.yaml @@ -16,10 +16,18 @@ jobs: outputs: version: ${{ steps.read_property.outputs.dafnyVersion }} steps: - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Read version from Properties-file id: read_property - uses: christian-draeger/read-properties@1.1.1 + uses: Wandalen/wretry.action@master with: - path: "./project.properties" - properties: "dafnyVersion" + action: christian-draeger/read-properties@1.1.1 + with: | + path: "./project.properties" + properties: "dafnyVersion" + attempt_limit: 3 + attempt_delay: 2000 diff --git a/.github/workflows/duvet.yaml b/.github/workflows/duvet.yaml index 5c3ac2580..68b5260c8 100644 --- a/.github/workflows/duvet.yaml +++ b/.github/workflows/duvet.yaml @@ -24,14 +24,22 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: true + action: actions/checkout@v6 + with: | + submodules: true + attempt_limit: 3 + attempt_delay: 2000 - name: Install duvet - shell: bash - run: | - cargo +stable install duvet + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + cargo +stable install duvet # //= aws-encryption-sdk-specification/framework/structures.md#overview # //= type=implication diff --git a/.github/workflows/go-release.yml b/.github/workflows/go-release.yml index ca4035559..13db4c5eb 100644 --- a/.github/workflows/go-release.yml +++ b/.github/workflows/go-release.yml @@ -30,21 +30,33 @@ jobs: git config --global core.longpaths true - name: Configure AWS Credentials for Tests - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: GoReleaseTest + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: GoReleaseTest + attempt_limit: 3 + attempt_delay: 2000 - name: Checkout repository - uses: actions/checkout@v6 + uses: Wandalen/wretry.action@master with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} + action: actions/checkout@v6 + with: | + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + attempt_limit: 3 + attempt_delay: 2000 - name: Update submodules - run: | - git submodule update --init --recursive + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + git submodule update --init --recursive - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny diff --git a/.github/workflows/library_codegen.yml b/.github/workflows/library_codegen.yml index a3d44b1b4..1bdb00d81 100644 --- a/.github/workflows/library_codegen.yml +++ b/.github/workflows/library_codegen.yml @@ -31,7 +31,11 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 # The specification submodule is private so we don't have access, but we don't need # it to verify the Dafny code. Instead we manually pull the submodules we DO need. - run: git submodule update --init libraries @@ -46,27 +50,39 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: ${{ matrix.dotnet-version }} + action: actions/setup-dotnet@v5 + with: | + dotnet-version: ${{ matrix.dotnet-version }} + attempt_limit: 3 + attempt_delay: 2000 # even though we just installed dotnet 6, maybe dotnet 8 is out there somewhere - name: Create temporary global.json run: echo '{"sdk":{"rollForward":"latestFeature","version":"6.0.0"}}' > ./global.json - name: Setup Java 17 for codegen - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: "17" + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: "17" + attempt_limit: 3 + attempt_delay: 2000 - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Install Go - uses: actions/setup-go@v6 + uses: Wandalen/wretry.action@master with: - go-version: ${{ matrix.go-version }} + action: actions/setup-go@v6 + with: | + go-version: ${{ matrix.go-version }} + attempt_limit: 3 + attempt_delay: 2000 - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/library_dafny_verification.yml b/.github/workflows/library_dafny_verification.yml index c59deb40d..034c97b6c 100644 --- a/.github/workflows/library_dafny_verification.yml +++ b/.github/workflows/library_dafny_verification.yml @@ -29,7 +29,11 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules run: | git submodule update --init libraries @@ -38,9 +42,13 @@ jobs: # dafny-reportgenerator requires next6 # but only 7.0 is installed on macos-15-large - name: Setup .NET Core SDK '6.0.x' - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "9.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "9.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny diff --git a/.github/workflows/library_format.yml b/.github/workflows/library_format.yml index f82127bf6..49367e7e8 100644 --- a/.github/workflows/library_format.yml +++ b/.github/workflows/library_format.yml @@ -32,9 +32,13 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: recursive + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny diff --git a/.github/workflows/library_go_tests.yml b/.github/workflows/library_go_tests.yml index defc9fc1a..043180055 100644 --- a/.github/workflows/library_go_tests.yml +++ b/.github/workflows/library_go_tests.yml @@ -36,19 +36,31 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: GoTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: GoTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -60,12 +72,20 @@ jobs: - name: Setup NASM for Windows (aws-lc-sys) if: matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Install Go - uses: actions/setup-go@v6 + uses: Wandalen/wretry.action@master with: - go-version: ${{ matrix.go-version }} + action: actions/setup-go@v6 + with: | + go-version: ${{ matrix.go-version }} + attempt_limit: 3 + attempt_delay: 2000 - name: Compile ${{ matrix.library }} implementation shell: bash diff --git a/.github/workflows/library_interop_keyring_test_vectors.yml b/.github/workflows/library_interop_keyring_test_vectors.yml index 6b11a7ca5..900645a92 100644 --- a/.github/workflows/library_interop_keyring_test_vectors.yml +++ b/.github/workflows/library_interop_keyring_test_vectors.yml @@ -44,47 +44,75 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 - name: Install OpenSSL if: matrix.os != 'ubuntu-22.04' && matrix.language == 'c' - run: brew install openssl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: brew install openssl - name: Install dependencies - if: matrix.os != 'ubuntu-22.04' && matrix.language == 'c' - run: brew install json-c + if: matrix.os != 'ubuntu-22.04' && matrix.language == 'c' + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: brew install json-c - name: Install LibCurl if: matrix.os == 'ubuntu-22.04' && matrix.language == 'c' - shell: bash - run: | - sudo apt-get update - sudo apt-get install libcurl4-openssl-dev --fix-missing + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + sudo apt-get update + sudo apt-get install libcurl4-openssl-dev --fix-missing - name: Checkout C-ESDK if: matrix.language == 'c' - uses: actions/checkout@v6 + uses: Wandalen/wretry.action@master with: - repository: "aws/aws-encryption-sdk-c" - path: ./${{ matrix.library }}/aws-encryption-sdk-c - submodules: recursive + action: actions/checkout@v6 + with: | + repository: aws/aws-encryption-sdk-c + path: ./${{ matrix.library }}/aws-encryption-sdk-c + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 - name: Checkout AWS C++ SDK if: matrix.language == 'c' - uses: actions/checkout@v6 + uses: Wandalen/wretry.action@master with: - repository: "aws/aws-sdk-cpp" - path: ./${{ matrix.library }}/aws-encryption-sdk-c/aws-sdk-cpp - submodules: recursive + action: actions/checkout@v6 + with: | + repository: aws/aws-sdk-cpp + path: ./${{ matrix.library }}/aws-encryption-sdk-c/aws-sdk-cpp + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 - name: Build and install aws-sdk-cpp (with retry) if: matrix.language == 'c' && matrix.os != 'ubuntu-22.04' @@ -149,46 +177,74 @@ jobs: # Set up runtimes - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} if: matrix.language == 'net' - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: ${{ matrix.dotnet-version }} + action: actions/setup-dotnet@v5 + with: | + dotnet-version: ${{ matrix.dotnet-version }} + attempt_limit: 3 + attempt_delay: 2000 # Setup Java 8 - name: Setup Java 8 if: matrix.language == 'java' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: corretto + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 # Setup Java in Rust is needed for running polymorph - name: Setup Java 17 if: matrix.language == 'java' || matrix.language == 'rust' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: corretto + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Python for running tests if: matrix.language == 'python' - uses: actions/setup-python@v6 + uses: Wandalen/wretry.action@master + with: + action: actions/setup-python@v6 + with: | + python-version: 3.11 + architecture: x64 + attempt_limit: 3 + attempt_delay: 2000 + - uses: nick-fields/retry@v3 with: - python-version: 3.11 - architecture: x64 - - run: | - python -m pip install --upgrade pip - pip install --upgrade tox - pip install poetry + timeout_minutes: 10 + max_attempts: 3 + command: | + python -m pip install --upgrade pip + pip install --upgrade tox + pip install poetry - name: Setup Rust Toolchain for GitHub CI if: matrix.language == 'rust' - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows in Rust (aws-lc-sys) if: matrix.language == 'rust' && matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny Rust if: matrix.language == 'rust' @@ -334,77 +390,117 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 - name: Install OpenSSL if: matrix.os != 'ubuntu-22.04' && matrix.decrypting_language == 'c' - run: brew install openssl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: brew install openssl - name: Install dependencies - if: matrix.os != 'ubuntu-22.04' && matrix.decrypting_language == 'c' - run: brew install json-c + if: matrix.os != 'ubuntu-22.04' && matrix.decrypting_language == 'c' + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: brew install json-c - name: Install LibCurl if: matrix.os == 'ubuntu-22.04' && matrix.decrypting_language == 'c' - shell: bash - run: | - sudo apt-get update - sudo apt-get install libcurl4-openssl-dev --fix-missing + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + sudo apt-get update + sudo apt-get install libcurl4-openssl-dev --fix-missing - name: Checkout C-ESDK if: matrix.decrypting_language == 'c' - uses: actions/checkout@v6 + uses: Wandalen/wretry.action@master with: - repository: "aws/aws-encryption-sdk-c" - path: ./${{ matrix.library }}/aws-encryption-sdk-c - submodules: recursive + action: actions/checkout@v6 + with: | + repository: aws/aws-encryption-sdk-c + path: ./${{ matrix.library }}/aws-encryption-sdk-c + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 - name: Checkout AWS C++ SDK if: matrix.decrypting_language == 'c' - uses: actions/checkout@v6 + uses: Wandalen/wretry.action@master with: - repository: "aws/aws-sdk-cpp" - path: ./${{ matrix.library }}/aws-encryption-sdk-c/aws-sdk-cpp - submodules: recursive + action: actions/checkout@v6 + with: | + repository: aws/aws-sdk-cpp + path: ./${{ matrix.library }}/aws-encryption-sdk-c/aws-sdk-cpp + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 - name: Build and install aws-sdk-cpp if: matrix.decrypting_language == 'c' && matrix.os != 'ubuntu-22.04' - working-directory: ./${{ matrix.library }}/aws-encryption-sdk-c - run: | - pwd - ls - # remove the following line once aws-sdk-cpp fixes linux-shared/SimpleUDP.cpp - perl -i -p -e 's/"-Werror"//' aws-sdk-cpp/cmake/compiler_settings.cmake - mkdir -p aws-encryption-sdk-c/build-aws-sdk-cpp || true - mkdir -p install || true - cd build-aws-sdk-cpp - cmake -G Xcode -DTARGET_ARCH="APPLE" -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/aws-encryption-sdk-c/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/aws-encryption-sdk-c/install ../aws-sdk-cpp - xcodebuild -target ALL_BUILD - xcodebuild -target install + uses: nick-fields/retry@v3 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + shell: bash + command: | + cd ./${{ matrix.library }}/aws-encryption-sdk-c + pwd + ls + # remove the following line once aws-sdk-cpp fixes linux-shared/SimpleUDP.cpp + perl -i -p -e 's/"-Werror"//' aws-sdk-cpp/cmake/compiler_settings.cmake + mkdir -p aws-encryption-sdk-c/build-aws-sdk-cpp || true + mkdir -p install || true + cd build-aws-sdk-cpp + cmake -G Xcode -DTARGET_ARCH="APPLE" -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/aws-encryption-sdk-c/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/aws-encryption-sdk-c/install ../aws-sdk-cpp + xcodebuild -target ALL_BUILD + xcodebuild -target install - name: Build and install aws-sdk-cpp if: matrix.os == 'ubuntu-22.04' && matrix.decrypting_language == 'c' - working-directory: ./${{ matrix.library }}/aws-encryption-sdk-c - run: | - pwd - ls - # remove the following line once aws-sdk-cpp fixes linux-shared/SimpleUDP.cpp - perl -i -p -e 's/"-Werror"//' aws-sdk-cpp/cmake/compiler_settings.cmake - mkdir -p build-aws-sdk-cpp || true - mkdir -p install || true - cd build-aws-sdk-cpp - cmake -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/TestVectors/aws-encryption-sdk-c/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/TestVectors/aws-encryption-sdk-c/install ../aws-sdk-cpp - make - make install + uses: nick-fields/retry@v3 + with: + timeout_minutes: 30 + max_attempts: 3 + retry_on: error + shell: bash + command: | + cd ./${{ matrix.library }}/aws-encryption-sdk-c + pwd + ls + # remove the following line once aws-sdk-cpp fixes linux-shared/SimpleUDP.cpp + perl -i -p -e 's/"-Werror"//' aws-sdk-cpp/cmake/compiler_settings.cmake + mkdir -p build-aws-sdk-cpp || true + mkdir -p install || true + cd build-aws-sdk-cpp + cmake -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/TestVectors/aws-encryption-sdk-c/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/TestVectors/aws-encryption-sdk-c/install ../aws-sdk-cpp + make + make install - name: Build C-ESDK if: matrix.decrypting_language == 'c' && matrix.os != 'ubuntu-22.04' @@ -431,46 +527,74 @@ jobs: # Set up runtimes - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} if: matrix.decrypting_language == 'net' - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: ${{ matrix.dotnet-version }} + action: actions/setup-dotnet@v5 + with: | + dotnet-version: ${{ matrix.dotnet-version }} + attempt_limit: 3 + attempt_delay: 2000 # Setup Java in Rust is needed for running polymorph - name: Setup Java 8 if: matrix.decrypting_language == 'java' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 8 + action: actions/setup-java@v5 + with: | + distribution: corretto + java-version: 8 + attempt_limit: 3 + attempt_delay: 2000 # Setup Java in Rust is needed for running polymorph - name: Setup Java 17 if: matrix.decrypting_language == 'java' || matrix.decrypting_language == 'rust' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: corretto + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Python for running tests if: matrix.decrypting_language == 'python' - uses: actions/setup-python@v6 + uses: Wandalen/wretry.action@master + with: + action: actions/setup-python@v6 + with: | + python-version: 3.11 + architecture: x64 + attempt_limit: 3 + attempt_delay: 2000 + - uses: nick-fields/retry@v3 with: - python-version: 3.11 - architecture: x64 - - run: | - python -m pip install --upgrade pip - pip install --upgrade tox - pip install poetry + timeout_minutes: 10 + max_attempts: 3 + command: | + python -m pip install --upgrade pip + pip install --upgrade tox + pip install poetry - name: Setup Rust Toolchain for GitHub CI if: matrix.decrypting_language == 'rust' - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows in Rust (aws-lc-sys) if: matrix.decrypting_language == 'rust' && matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny Rust if: matrix.decrypting_language == 'rust' @@ -560,18 +684,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_java_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_java_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest if: matrix.decrypting_language != 'c' @@ -590,18 +722,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_net_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_net_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest if: matrix.decrypting_language != 'c' @@ -620,18 +760,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_rust_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_rust_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest if: matrix.decrypting_language != 'c' @@ -650,18 +798,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_python_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_python_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest if: matrix.decrypting_language != 'c' @@ -680,18 +836,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_go_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_go_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest if: matrix.decrypting_language != 'c' @@ -710,18 +874,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 7200 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 7200 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 - with: - name: ${{matrix.os}}_vector_artifact_c_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + uses: Wandalen/wretry.action@master + with: + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_c_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest if: matrix.decrypting_language != 'c' diff --git a/.github/workflows/library_interop_mkp_test_vectors.yml b/.github/workflows/library_interop_mkp_test_vectors.yml index 40010c657..f5dcf696b 100644 --- a/.github/workflows/library_interop_mkp_test_vectors.yml +++ b/.github/workflows/library_interop_mkp_test_vectors.yml @@ -60,52 +60,84 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 # Set up runtimes - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} if: matrix.language == 'net' - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: ${{ matrix.dotnet-version }} + action: actions/setup-dotnet@v5 + with: | + dotnet-version: ${{ matrix.dotnet-version }} + attempt_limit: 3 + attempt_delay: 2000 # Setup Java in Rust is needed for running polymorph - name: Setup Java 17 if: matrix.language == 'java_mkp' || matrix.language == 'java' || matrix.language == 'rust' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: corretto + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Python for running tests if: matrix.language == 'python_mkp' || matrix.language == 'python' - uses: actions/setup-python@v6 - with: - python-version: 3.11 - architecture: x64 - - run: | - python -m pip install --upgrade pip - pip install --upgrade tox - pip install poetry + uses: Wandalen/wretry.action@master + with: + action: actions/setup-python@v6 + with: | + python-version: 3.11 + architecture: x64 + attempt_limit: 3 + attempt_delay: 2000 + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + python -m pip install --upgrade pip + pip install --upgrade tox + pip install poetry - name: Setup Rust Toolchain for GitHub CI if: matrix.language == 'rust' - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows in Rust (aws-lc-sys) if: matrix.language == 'rust' && matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny Rust if: matrix.language == 'rust' @@ -246,52 +278,84 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 # Set up runtimes - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} if: matrix.decrypting_language == 'net' - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: ${{ matrix.dotnet-version }} + action: actions/setup-dotnet@v5 + with: | + dotnet-version: ${{ matrix.dotnet-version }} + attempt_limit: 3 + attempt_delay: 2000 # Setup Java in Rust is needed for running polymorph - name: Setup Java 17 if: matrix.decrypting_language == 'java' || matrix.decrypting_language == 'java_mkp'|| matrix.decrypting_language == 'rust' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: corretto + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Python for running tests if: matrix.decrypting_language == 'python' || matrix.decrypting_language == 'python_mkp' - uses: actions/setup-python@v6 - with: - python-version: 3.11 - architecture: x64 - - run: | - python -m pip install --upgrade pip - pip install --upgrade tox - pip install poetry + uses: Wandalen/wretry.action@master + with: + action: actions/setup-python@v6 + with: | + python-version: 3.11 + architecture: x64 + attempt_limit: 3 + attempt_delay: 2000 + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + python -m pip install --upgrade pip + pip install --upgrade tox + pip install poetry - name: Setup Rust Toolchain for GitHub CI if: matrix.decrypting_language == 'rust' - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows in Rust (aws-lc-sys) if: matrix.decrypting_language == 'rust' && matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny Rust if: matrix.decrypting_language == 'rust' @@ -381,18 +445,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_java_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_java_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} @@ -400,18 +472,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_net_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_net_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} @@ -419,18 +499,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_rust_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_rust_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} @@ -438,18 +526,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_python_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_python_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} @@ -457,18 +553,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_python_mkp_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_python_mkp_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} @@ -476,18 +580,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_java_mkp_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_java_mkp_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} @@ -495,18 +607,26 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_go_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_go_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} @@ -536,34 +656,54 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/setup-node@v6 + - uses: Wandalen/wretry.action@master with: - node-version: 17 + action: actions/setup-node@v6 + with: | + node-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Install deps - run: | - openssl version - npm install @aws-crypto/integration-node - npm install fast-xml-parser + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + openssl version + npm install @aws-crypto/integration-node + npm install fast-xml-parser - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact_${{matrix.encrypting_language}}_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/ + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_${{matrix.encrypting_language}}_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/ + attempt_limit: 3 + attempt_delay: 2000 # Sadly we have to zip up the artifacts again to be consumed by JS - name: Decrypt Generated Test Vectors with ESDK-JS @@ -601,35 +741,54 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/setup-node@v6 + - uses: Wandalen/wretry.action@master with: - node-version: 17 + action: actions/setup-node@v6 + with: | + node-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Install deps - run: | - openssl version - npm install @aws-crypto/integration-node - npm install fast-xml-parser + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + openssl version + npm install @aws-crypto/integration-node + npm install fast-xml-parser - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - # we can pick any manifest we want. i choose java because it runs 6 billion devices - name: ubuntu-22.04_vector_artifact_java_legacy_format_${{github.sha}} - path: ./${{matrix.library}} + action: actions/download-artifact@v8 + with: | + name: ubuntu-22.04_vector_artifact_java_legacy_format_${{github.sha}} + path: ./${{matrix.library}} + attempt_limit: 3 + attempt_delay: 2000 - name: Create JS decrypt manifest working-directory: ${{matrix.library}} @@ -670,52 +829,84 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: InterOpTests - role-duration-seconds: 3600 + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: InterOpTests + role-duration-seconds: 3600 + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 # Set up runtimes - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} if: matrix.decrypting_language == 'net' - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: ${{ matrix.dotnet-version }} + action: actions/setup-dotnet@v5 + with: | + dotnet-version: ${{ matrix.dotnet-version }} + attempt_limit: 3 + attempt_delay: 2000 # Setup Java in Rust is needed for running polymorph - name: Setup Java 17 if: matrix.decrypting_language == 'java' || matrix.decrypting_language == 'java_mkp'|| matrix.decrypting_language == 'rust' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: corretto + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Python for running tests if: matrix.decrypting_language == 'python' || matrix.decrypting_language == 'python_mkp' - uses: actions/setup-python@v6 - with: - python-version: 3.11 - architecture: x64 - - run: | - python -m pip install --upgrade pip - pip install --upgrade tox - pip install poetry + uses: Wandalen/wretry.action@master + with: + action: actions/setup-python@v6 + with: | + python-version: 3.11 + architecture: x64 + attempt_limit: 3 + attempt_delay: 2000 + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + python -m pip install --upgrade pip + pip install --upgrade tox + pip install poetry - name: Setup Rust Toolchain for GitHub CI if: matrix.decrypting_language == 'rust' - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows in Rust (aws-lc-sys) if: matrix.decrypting_language == 'rust' && matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny Rust if: matrix.decrypting_language == 'rust' @@ -804,10 +995,14 @@ jobs: make transpile_python CORES=$CORES - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 - with: - name: ${{matrix.os}}_vector_artifact_javascript_legacy_format_${{github.sha}} - path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + uses: Wandalen/wretry.action@master + with: + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact_javascript_legacy_format_${{github.sha}} + path: ./${{matrix.library}}/runtimes/${{matrix.decrypting_language}} + attempt_limit: 3 + attempt_delay: 2000 - name: Decrypt Encrypt Manifest working-directory: ./${{ matrix.library }} diff --git a/.github/workflows/library_interop_tests.yml b/.github/workflows/library_interop_tests.yml index 39cd9f740..7e88da9b8 100644 --- a/.github/workflows/library_interop_tests.yml +++ b/.github/workflows/library_interop_tests.yml @@ -41,24 +41,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -66,8 +82,11 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Download Dependencies - working-directory: ./AwsEncryptionSDK - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: cd ./AwsEncryptionSDK && make setup_net - name: Compile AwsEncryptionSDK implementation shell: bash @@ -86,15 +105,18 @@ jobs: make transpile_net CORES=$CORES - name: Fetch Python 2.3.0 Test Vectors - working-directory: ./ - shell: bash - run: | - PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors - mkdir -p $PYTHON_23_VECTOR_PATH - DOWNLOAD_NAME=python23.zip - curl --no-progress-meter --output $DOWNLOAD_NAME --location $VECTORS_URL - unzip -o -qq $DOWNLOAD_NAME -d $PYTHON_23_VECTOR_PATH - rm $DOWNLOAD_NAME + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + PYTHON_23_VECTOR_PATH=$GITHUB_WORKSPACE/python23/vectors + mkdir -p $PYTHON_23_VECTOR_PATH + DOWNLOAD_NAME=python23.zip + curl --no-progress-meter --output $DOWNLOAD_NAME --location $VECTORS_URL + unzip -o -qq $DOWNLOAD_NAME -d $PYTHON_23_VECTOR_PATH + rm $DOWNLOAD_NAME - name: Decrypt Python 2.3.0 Test Vectors on .net48 (Windows ONLY) working-directory: ./AwsEncryptionSDK/runtimes/net/TestVectorsNative/TestVectors @@ -139,24 +161,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -164,8 +202,11 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Download Dependencies - working-directory: ./AwsEncryptionSDK - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: cd ./AwsEncryptionSDK && make setup_net - name: Compile AwsEncryptionSDK implementation shell: bash @@ -238,19 +279,31 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Set up Dirs working-directory: ./AwsEncryptionSDK @@ -259,20 +312,32 @@ jobs: mkdir -p $NET_41_VECTOR_PATH - name: Download Encrypt Manifest Artifact - uses: actions/download-artifact@v8 + uses: Wandalen/wretry.action@master with: - name: ${{matrix.os}}_vector_artifact - path: AwsEncryptionSDK/net41/vectors + action: actions/download-artifact@v8 + with: | + name: ${{matrix.os}}_vector_artifact + path: AwsEncryptionSDK/net41/vectors + attempt_limit: 3 + attempt_delay: 2000 - - uses: actions/setup-node@v6 + - uses: Wandalen/wretry.action@master with: - node-version: 17 + action: actions/setup-node@v6 + with: | + node-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Install deps - run: | - openssl version - npm install @aws-crypto/integration-node - npm install fast-xml-parser + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + openssl version + npm install @aws-crypto/integration-node + npm install fast-xml-parser - name: Decrypt Generated Test Vectors with ESDK-JS working-directory: ./AwsEncryptionSDK diff --git a/.github/workflows/library_java_tests.yml b/.github/workflows/library_java_tests.yml index af07be8a5..1648e51f2 100644 --- a/.github/workflows/library_java_tests.yml +++ b/.github/workflows/library_java_tests.yml @@ -35,18 +35,30 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: JavaTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: JavaTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -66,10 +78,14 @@ jobs: update-and-regenerate-mpl: true - name: Setup Java 8 - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 8 + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: 8 + attempt_limit: 3 + attempt_delay: 2000 - name: Build ${{ matrix.library }} implementation shell: bash @@ -85,10 +101,14 @@ jobs: make test_java - name: Setup Java 11 - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 11 + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: 11 + attempt_limit: 3 + attempt_delay: 2000 - name: Clean for next Java uses: gradle/gradle-build-action@v3 @@ -109,16 +129,24 @@ jobs: build-root-directory: ./${{ matrix.library }}/runtimes/java - name: Setup Java 8 - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 8 + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: 8 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Java 17 - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Clean for next Java uses: gradle/gradle-build-action@v3 diff --git a/.github/workflows/library_legacy_interop_test_vectors.yml b/.github/workflows/library_legacy_interop_test_vectors.yml index 2bf6fbdc7..6e832d756 100644 --- a/.github/workflows/library_legacy_interop_test_vectors.yml +++ b/.github/workflows/library_legacy_interop_test_vectors.yml @@ -51,30 +51,46 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: "recursive" + action: actions/checkout@v6 + with: | + submodules: "recursive" + attempt_limit: 3 + attempt_delay: 2000 # Set up runtimes - name: Setup .NET Core SDK ${{ matrix.dotnet-version }} if: matrix.language == 'net' - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: ${{ matrix.dotnet-version }} + action: actions/setup-dotnet@v5 + with: | + dotnet-version: ${{ matrix.dotnet-version }} + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Java 8 if: matrix.language == 'java' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 8 + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: 8 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Java 17 if: matrix.language == 'java' - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: 17 + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: 17 + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -83,14 +99,22 @@ jobs: - name: Setup Python for running tests if: matrix.language == 'python' - uses: actions/setup-python@v6 + uses: Wandalen/wretry.action@master with: - python-version: 3.11 - architecture: x64 - - run: | - python -m pip install --upgrade pip - pip install --upgrade tox - pip install poetry + action: actions/setup-python@v6 + with: | + python-version: 3.11 + architecture: x64 + attempt_limit: 3 + attempt_delay: 2000 + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + python -m pip install --upgrade pip + pip install --upgrade tox + pip install poetry - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies @@ -133,11 +157,15 @@ jobs: # TestVectors will call KMS - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: LegacyInterOpTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: LegacyInterOpTests + attempt_limit: 3 + attempt_delay: 2000 # Extract test vector zips - name: Unzip legacy test vectors diff --git a/.github/workflows/library_net_tests.yml b/.github/workflows/library_net_tests.yml index 83cff7a78..4bb1c88ac 100644 --- a/.github/workflows/library_net_tests.yml +++ b/.github/workflows/library_net_tests.yml @@ -48,24 +48,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -85,8 +101,12 @@ jobs: update-and-regenerate-mpl: true - name: Download Dependencies - working-directory: ${{ matrix.library }} - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + working-directory: ${{ matrix.library }} + command: make setup_net - name: Compile ${{ matrix.library }} implementation shell: bash @@ -158,24 +178,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTestVectors + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTestVectors + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -195,8 +231,12 @@ jobs: update-and-regenerate-mpl: true - name: Download Dependencies - working-directory: ${{ matrix.library }} - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + working-directory: ${{ matrix.library }} + command: make setup_net - name: Compile ${{ matrix.library }} implementation shell: bash diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index c6bec70e6..2f77cac3f 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -34,24 +34,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: RustTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: RustTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Rust Toolchain for GitHub CI - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt, clippy + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt, clippy + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -59,14 +75,22 @@ jobs: dafny-version: 4.10.0 - name: Setup Java 17 for codegen - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: "17" + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: "17" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows (aws-lc-sys) if: matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies @@ -133,24 +157,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: RustTestVectors + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: RustTestVectors + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Rust Toolchain for GitHub CI - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -158,14 +198,22 @@ jobs: dafny-version: 4.10.0 - name: Setup Java 17 for codegen - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: "17" + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: "17" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows (aws-lc-sys) if: matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/nighly_dafny.yml b/.github/workflows/nighly_dafny.yml index 46533389e..58850c753 100644 --- a/.github/workflows/nighly_dafny.yml +++ b/.github/workflows/nighly_dafny.yml @@ -83,18 +83,26 @@ jobs: steps: # We need access to the role that is able to get CI Bot Creds - name: Configure AWS Credentials for Release - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::587316601012:role/GitHub-CI-CI-Bot-Credential-Access-Role-us-west-2 - role-session-name: Dafny_Issue_Blocker + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::587316601012:role/GitHub-CI-CI-Bot-Credential-Access-Role-us-west-2 + role-session-name: Dafny_Issue_Blocker + attempt_limit: 3 + attempt_delay: 2000 # Use AWS Secrets Manger GHA to retrieve CI Bot Creds - name: Get CI Bot Creds Secret - uses: aws-actions/aws-secretsmanager-get-secrets@v2 + uses: Wandalen/wretry.action@master with: - secret-ids: Github/aws-crypto-tools-ci-bot - parse-json-secrets: true + action: aws-actions/aws-secretsmanager-get-secrets@v2 + with: | + secret-ids: Github/aws-crypto-tools-ci-bot + parse-json-secrets: true + attempt_limit: 3 + attempt_delay: 2000 - name: Create release blocker on dafny-lang/dafny env: diff --git a/.github/workflows/performance-benchmarks-go.yml b/.github/workflows/performance-benchmarks-go.yml index 23bc9e1ce..a27325cc1 100644 --- a/.github/workflows/performance-benchmarks-go.yml +++ b/.github/workflows/performance-benchmarks-go.yml @@ -37,19 +37,31 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: GoTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: GoTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -61,12 +73,20 @@ jobs: - name: Setup NASM for Windows (aws-lc-sys) if: matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Install Go - uses: actions/setup-go@v6 + uses: Wandalen/wretry.action@master with: - go-version: ${{ matrix.go-version }} + action: actions/setup-go@v6 + with: | + go-version: ${{ matrix.go-version }} + attempt_limit: 3 + attempt_delay: 2000 - name: Compile ${{ matrix.library }} implementation shell: bash diff --git a/.github/workflows/performance-benchmarks-java.yml b/.github/workflows/performance-benchmarks-java.yml index 1897d38ad..439c0d802 100644 --- a/.github/workflows/performance-benchmarks-java.yml +++ b/.github/workflows/performance-benchmarks-java.yml @@ -26,25 +26,41 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: GoTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: GoTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Java Corretto ${{matrix.java}} - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: ${{matrix.java}} + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: ${{matrix.java}} + attempt_limit: 3 + attempt_delay: 2000 - name: Run Performance Benchmarks - Quick Mode shell: bash diff --git a/.github/workflows/performance-benchmarks-net.yml b/.github/workflows/performance-benchmarks-net.yml index 518233c97..eecdd7664 100644 --- a/.github/workflows/performance-benchmarks-net.yml +++ b/.github/workflows/performance-benchmarks-net.yml @@ -37,24 +37,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: NetTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: NetTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup .NET Core SDK 6 - uses: actions/setup-dotnet@v5 + uses: Wandalen/wretry.action@master with: - dotnet-version: "6.0.x" + action: actions/setup-dotnet@v5 + with: | + dotnet-version: "6.0.x" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -74,8 +90,12 @@ jobs: update-and-regenerate-mpl: true - name: Download Dependencies - working-directory: ${{ matrix.library }} - run: make setup_net + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + working-directory: ${{ matrix.library }} + command: make setup_net - name: Compile ${{ matrix.library }} implementation shell: bash diff --git a/.github/workflows/performance-benchmarks-python.yml b/.github/workflows/performance-benchmarks-python.yml index 86a4feff5..c25532a72 100644 --- a/.github/workflows/performance-benchmarks-python.yml +++ b/.github/workflows/performance-benchmarks-python.yml @@ -20,31 +20,56 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: GoTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: GoTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Python ${{ matrix.python-version }} for running tests - uses: actions/setup-python@v6 + uses: Wandalen/wretry.action@master with: - python-version: ${{ matrix.python-version }} - architecture: x64 + action: actions/setup-python@v6 + with: | + python-version: ${{ matrix.python-version }} + architecture: x64 + attempt_limit: 3 + attempt_delay: 2000 + + - name: Install Python Dependencies + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + pip install -r requirements.txt + working-directory: ./${{matrix.benchmark-dir}}/benchmarks/python - name: Run Performance Benchmarks - Quick Mode shell: bash working-directory: ./${{matrix.benchmark-dir}}/benchmarks/python run: | - pip install -r requirements.txt python esdk_benchmark.py --quick - name: Parse and Format Logs diff --git a/.github/workflows/performance-benchmarks-rust.yml b/.github/workflows/performance-benchmarks-rust.yml index 362ef42c2..bdc381c23 100644 --- a/.github/workflows/performance-benchmarks-rust.yml +++ b/.github/workflows/performance-benchmarks-rust.yml @@ -34,24 +34,40 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 - name: Init Submodules - shell: bash - run: | - git submodule update --init libraries - git submodule update --init --recursive mpl + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + shell: bash + command: | + git submodule update --init libraries + git submodule update --init --recursive mpl - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 - role-session-name: RustTests + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::370957321024:role/GitHub-CI-Public-ESDK-Dafny-Role-us-west-2 + role-session-name: RustTests + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Rust Toolchain for GitHub CI - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: Wandalen/wretry.action@master with: - components: rustfmt + action: actions-rust-lang/setup-rust-toolchain@v1 + with: | + components: rustfmt + attempt_limit: 3 + attempt_delay: 2000 - name: Setup Dafny uses: ./mpl/.github/actions/setup_dafny @@ -59,14 +75,22 @@ jobs: dafny-version: 4.10.0 - name: Setup Java 17 for codegen - uses: actions/setup-java@v5 + uses: Wandalen/wretry.action@master with: - distribution: "corretto" - java-version: "17" + action: actions/setup-java@v5 + with: | + distribution: "corretto" + java-version: "17" + attempt_limit: 3 + attempt_delay: 2000 - name: Setup NASM for Windows (aws-lc-sys) if: matrix.os == 'windows-latest' - uses: ilammy/setup-nasm@v1 + uses: Wandalen/wretry.action@master + with: + action: ilammy/setup-nasm@v1 + attempt_limit: 3 + attempt_delay: 2000 - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/sem_ver.yml b/.github/workflows/sem_ver.yml index 7494e58b0..f1e37f09c 100644 --- a/.github/workflows/sem_ver.yml +++ b/.github/workflows/sem_ver.yml @@ -15,28 +15,44 @@ jobs: run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - submodules: recursive + action: actions/checkout@v6 + with: | + submodules: recursive + attempt_limit: 3 + attempt_delay: 2000 # We need access to the role that is able to get CI Bot Creds - name: Configure AWS Credentials for Release - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::587316601012:role/GitHub-CI-CI-Bot-Credential-Access-Role-us-west-2 - role-session-name: CI_Bot_Release + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::587316601012:role/GitHub-CI-CI-Bot-Credential-Access-Role-us-west-2 + role-session-name: CI_Bot_Release + attempt_limit: 3 + attempt_delay: 2000 - name: Upgrade Node - uses: actions/setup-node@v6 + uses: Wandalen/wretry.action@master with: - node-version: 21 + action: actions/setup-node@v6 + with: | + node-version: 21 + attempt_limit: 3 + attempt_delay: 2000 # Use AWS Secrets Manger GHA to retrieve CI Bot Creds - name: Get CI Bot Creds Secret - uses: aws-actions/aws-secretsmanager-get-secrets@v2 + uses: Wandalen/wretry.action@master with: - secret-ids: Github/aws-crypto-tools-ci-bot - parse-json-secrets: true + action: aws-actions/aws-secretsmanager-get-secrets@v2 + with: | + secret-ids: Github/aws-crypto-tools-ci-bot + parse-json-secrets: true + attempt_limit: 3 + attempt_delay: 2000 # Log in as the CI Bot - name: Log in as CI Bot @@ -48,6 +64,14 @@ jobs: # Test to see if we can setup semantic release - name: Test Semantic Release Installation - uses: actions/checkout@v6 - - run: | - make setup_semantic_release + uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + make setup_semantic_release diff --git a/.github/workflows/semantic_release.yml b/.github/workflows/semantic_release.yml index 8c952d37f..917acf0d1 100644 --- a/.github/workflows/semantic_release.yml +++ b/.github/workflows/semantic_release.yml @@ -23,29 +23,49 @@ jobs: - name: Support longpaths on Git checkout run: | git config --global core.longpaths true - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master + with: + action: actions/checkout@v6 + attempt_limit: 3 + attempt_delay: 2000 # We only pull in the submodules we need to build the library - - run: git submodule update --init libraries + - uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: git submodule update --init libraries # We need access to the role that is able to get CI Bot Creds - name: Configure AWS Credentials for Release - uses: aws-actions/configure-aws-credentials@v6 + uses: Wandalen/wretry.action@master with: - aws-region: us-west-2 - role-to-assume: arn:aws:iam::587316601012:role/GitHub-CI-CI-Bot-Credential-Access-Role-us-west-2 - role-session-name: CI_Bot_Release + action: aws-actions/configure-aws-credentials@v6 + with: | + aws-region: us-west-2 + role-to-assume: arn:aws:iam::587316601012:role/GitHub-CI-CI-Bot-Credential-Access-Role-us-west-2 + role-session-name: CI_Bot_Release + attempt_limit: 3 + attempt_delay: 2000 - name: Upgrade Node - uses: actions/setup-node@v6 + uses: Wandalen/wretry.action@master with: - node-version: 21 + action: actions/setup-node@v6 + with: | + node-version: 21 + attempt_limit: 3 + attempt_delay: 2000 # Use AWS Secrets Manger GHA to retrieve CI Bot Creds - name: Get CI Bot Creds Secret - uses: aws-actions/aws-secretsmanager-get-secrets@v2 + uses: Wandalen/wretry.action@master with: - secret-ids: Github/aws-crypto-tools-ci-bot - parse-json-secrets: true + action: aws-actions/aws-secretsmanager-get-secrets@v2 + with: | + secret-ids: Github/aws-crypto-tools-ci-bot + parse-json-secrets: true + attempt_limit: 3 + attempt_delay: 2000 # Log in as the CI Bot - name: Log in as CI Bot @@ -57,8 +77,12 @@ jobs: # Set up semantic release - name: Setup Semantic Release - run: | - make setup_semantic_release + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + make setup_semantic_release # Run semantic release in dry run mode if input matches - name: Run Semantic Release in dry run mode diff --git a/.github/workflows/smithy-diff.yml b/.github/workflows/smithy-diff.yml index fbd6525d6..158736db0 100644 --- a/.github/workflows/smithy-diff.yml +++ b/.github/workflows/smithy-diff.yml @@ -13,9 +13,13 @@ jobs: issues: write pull-requests: write steps: - - uses: actions/checkout@v6 + - uses: Wandalen/wretry.action@master with: - fetch-depth: 0 + action: actions/checkout@v6 + with: | + fetch-depth: 0 + attempt_limit: 3 + attempt_delay: 2000 - name: Get Files changed id: file-changes