From 80674d9fa20f53dea857ab6c5bc79c6d13c1aadb Mon Sep 17 00:00:00 2001 From: ludamad Date: Wed, 15 May 2024 14:38:36 -0400 Subject: [PATCH] fix: runs-on inconsistency and simplify concurrency keys (#6433) --- .github/spot-runner-action/dist/index.js | 2 +- .github/spot-runner-action/src/ec2.ts | 2 +- .github/workflows/ci.yml | 50 ++++++++++++------------ 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/spot-runner-action/dist/index.js b/.github/spot-runner-action/dist/index.js index 76535852540..d50843ad54d 100644 --- a/.github/spot-runner-action/dist/index.js +++ b/.github/spot-runner-action/dist/index.js @@ -320,7 +320,7 @@ class Ec2Instance { LaunchTemplateConfigs: [fleetLaunchConfig], ClientToken: this.config.clientToken || undefined, SpotOptions: { - AllocationStrategy: "price-capacity-optimized", + AllocationStrategy: "capacity-optimized", }, TargetCapacitySpecification: { TotalTargetCapacity: 1, diff --git a/.github/spot-runner-action/src/ec2.ts b/.github/spot-runner-action/src/ec2.ts index 42d4f922349..ff82e6cc01c 100644 --- a/.github/spot-runner-action/src/ec2.ts +++ b/.github/spot-runner-action/src/ec2.ts @@ -239,7 +239,7 @@ export class Ec2Instance { LaunchTemplateConfigs: [fleetLaunchConfig], ClientToken: this.config.clientToken || undefined, SpotOptions: { - AllocationStrategy: "price-capacity-optimized", + AllocationStrategy: "capacity-optimized", }, TargetCapacitySpecification: { TotalTargetCapacity: 1, diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67a2fff25b6..55858424531 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: build-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: build-x86 # prepare images locally, tagged by commit hash - name: "Build E2E Image" timeout-minutes: 40 @@ -131,7 +131,7 @@ jobs: - uses: ./.github/ci-setup-action with: dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}" - concurrency_key: build-${{ inputs.username || github.actor }}-x86 + concurrency_key: build-x86 - name: "Build and upload bench aggregate file" working-directory: ./yarn-project/scripts run: earthly-ci -P --secret AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} --secret AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} +bench-aggregate @@ -156,7 +156,7 @@ jobs: with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: noir-format-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: noir-format-x86 - name: "Format Noir" working-directory: ./noir/ timeout-minutes: 40 @@ -178,7 +178,7 @@ jobs: - uses: ./.github/ci-setup-action with: # must be globally unique for build x runner - concurrency_key: bb-native-tests-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: bb-native-tests-x86 - name: "Native Prover Tests" working-directory: ./barretenberg/cpp/ timeout-minutes: 40 @@ -187,13 +187,13 @@ jobs: bb-js-test: needs: setup - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: bb-js-test-${{ github.actor }}-x86 + concurrency_key: bb-js-test-x86 - name: "bb.js Tests" working-directory: ./barretenberg/ts/ timeout-minutes: 40 @@ -207,7 +207,7 @@ jobs: with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: noir-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: noir-x86 - name: "Test Noir JS packages" run: earthly-ci --no-output ./noir+test @@ -219,7 +219,7 @@ jobs: with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: noir-packages-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: noir-packages-x86 - name: "Test Noir JS packages" run: earthly-ci --no-output ./noir+packages-test @@ -231,21 +231,21 @@ jobs: with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: noir-projects-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: noir-projects-x86 - name: "Noir Projects" timeout-minutes: 40 run: earthly-ci --no-output ./noir-projects/+test yarn-project-formatting: needs: noir-projects - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } # Only allow one memory-hunger prover test to use this runner - uses: ./.github/ci-setup-action with: - concurrency_key: yarn-project-formatting-${{ github.actor }}-x86 + concurrency_key: yarn-project-formatting-x86 - name: "Yarn Project Tests" timeout-minutes: 40 run: earthly-ci --no-output ./yarn-project/+format-check @@ -253,53 +253,53 @@ jobs: yarn-project-test: # quiet machine needs: [noir-projects, build, bb-native-tests] - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } # Only allow one memory-hunger prover test to use this runner - uses: ./.github/ci-setup-action with: - concurrency_key: yarn-project-test-${{ github.actor }}-x86 + concurrency_key: yarn-project-test-x86 - name: "Yarn Project Tests" timeout-minutes: 40 run: earthly-ci --no-output ./yarn-project/+test prover-client-test: needs: noir-projects - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: prover-client-test-${{ github.actor }}-x86 + concurrency_key: prover-client-test-x86 - name: "Prover Client Tests" timeout-minutes: 40 run: earthly-ci --no-output ./yarn-project/+prover-client-test build-acir-tests: needs: build - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: build-acir-tests-${{ github.actor }}-x86 + concurrency_key: build-acir-tests-x86 - name: "Build Acir Tests" timeout-minutes: 40 run: earthly-ci --no-output ./noir/+build-acir-tests barretenberg-acir-tests-bb: needs: build-acir-tests - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: barretenberg-acir-tests-bb-${{ github.actor }}-x86 + concurrency_key: barretenberg-acir-tests-bb-x86 - name: "BB Native Acir Tests" working-directory: ./noir/ timeout-minutes: 40 @@ -307,13 +307,13 @@ jobs: barretenberg-acir-tests-sol: needs: build-acir-tests - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: barretenberg-acir-tests-sol-${{ github.actor }}-x86 + concurrency_key: barretenberg-acir-tests-sol-x86 - name: "BB Solidity Acir Tests" working-directory: ./noir/ timeout-minutes: 40 @@ -321,13 +321,13 @@ jobs: barretenberg-acir-tests-bb-js: needs: build-acir-tests - runs-on: ${{ github.actor }}-x86 + runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: barretenberg-acir-tests-bb-js-${{ github.actor }}-x86 + concurrency_key: barretenberg-acir-tests-bb-js-x86 - name: "BB JS Acir Tests" working-directory: ./noir/ timeout-minutes: 40 @@ -342,7 +342,7 @@ jobs: with: { ref: "${{ env.GIT_COMMIT }}" } - uses: ./.github/ci-setup-action with: - concurrency_key: docs-preview-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: docs-preview-x86 - name: "Docs Preview" timeout-minutes: 40 run: earthly-ci --no-output ./docs/+deploy-preview --PR=${{ github.event.number }} --AZTEC_BOT_COMMENTER_GITHUB_TOKEN=${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} --NETLIFY_AUTH_TOKEN=${{ secrets.NETLIFY_AUTH_TOKEN }} --NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID }} @@ -382,7 +382,7 @@ jobs: # Only allow one memory-hunger prover test to use this runner - uses: ./.github/ci-setup-action with: - concurrency_key: protocol-circuits-gates-report-${{ github.event.pull_request.user.login || github.actor }}-x86 + concurrency_key: protocol-circuits-gates-report-x86 - name: "Noir Protocol Circuits Report" working-directory: ./noir-projects/ timeout-minutes: 40