From c17a8b17d31aa341e2a1309455418ecc89c87998 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 07:14:55 +0000 Subject: [PATCH 01/14] Debugging --- .circleci/config.yml | 6 +++--- build-system/scripts/remote_runner | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c84aa80a44f..603ef1f735f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1555,13 +1555,13 @@ workflows: - build-deployment-canary: requires: - - deploy-end - <<: *deploy_defaults + - e2e-end + <<: *defaults - run-deployment-canary-uniswap: requires: - build-deployment-canary - <<: *deploy_defaults + <<: *defaults - run-deployment-canary-browser: requires: diff --git a/build-system/scripts/remote_runner b/build-system/scripts/remote_runner index 243d98e47bf..d52109e9ed0 100755 --- a/build-system/scripts/remote_runner +++ b/build-system/scripts/remote_runner @@ -20,6 +20,8 @@ git checkout FETCH_HEAD echo "Git checkout completed." +echo "PWD: $PWD" + BASH_ENV=/tmp/bash_env echo "Calling setup env..." source ./build-system/scripts/setup_env "$COMMIT_HASH" "$COMMIT_TAG" "$JOB_NAME" "$GIT_REPOSITORY_URL" From 994745e8bf9136a75c5bd6e47210c2242a39bb96 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 07:22:13 +0000 Subject: [PATCH 02/14] Debugging --- yarn-project/end-to-end/scripts/setup_canary.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/end-to-end/scripts/setup_canary.sh b/yarn-project/end-to-end/scripts/setup_canary.sh index e7ea1020221..c335b12f76c 100755 --- a/yarn-project/end-to-end/scripts/setup_canary.sh +++ b/yarn-project/end-to-end/scripts/setup_canary.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eu -COMMIT_TAG=$1 +COMMIT_TAG=${1:-'v0.7.8'} TARGET_PKGS_FILE=$2 # Check if file exists and read it into an array From 7025b7d4575679b41aa01eccce08e5673ea014ed Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 07:25:37 +0000 Subject: [PATCH 03/14] Debugging --- yarn-project/canary/Dockerfile | 2 +- yarn-project/end-to-end/scripts/setup_canary.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn-project/canary/Dockerfile b/yarn-project/canary/Dockerfile index 8e2455ef174..fb5990e39ef 100644 --- a/yarn-project/canary/Dockerfile +++ b/yarn-project/canary/Dockerfile @@ -3,7 +3,7 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder RUN apk update && apk add --no-cache udev ttf-freefont chromium curl jq bash ENV CHROME_BIN="/usr/bin/chromium-browser" PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" -ARG COMMIT_TAG="." +ARG COMMIT_TAG="v0.7.8" COPY . . diff --git a/yarn-project/end-to-end/scripts/setup_canary.sh b/yarn-project/end-to-end/scripts/setup_canary.sh index c335b12f76c..e7ea1020221 100755 --- a/yarn-project/end-to-end/scripts/setup_canary.sh +++ b/yarn-project/end-to-end/scripts/setup_canary.sh @@ -1,7 +1,7 @@ #!/bin/bash set -eu -COMMIT_TAG=${1:-'v0.7.8'} +COMMIT_TAG=$1 TARGET_PKGS_FILE=$2 # Check if file exists and read it into an array From b3dc7c8b54ce0c35e9cec67b52448d432b552ae1 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 07:53:02 +0000 Subject: [PATCH 04/14] Debugging --- yarn-project/canary/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/canary/Dockerfile b/yarn-project/canary/Dockerfile index fb5990e39ef..6df28bd2811 100644 --- a/yarn-project/canary/Dockerfile +++ b/yarn-project/canary/Dockerfile @@ -13,7 +13,7 @@ WORKDIR /usr/src/yarn-project/end-to-end # Extract canary @aztec dependencies RUN ../canary/scripts/extract_packages.sh ../canary/package.json > ./target_pkgs.txt # Update end-to-end dependencies with target version -RUN ./scripts/setup_canary.sh $COMMIT_TAG ./target_pkgs.txt +RUN ./scripts/setup_canary.sh "v0.7.8" ./target_pkgs.txt RUN rm ./target_pkgs.txt RUN yarn && yarn build From c8ddc4f82e16fb66bef9dc160a584715470d03b4 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 08:02:28 +0000 Subject: [PATCH 05/14] More debugging --- .circleci/config.yml | 2 +- yarn-project/canary/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 603ef1f735f..380dba9ac0b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1555,7 +1555,7 @@ workflows: - build-deployment-canary: requires: - - e2e-end + - yarn-project-base <<: *defaults - run-deployment-canary-uniswap: diff --git a/yarn-project/canary/Dockerfile b/yarn-project/canary/Dockerfile index 6df28bd2811..7927f0aa9a6 100644 --- a/yarn-project/canary/Dockerfile +++ b/yarn-project/canary/Dockerfile @@ -19,7 +19,7 @@ RUN yarn && yarn build # Build canary package WORKDIR /usr/src/yarn-project/canary -RUN ./scripts/update_packages.sh $COMMIT_TAG +RUN ./scripts/update_packages.sh "v0.7.8" RUN yarn && yarn build FROM node:18-alpine From aeae64dfe268b0f589c867096ce972287851d7b7 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 08:13:48 +0000 Subject: [PATCH 06/14] More debugging --- build-system/scripts/remote_runner | 1 + 1 file changed, 1 insertion(+) diff --git a/build-system/scripts/remote_runner b/build-system/scripts/remote_runner index d52109e9ed0..64ca4a4f520 100755 --- a/build-system/scripts/remote_runner +++ b/build-system/scripts/remote_runner @@ -21,6 +21,7 @@ git checkout FETCH_HEAD echo "Git checkout completed." echo "PWD: $PWD" +ls -l BASH_ENV=/tmp/bash_env echo "Calling setup env..." From 13fb60f5666921783ab40c34d6f7ddd046afe0ee Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 08:29:11 +0000 Subject: [PATCH 07/14] Attempt to fix test runs --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 380dba9ac0b..b340f65d64d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1231,13 +1231,15 @@ jobs: run-deployment-canary-uniswap: docker: - image: aztecprotocol/alpine-build-image - resource_class: small + resource_class: large steps: - *checkout - *setup_env - run: name: "Test" - command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml + working_directory: canary + command: ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml + #command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml run-deployment-canary-browser: docker: From 37f191ae343f98706f9515e89c1af56fcdc6bdde Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 08:44:31 +0000 Subject: [PATCH 08/14] Another attempt --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b340f65d64d..ec9e949a64a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1237,7 +1237,7 @@ jobs: - *setup_env - run: name: "Test" - working_directory: canary + working_directory: $ROOT_PATH/yarn-project/canary command: ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml #command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml From 2ff05372dcfec6d2a026551225b176afaf93aa44 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 08:57:47 +0000 Subject: [PATCH 09/14] Try a new script --- .circleci/config.yml | 3 +-- build-system/scripts/run_script | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 build-system/scripts/run_script diff --git a/.circleci/config.yml b/.circleci/config.yml index ec9e949a64a..7450616579d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1237,8 +1237,7 @@ jobs: - *setup_env - run: name: "Test" - working_directory: $ROOT_PATH/yarn-project/canary - command: ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml + command: run_script canary ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml #command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml run-deployment-canary-browser: diff --git a/build-system/scripts/run_script b/build-system/scripts/run_script new file mode 100755 index 00000000000..97ae0163fb4 --- /dev/null +++ b/build-system/scripts/run_script @@ -0,0 +1,13 @@ +#!/bin/bash +# Runs a script from within the provided repository project directory +# +# Arguments are: +# 1. REPOSITORY: The project repository name in ECR. +# 2... ARGS: Script and arguments to run. +[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace +set -eu + +REPOSITORY=$1 +shift +cd $(query_manifest projectDir $REPOSITORY) +$@ From 033170e93761fc4bc99e8361bb90c37ad291b463 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 09:06:59 +0000 Subject: [PATCH 10/14] Change instance type --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7450616579d..e76fef95da8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1229,8 +1229,8 @@ jobs: command: build canary true run-deployment-canary-uniswap: - docker: - - image: aztecprotocol/alpine-build-image + machine: + image: ubuntu-2004:202010-01 resource_class: large steps: - *checkout From 8ab3efcc96380e20b8d6031921861622941e9ae7 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 09:12:50 +0000 Subject: [PATCH 11/14] Another fix --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e76fef95da8..9a6db37c220 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1237,7 +1237,7 @@ jobs: - *setup_env - run: name: "Test" - command: run_script canary ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml + command: run_script canary ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary ./scripts/docker-compose.yml #command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml run-deployment-canary-browser: From 2ecc15dd8a3d62a56c79c8180b358511b0ffca91 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 09:29:37 +0000 Subject: [PATCH 12/14] More fixes --- .circleci/config.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9a6db37c220..54e96487046 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1237,30 +1237,30 @@ jobs: - *setup_env - run: name: "Test" - command: run_script canary ./scripts/run_tests uniswap_trade_on_l1_from_l2.test.ts canary ./scripts/docker-compose.yml + command: run_script canary ./scripts/run_tests ./src/uniswap_trade_on_l1_from_l2.test.ts canary ./scripts/docker-compose.yml #command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml run-deployment-canary-browser: - docker: - - image: aztecprotocol/alpine-build-image - resource_class: small + machine: + image: ubuntu-2004:202010-01 + resource_class: large steps: - *checkout - *setup_env - run: name: "Test" - command: spot_run_test_script ./scripts/run_tests canary aztec_js_browser.test.ts canary docker-compose.yml + command: run_script canary ./scripts/run_tests ./src/aztec_js_browser.test.ts canary ./scripts/docker-compose.yml run-deployment-canary-cli: - docker: - - image: aztecprotocol/alpine-build-image - resource_class: small + machine: + image: ubuntu-2004:202010-01 + resource_class: large steps: - *checkout - *setup_env - run: name: "Test" - command: spot_run_test_script ./scripts/run_tests canary cli.test.ts canary docker-compose.yml + command: run_script canary ./scripts/run_tests ./src/cli.test.ts canary ./scripts/docker-compose.yml # Repeatable config for defining the workflow below. tag_regex: &tag_regex /^aztec-packages-v.*/ @@ -1567,9 +1567,9 @@ workflows: - run-deployment-canary-browser: requires: - build-deployment-canary - <<: *deploy_defaults + <<: *defaults - run-deployment-canary-cli: requires: - build-deployment-canary - <<: *deploy_defaults + <<: *defaults From 02c84dc1d35d6d1a5088eda8ae5bb9347b185fde Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 09:39:43 +0000 Subject: [PATCH 13/14] Cleanup --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 54e96487046..3b8b3547a15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1238,7 +1238,6 @@ jobs: - run: name: "Test" command: run_script canary ./scripts/run_tests ./src/uniswap_trade_on_l1_from_l2.test.ts canary ./scripts/docker-compose.yml - #command: spot_run_test_script ./scripts/run_tests canary uniswap_trade_on_l1_from_l2.test.ts canary docker-compose.yml run-deployment-canary-browser: machine: From 21e827b0013c9648b8aaf8fcc176d77fda8ea786 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Wed, 20 Sep 2023 09:42:36 +0000 Subject: [PATCH 14/14] Clean up --- .circleci/config.yml | 10 +++++----- build-system/scripts/remote_runner | 3 --- yarn-project/canary/Dockerfile | 6 +++--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3b8b3547a15..56c7c46b84c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1555,20 +1555,20 @@ workflows: - build-deployment-canary: requires: - - yarn-project-base - <<: *defaults + - deploy-end + <<: *deploy_defaults - run-deployment-canary-uniswap: requires: - build-deployment-canary - <<: *defaults + <<: *deploy_defaults - run-deployment-canary-browser: requires: - build-deployment-canary - <<: *defaults + <<: *deploy_defaults - run-deployment-canary-cli: requires: - build-deployment-canary - <<: *defaults + <<: *deploy_defaults diff --git a/build-system/scripts/remote_runner b/build-system/scripts/remote_runner index 64ca4a4f520..243d98e47bf 100755 --- a/build-system/scripts/remote_runner +++ b/build-system/scripts/remote_runner @@ -20,9 +20,6 @@ git checkout FETCH_HEAD echo "Git checkout completed." -echo "PWD: $PWD" -ls -l - BASH_ENV=/tmp/bash_env echo "Calling setup env..." source ./build-system/scripts/setup_env "$COMMIT_HASH" "$COMMIT_TAG" "$JOB_NAME" "$GIT_REPOSITORY_URL" diff --git a/yarn-project/canary/Dockerfile b/yarn-project/canary/Dockerfile index 7927f0aa9a6..8e2455ef174 100644 --- a/yarn-project/canary/Dockerfile +++ b/yarn-project/canary/Dockerfile @@ -3,7 +3,7 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-base AS builder RUN apk update && apk add --no-cache udev ttf-freefont chromium curl jq bash ENV CHROME_BIN="/usr/bin/chromium-browser" PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true" -ARG COMMIT_TAG="v0.7.8" +ARG COMMIT_TAG="." COPY . . @@ -13,13 +13,13 @@ WORKDIR /usr/src/yarn-project/end-to-end # Extract canary @aztec dependencies RUN ../canary/scripts/extract_packages.sh ../canary/package.json > ./target_pkgs.txt # Update end-to-end dependencies with target version -RUN ./scripts/setup_canary.sh "v0.7.8" ./target_pkgs.txt +RUN ./scripts/setup_canary.sh $COMMIT_TAG ./target_pkgs.txt RUN rm ./target_pkgs.txt RUN yarn && yarn build # Build canary package WORKDIR /usr/src/yarn-project/canary -RUN ./scripts/update_packages.sh "v0.7.8" +RUN ./scripts/update_packages.sh $COMMIT_TAG RUN yarn && yarn build FROM node:18-alpine