From faed102f887bfdb7400838aad4be0ef6361d6eac Mon Sep 17 00:00:00 2001 From: spypsy Date: Thu, 14 Dec 2023 15:22:37 +0000 Subject: [PATCH 1/3] fix: AWS deploy_service regex + faucet dockerfile --- build-system/scripts/deploy_service | 4 ++-- yarn-project/aztec-faucet/Dockerfile | 2 +- yarn-project/aztec-faucet/terraform/main.tf | 2 +- yarn-project/noir-protocol-circuits/.gitignore | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build-system/scripts/deploy_service b/build-system/scripts/deploy_service index 80fad879ad40..d0ae08fd93f3 100755 --- a/build-system/scripts/deploy_service +++ b/build-system/scripts/deploy_service @@ -4,10 +4,10 @@ set -eu # Redeploy services with the latest image that match $DEPLOY_TAG followed by $SERVICE_NAME. SERVICE_NAME=$1 -PATTERN="$DEPLOY_TAG.*$SERVICE_NAME.*" +PATTERN="${DEPLOY_TAG}.*${SERVICE_NAME}[^\"]*" # Fetch list of services -SERVICES=$(aws ecs list-services --region $ECR_DEPLOY_REGION --cluster setup | grep -Eo "arn:aws:ecs:[^:]+:[^:]+:service/[^/]+/$PATTERN" || true) +SERVICES=$(aws ecs list-services --region $ECR_DEPLOY_REGION --cluster setup | grep -Eo "arn:aws:ecs:[^:]+:[^:]+:service/[^/]+/${PATTERN}" || true) echo "Services to redeploy:" echo "$SERVICES" diff --git a/yarn-project/aztec-faucet/Dockerfile b/yarn-project/aztec-faucet/Dockerfile index be0711dbb16b..f4567db74829 100644 --- a/yarn-project/aztec-faucet/Dockerfile +++ b/yarn-project/aztec-faucet/Dockerfile @@ -1,4 +1,4 @@ FROM 278380418400.dkr.ecr.eu-west-2.amazonaws.com/yarn-project-prod WORKDIR /usr/src/yarn-project/aztec-faucet -ENTRYPOINT ["yarn", "start"] +ENTRYPOINT ["node", "--no-warnings", "/usr/src/yarn-project/aztec-faucet/dest/bin/index.js"] EXPOSE 8080 diff --git a/yarn-project/aztec-faucet/terraform/main.tf b/yarn-project/aztec-faucet/terraform/main.tf index db33a2656c55..912257fe2078 100644 --- a/yarn-project/aztec-faucet/terraform/main.tf +++ b/yarn-project/aztec-faucet/terraform/main.tf @@ -76,7 +76,7 @@ resource "aws_service_discovery_service" "aztec-faucet" { # Define task definition and service. resource "aws_ecs_task_definition" "aztec-faucet" { - family = "${var.DEPLOY_TAG}-faucet" + family = "${var.DEPLOY_TAG}-aztec-faucet" requires_compatibilities = ["FARGATE"] network_mode = "awsvpc" cpu = "2048" diff --git a/yarn-project/noir-protocol-circuits/.gitignore b/yarn-project/noir-protocol-circuits/.gitignore index 2173ed9152eb..fef96f805be5 100644 --- a/yarn-project/noir-protocol-circuits/.gitignore +++ b/yarn-project/noir-protocol-circuits/.gitignore @@ -1,4 +1,5 @@ proofs/ Prover.toml Verifier.toml -src/target \ No newline at end of file +src/target +src/crs From 9d1212318ce0c6000f552d84595182fdc52e2b41 Mon Sep 17 00:00:00 2001 From: spypsy Date: Thu, 14 Dec 2023 16:02:46 +0000 Subject: [PATCH 2/3] fix: bash if checks --- build-system/scripts/deploy_terraform_services | 3 +-- l1-contracts/scripts/ci_deploy_contracts.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build-system/scripts/deploy_terraform_services b/build-system/scripts/deploy_terraform_services index 879ca6a5290c..17e7400c22bd 100755 --- a/build-system/scripts/deploy_terraform_services +++ b/build-system/scripts/deploy_terraform_services @@ -24,8 +24,7 @@ cd $PROJECT_DIR # Bail out if nothing changed. CONTENT_HASH=$(calculate_content_hash $CHECK_REBUILD_REPOSITORY) echo "Last successfully deployed commit: $CONTENT_HASH" -if check_rebuild cache-$CONTENT_HASH-$DEPLOY_TAG-deployed $CHECK_REBUILD_REPOSITORY; then - echo "No changes detected, skipping deployment." +if [ -z "$TO_TAINT" ] && check_rebuild cache-$CONTENT_HASH-$DEPLOY_TAG-deployed $CHECK_REBUILD_REPOSITORY; then exit 0 fi diff --git a/l1-contracts/scripts/ci_deploy_contracts.sh b/l1-contracts/scripts/ci_deploy_contracts.sh index 15a0050d34a8..33daedaf6e1a 100755 --- a/l1-contracts/scripts/ci_deploy_contracts.sh +++ b/l1-contracts/scripts/ci_deploy_contracts.sh @@ -33,7 +33,7 @@ for KEY in ROLLUP_CONTRACT_ADDRESS REGISTRY_CONTRACT_ADDRESS INBOX_CONTRACT_ADDR export TF_VAR_$KEY=$VALUE done -if [ -n "${DRY_DEPLOY:-}" ]; then +if [ "$DRY_DEPLOY" -eq 1 ]; then echo "DRY_DEPLOY: deploy_terraform l1-contracts ./terraform" echo "DRY_DEPLOY: tag_remote_image $REPOSITORY cache-$CONTENT_HASH cache-$CONTENT_HASH-$DEPLOY_TAG-deployed" else From 9221c531f9e740c7a806df119d4b8b102f378589 Mon Sep 17 00:00:00 2001 From: spypsy Date: Thu, 14 Dec 2023 16:10:31 +0000 Subject: [PATCH 3/3] re-instate "no changes detected" prompt --- build-system/scripts/deploy_terraform_services | 1 + 1 file changed, 1 insertion(+) diff --git a/build-system/scripts/deploy_terraform_services b/build-system/scripts/deploy_terraform_services index 17e7400c22bd..7ae1bfa4ec27 100755 --- a/build-system/scripts/deploy_terraform_services +++ b/build-system/scripts/deploy_terraform_services @@ -25,6 +25,7 @@ cd $PROJECT_DIR CONTENT_HASH=$(calculate_content_hash $CHECK_REBUILD_REPOSITORY) echo "Last successfully deployed commit: $CONTENT_HASH" if [ -z "$TO_TAINT" ] && check_rebuild cache-$CONTENT_HASH-$DEPLOY_TAG-deployed $CHECK_REBUILD_REPOSITORY; then + echo "No changes detected, skipping deployment." exit 0 fi