From d03a427f1ff6031e2ba6e5d490b01b527fbc705d Mon Sep 17 00:00:00 2001 From: ludamad Date: Mon, 22 Apr 2024 07:05:51 -0500 Subject: [PATCH 1/2] chore(ci): don't use redirected earthly The cure is worse than the disease right now. While there is a 1 in 200 chance of this internal buildkit error (which Earthly folks tell me they are actively looking into), right now it makes logs hard to read --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b5f2c532c0..6367824a8c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: # prepare images locally, tagged by commit hash - name: "Build E2E Image" timeout-minutes: 40 - run: earthly-ci ./yarn-project+export-end-to-end + run: earthly ./yarn-project+export-end-to-end # We base our e2e list used in e2e-x86 off the targets in ./yarn-project/end-to-end # (Note ARM uses just 2 tests as a smoketest) - name: Create list of end-to-end jobs @@ -69,7 +69,7 @@ jobs: - name: Test working-directory: ./yarn-project/end-to-end/ timeout-minutes: 25 - run: earthly-ci -P --no-output +${{ matrix.test }} --e2e_mode=cache + run: earthly -P --no-output +${{ matrix.test }} --e2e_mode=cache # TODO # - name: Upload logs # run: BRANCH=${{ github.ref_name }} PULL_REQUEST=${{ github.event.number }} scripts/ci/upload_logs_to_s3 ./yarn-project/end-to-end/log @@ -93,7 +93,7 @@ jobs: working-directory: ./barretenberg/cpp/ timeout-minutes: 25 # limit our parallelism to half our cores - run: earthly-ci --no-output +test --hardware_concurrency=64 + run: earthly --no-output +test --hardware_concurrency=64 # push benchmarking binaries to dockerhub registry bb-bench-binaries: @@ -109,7 +109,7 @@ jobs: if: ${{ github.event.inputs.just_start_spot != 'true' }} timeout-minutes: 15 working-directory: ./barretenberg/cpp/ - run: earthly-ci --push +bench-binaries + run: earthly --push +bench-binaries setup-bench: uses: ./.github/workflows/setup-runner.yml @@ -137,12 +137,12 @@ jobs: - name: Client IVC Bench working-directory: ./barretenberg/cpp/ timeout-minutes: 15 - run: earthly-ci --no-output +bench-client-ivc --bench_mode=cache + run: earthly --no-output +bench-client-ivc --bench_mode=cache - name: Ultrahonk Bench working-directory: ./barretenberg/cpp/ timeout-minutes: 15 - run: earthly-ci --no-output +bench-ultra-honk --bench_mode=cache + run: earthly --no-output +bench-ultra-honk --bench_mode=cache merge-check: runs-on: ubuntu-latest From d2e70981b202cb064d856a242371b2612611d968 Mon Sep 17 00:00:00 2001 From: ludamad Date: Mon, 22 Apr 2024 12:41:29 +0000 Subject: [PATCH 2/2] Unused --- scripts/earthly-ci | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100755 scripts/earthly-ci diff --git a/scripts/earthly-ci b/scripts/earthly-ci deleted file mode 100755 index 43eeb9b17aa..00000000000 --- a/scripts/earthly-ci +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash -# A wrapper for Earthly that is meant to caught signs of known intermittent failures and continue. -# The silver lining is if Earthly does crash, the cache can pick up the build. -set -eu -o pipefail - -# Flag to determine if -i is present -INTERACTIVE=false -# Check for -i flag in the arguments -for arg in "$@"; do - if [ "$arg" == "-i" ] || [ "$arg" == "--interactive" ]; then - INTERACTIVE=true - break - fi -done - -OUTPUT_FILE=$(mktemp) -# capture output to handle earthly edge cases -if $INTERACTIVE ; then - # don't play nice with tee if interactive - earthly $@ -elif ! earthly $@ 2>&1 | tee $OUTPUT_FILE >&2 ; then - # we try earthly once, capturing output - # if we get one of our (unfortunate) known failures, handle retries - # TODO potentially handle other intermittent errors here - if grep 'failed to get edge: inconsistent graph state' $OUTPUT_FILE >/dev/null ; then - # TODO when earthly is overloaded we sometimes get - # 'failed to solve: failed to get edge: inconsistent graph state' - echo "Got 'inconsistent graph state'. Restarting earthly. See https://github.com/earthly/earthly/issues/2454'" - earthly $@ - # TODO handle - # could not configure satellite: failed getting org: unable to authenticate: failed to execute login request: Post - else - # otherwise, propagate error - exit 1 - fi -fi