From 80957ba84f1bb66b1a5d7cd8b898308ba5118f79 Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 2 May 2024 15:27:15 +0000 Subject: [PATCH 1/2] chore: e2e workaround --- .github/workflows/ci-arm.yml | 2 +- .github/workflows/ci.yml | 2 +- yarn-project/Earthfile | 12 ++++++------ yarn-project/end-to-end/Earthfile | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-arm.yml b/.github/workflows/ci-arm.yml index 7f9f89ca4da..3317870ec5f 100644 --- a/.github/workflows/ci-arm.yml +++ b/.github/workflows/ci-arm.yml @@ -44,7 +44,7 @@ jobs: # prepare images locally, tagged by commit hash - name: "Build E2E Image" timeout-minutes: 40 - run: earthly ./yarn-project+export-end-to-end + run: earthly ./yarn-project+export-e2e-test-images # all the end-to-end integration tests for aztec e2e: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad8870e6ec1..b49dc2e7410 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,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-ci ./yarn-project+export-e2e-test-images # 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 diff --git a/yarn-project/Earthfile b/yarn-project/Earthfile index cc3d505b084..d2fd63bb0de 100644 --- a/yarn-project/Earthfile +++ b/yarn-project/Earthfile @@ -68,14 +68,10 @@ aztec-prod: aztec: FROM ubuntu:noble - RUN apt update && apt install nodejs curl -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + RUN apt update && apt install nodejs -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY +aztec-prod/usr/src /usr/src ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/aztec/dest/bin/index.js"] - LET port=8080 - ENV PORT=$port - HEALTHCHECK --interval=10s --timeout=10s --retries=6 \ - CMD curl -fsSd '{\"jsonrpc\":\"2.0\",\"method\":\"pxe_getNodeInfo\",\"id\":1}' http://127.0.0.1:$port - EXPOSE $port + EXPOSE 8080 # We care about creating a slimmed down e2e image because we have to serialize it from earthly to docker for running. end-to-end-prod: @@ -125,6 +121,10 @@ export-end-to-end: FROM +end-to-end SAVE IMAGE aztecprotocol/end-to-end:$EARTHLY_GIT_HASH +export-e2e-test-images: + BUILD +export-aztec + BUILD +export-end-to-end + format-check: FROM +build RUN yarn formatting diff --git a/yarn-project/end-to-end/Earthfile b/yarn-project/end-to-end/Earthfile index 8ff7a7f9aa1..3a9c18ff04b 100644 --- a/yarn-project/end-to-end/Earthfile +++ b/yarn-project/end-to-end/Earthfile @@ -15,13 +15,13 @@ E2E_COMPOSE_TEST: ELSE LET CMD="docker-compose" END - WITH DOCKER \ - --load aztecprotocol/aztec:latest=../+aztec \ - --load aztecprotocol/end-to-end:latest=../+end-to-end \ - --load aztecprotocol/foundry-nightly-de33b6af53005037b463318d2628b5cfcaf3991:latest=../../build-images+build - # Run our docker compose, ending whenever sandbox ends, filtering out noisy eth_getLogs - RUN $CMD -p $project_name -f $compose_file up --exit-code-from=end-to-end --force-recreate + WAIT + BUILD ../+export-e2e-test-images END + # Let docker compose know about the pushed tags above + ENV AZTEC_DOCKER_TAG=$(git rev-parse HEAD) + # Run our docker compose, ending whenever sandbox ends, filtering out noisy eth_getLogs + RUN $CMD -p $project_name -f $compose_file up --exit-code-from=end-to-end --force-recreate UPLOAD_LOGS: FUNCTION From a8017b006ec5411e6fc1f155fd950ce340f6b5ce Mon Sep 17 00:00:00 2001 From: ludamad Date: Thu, 2 May 2024 11:30:28 -0400 Subject: [PATCH 2/2] Update Earthfile --- yarn-project/Earthfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yarn-project/Earthfile b/yarn-project/Earthfile index d2fd63bb0de..5c6bd59d1c3 100644 --- a/yarn-project/Earthfile +++ b/yarn-project/Earthfile @@ -68,10 +68,14 @@ aztec-prod: aztec: FROM ubuntu:noble - RUN apt update && apt install nodejs -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + RUN apt update && apt install nodejs curl -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* COPY +aztec-prod/usr/src /usr/src ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/aztec/dest/bin/index.js"] - EXPOSE 8080 + LET port=8080 + ENV PORT=$port + HEALTHCHECK --interval=10s --timeout=10s --retries=6 \ + CMD curl -fsSd '{\"jsonrpc\":\"2.0\",\"method\":\"pxe_getNodeInfo\",\"id\":1}' http://127.0.0.1:$port + EXPOSE $port # We care about creating a slimmed down e2e image because we have to serialize it from earthly to docker for running. end-to-end-prod: