Skip to content

Commit

Permalink
fix: spot_strategy passing (#9428)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludamad authored Oct 25, 2024
1 parent 01147a5 commit 1e38d3e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/ensure-tester-with-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions .github/ensure-tester/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -23,15 +24,15 @@ 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
echo "runner_concurrency=0" >> $GITHUB_OUTPUT
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
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}" }
Expand All @@ -660,16 +660,16 @@ 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
# if they fail to copy, it will try to build them on the tester and fail
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 }}
Expand Down

0 comments on commit 1e38d3e

Please sign in to comment.