From 1e38d3e865fa8fb2b9ba142b5bc5ca59b4c04945 Mon Sep 17 00:00:00 2001 From: ludamad Date: Fri, 25 Oct 2024 17:46:23 -0400 Subject: [PATCH] fix: spot_strategy passing (#9428) --- .github/ensure-tester-with-images/action.yml | 3 +++ .github/ensure-tester/action.yml | 7 ++++--- .github/workflows/ci.yml | 10 +++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/ensure-tester-with-images/action.yml b/.github/ensure-tester-with-images/action.yml index b9e1ceddb89..307473513c8 100644 --- a/.github/ensure-tester-with-images/action.yml +++ b/.github/ensure-tester-with-images/action.yml @@ -5,6 +5,8 @@ description: "Reusable setup steps" inputs: runner_type: required: true + spot_strategy: + default: BestEffort builder_type: required: true builder_images_to_copy: @@ -59,6 +61,7 @@ runs: if: ${{ env.CACHE_SUCCESS != 'true' }} with: runner_type: ${{ inputs.runner_type}} + spot_strategy: ${{ inputs.spot_strategy }} ttl: ${{ inputs.tester_ttl }} run: | set -eux diff --git a/.github/ensure-tester/action.yml b/.github/ensure-tester/action.yml index ca85b7da853..4525f2df30a 100644 --- a/.github/ensure-tester/action.yml +++ b/.github/ensure-tester/action.yml @@ -8,11 +8,12 @@ inputs: run: # command to run once tester available required: false - ttl: required: false description: "Time to live for the tester instance in minutes" default: 30 + spot_strategy: + default: BestEffort runs: # define an action, runs in OS of caller using: composite @@ -23,7 +24,7 @@ runs: run: | TYPE=${{ inputs.runner_type }} # Try to use spot for every runner type for now - echo "spot_strategy=BestEffort" >> $GITHUB_OUTPUT + echo "spot_strategy=${{ inputs.spot_strategy }}" >> $GITHUB_OUTPUT echo "runner_label=$USERNAME-$runner_type" >> $GITHUB_OUTPUT echo "ami_id=ami-04d8422a9ba4de80f" >> $GITHUB_OUTPUT # no github runners, 'bare spot' in action code @@ -31,7 +32,7 @@ runs: echo "ttl=${{ inputs.ttl }}" >> $GITHUB_OUTPUT SIZE=large if [[ $TYPE == 4core-* ]]; then - SIZE=large + SIZE=xlarge elif [[ $TYPE == 8core-* ]]; then SIZE=2xlarge elif [[ $TYPE == 16core-* ]]; then diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ba1846d355a..b1bc3fe17d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -634,10 +634,10 @@ jobs: with: concurrency_key: network-test-${{ matrix.test }} - name: "Setup and Local Network Tests" - timeout-minutes: 40 + timeout-minutes: 60 # Only allow transfer test to run on every (non-network-all) PR if: matrix.test == 'test-transfer.sh' || github.ref_name == 'master' || contains(github.event.pull_request.labels.*.name, 'network-all') - run: earthly-ci --no-output ./yarn-project/+network-test --test=./${{ matrix.test }} + run: sudo shutdown -P 60 ; earthly-ci --no-output ./yarn-project/+network-test --test=./${{ matrix.test }} # note: proving disabled kind-network-test: @@ -646,7 +646,7 @@ jobs: strategy: fail-fast: false matrix: - test: [smoke.test.ts, transfer.test.ts, 4epochs.test.ts] + test: [smoke.test.ts, transfer.test.ts] # TODO reinstate: 4epochs.test.ts steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } @@ -660,7 +660,7 @@ jobs: env: USERNAME: ${{ needs.configure.outputs.username }} with: - runner_type: 16core-tester-x86 + runner_type: 8core-tester-x86 spot_strategy: None # use on-demand machines builder_type: builder-x86 # these are copied to the tester and expected by the earthly command below @@ -668,8 +668,8 @@ jobs: builder_images_to_copy: aztecprotocol/aztec:${{ env.GIT_COMMIT }} aztecprotocol/end-to-end:${{ env.GIT_COMMIT }} # command to produce the images in case they don't exist builder_command: scripts/earthly-ci ./yarn-project+export-e2e-test-images + tester_ttl: 60 run: | - sudo shutdown -P 60 # extend ttl cd yarn-project/end-to-end echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aztecprotocolci --password-stdin test=${{ matrix.test }}