From 8875facda1533e5c2886013b61bb8e7c2be810a5 Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Tue, 4 Mar 2025 05:49:25 +0000 Subject: [PATCH 1/9] track if spot and sanitise merge queue name --- ci3/aws_handle_evict | 7 ++++--- ci3/bootstrap_ec2 | 1 + ci3/log_ci_run | 12 ++++++++++-- ci3/source_stdlib | 4 ++++ ci3/watch_ci | 3 +-- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/ci3/aws_handle_evict b/ci3/aws_handle_evict index e45aaf48104e..261a4ad2e03a 100755 --- a/ci3/aws_handle_evict +++ b/ci3/aws_handle_evict @@ -1,11 +1,12 @@ +#!/bin/bash +NO_CD=1 source $(git rev-parse --show-toplevel)/ci3/source + # Gracefully signals eviction status with a 155 exit code. # Runs the given command in the background and waits on it while polling for eviction status. setsid bash -c "$1" & child_pid=$! sid=$(ps -o sid= -p $child_pid | tr -d ' ') -token=$(curl -sX PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600") - # Poll until the child finishes or a termination notice is detected while true; do # Wait for process to come up, makes check below happen every 5 seconds @@ -17,7 +18,7 @@ while true; do sleep 1 done # Check for imminent spot termination - if curl -fs -H "X-aws-ec2-metadata-token: $token" http://169.254.169.254/latest/meta-data/spot/termination-time &>/dev/null; then + if aws_get_meta_data spot/termination-time &>/dev/null; then # Termination notice found, exit with 155. echo "Spot will be terminated! Exiting early." kill -9 -$sid || true diff --git a/ci3/bootstrap_ec2 b/ci3/bootstrap_ec2 index 7cd2d321d88b..a16cb868dce0 100755 --- a/ci3/bootstrap_ec2 +++ b/ci3/bootstrap_ec2 @@ -175,6 +175,7 @@ ssh ${ssh_args:-} -F $ci3/aws/build_instance_ssh_config ubuntu@$ip " -e NETLIFY_SITE_ID=${NETLIFY_SITE_ID:-} \ -e NETLIFY_AUTH_TOKEN=${NETLIFY_AUTH_TOKEN:-} \ -e SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN:-} \ + -e AWS_TOKEN=\$(curl -sX PUT http://169.254.169.254/latest/api/token -H 'X-aws-ec2-metadata-token-ttl-seconds: 21600') \ --pids-limit=32768 \ aztecprotocol/devbox:3.0 bash -c $(printf '%q' "$container_script") " diff --git a/ci3/log_ci_run b/ci3/log_ci_run index ee10ebf5f7e2..c90e4a6890f7 100755 --- a/ci3/log_ci_run +++ b/ci3/log_ci_run @@ -10,14 +10,22 @@ if [ -z "$key" ]; then key=$(date +%s%3N) msg=$(git log -1 --pretty=format:"%s") author="$(git log -1 --pretty=format:"%an")" + name=$REF_NAME + [ "$(aws_get_meta_data instance-life-cycle)" == "spot"] && spot=true || spot=false + # instance_type=$(aws_get_meta_data instance-type) + if [[ "$name" =~ ^gh-readonly-queue/([^/]+)/ ]]; then + name=${BASH_REMATCH[1]} + fi + json=$(jq -c -j -n \ --argjson timestamp "$key" \ --arg status "$status" \ --arg msg "$msg" \ - --arg name "$REF_NAME" \ + --arg name "$name" \ --arg author "$author" \ --arg arch "$(arch)" \ - '{timestamp: $timestamp, status: $status, msg: $msg, name: $name, author: $author, arch: $arch}') + --argjson spot "$spot" \ + '{timestamp: $timestamp, status: $status, msg: $msg, name: $name, author: $author, arch: $arch, spot: $spot}') # echo "$json" >&2 redis_cli ZADD ci-run $key "$json" &>/dev/null redis_cli SETEX hb-$key 60 1 &>/dev/null diff --git a/ci3/source_stdlib b/ci3/source_stdlib index a807dd9717f2..18ac41dc369d 100644 --- a/ci3/source_stdlib +++ b/ci3/source_stdlib @@ -44,4 +44,8 @@ function get_num_cpus_max { echo $jobs } +function aws_get_meta_data { + curl -fs -H "X-aws-ec2-metadata-token: $AWS_TOKEN" http://169.254.169.254/latest/meta-data/$1 || true +} + export -f hash_str hash_str_orig echo_stderr uuid get_num_cpus get_num_cpus_max diff --git a/ci3/watch_ci b/ci3/watch_ci index 40c03a631436..1443598d52b9 100755 --- a/ci3/watch_ci +++ b/ci3/watch_ci @@ -60,7 +60,6 @@ function refresh { height=$(tput lines) width=$(tput cols) if [ "$SECONDS" -ge 5 ]; then - # result="$(redis-cli --raw ZREVRANGE ci-run $offset $((offset + height - 3)))" result=$(redis_cli --eval $ci3/lua/set-filter.lua ci-run , \ $offset $((offset + height - 1)) $filter_property $filter_string) SECONDS=0 @@ -69,7 +68,7 @@ function refresh { if [ -z "$result" ]; then echo -n "\nNothing to see here..." else - echo -e "$result" | render + echo -e "$result" | head -n $((height - 1)) | render fi # Clear remainder. echo -e -n "\e[J" From 6dd9205cc43e63cf0ba94459b481040cce63098c Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Tue, 4 Mar 2025 05:59:03 +0000 Subject: [PATCH 2/9] fix --- ci.sh | 2 +- ci3/aws_handle_evict | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.sh b/ci.sh index 4eb4f5c3ec16..6d8eb3787d55 100755 --- a/ci.sh +++ b/ci.sh @@ -91,7 +91,7 @@ case "$cmd" in export DENOISE=1 num=${1:-5} seq 0 $((num - 1)) | parallel --tag --line-buffered \ - "denoise 'INSTANCE_POSTFIX={} bootstrap_ec2 \"USE_TEST_CACHE=0 ./bootstrap.sh ci\"'" + 'INSTANCE_POSTFIX={} bootstrap_ec2 "USE_TEST_CACHE=0 ./bootstrap.sh ci" | cache_log "Grind {}"' ;; "local") # Create container with clone of local repo and bootstrap. diff --git a/ci3/aws_handle_evict b/ci3/aws_handle_evict index 261a4ad2e03a..b74f077a87cd 100755 --- a/ci3/aws_handle_evict +++ b/ci3/aws_handle_evict @@ -18,7 +18,7 @@ while true; do sleep 1 done # Check for imminent spot termination - if aws_get_meta_data spot/termination-time &>/dev/null; then + if curl -fs -H "X-aws-ec2-metadata-token: $AWS_TOKEN" http://169.254.169.254/latest/meta-data/spot/termination-time &>/dev/null; then # Termination notice found, exit with 155. echo "Spot will be terminated! Exiting early." kill -9 -$sid || true From e50017824cdffac42b857accf8526a2885a6f4ed Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Tue, 4 Mar 2025 06:11:34 +0000 Subject: [PATCH 3/9] fix --- ci3/log_ci_run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci3/log_ci_run b/ci3/log_ci_run index c90e4a6890f7..6f632bbda240 100755 --- a/ci3/log_ci_run +++ b/ci3/log_ci_run @@ -11,7 +11,7 @@ if [ -z "$key" ]; then msg=$(git log -1 --pretty=format:"%s") author="$(git log -1 --pretty=format:"%an")" name=$REF_NAME - [ "$(aws_get_meta_data instance-life-cycle)" == "spot"] && spot=true || spot=false + [ "$(aws_get_meta_data instance-life-cycle)" == "spot" ] && spot=true || spot=false # instance_type=$(aws_get_meta_data instance-type) if [[ "$name" =~ ^gh-readonly-queue/([^/]+)/ ]]; then name=${BASH_REMATCH[1]} From 523095d9f2fc99ec0fb70f9c16d41fd9819193e0 Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Wed, 5 Mar 2025 11:31:02 +0000 Subject: [PATCH 4/9] move to source_refname --- ci3/log_ci_run | 4 ---- ci3/source_refname | 26 +++++++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ci3/log_ci_run b/ci3/log_ci_run index 6f632bbda240..62707235c3a1 100755 --- a/ci3/log_ci_run +++ b/ci3/log_ci_run @@ -12,10 +12,6 @@ if [ -z "$key" ]; then author="$(git log -1 --pretty=format:"%an")" name=$REF_NAME [ "$(aws_get_meta_data instance-life-cycle)" == "spot" ] && spot=true || spot=false - # instance_type=$(aws_get_meta_data instance-type) - if [[ "$name" =~ ^gh-readonly-queue/([^/]+)/ ]]; then - name=${BASH_REMATCH[1]} - fi json=$(jq -c -j -n \ --argjson timestamp "$key" \ diff --git a/ci3/source_refname b/ci3/source_refname index e31e620fce74..7a86eef636e4 100644 --- a/ci3/source_refname +++ b/ci3/source_refname @@ -22,22 +22,26 @@ if [ -z "${REF_NAME:-}" ]; then REF_NAME="${REF_NAME#refs/tags/}" # Extract tag name else REF_NAME=$(git symbolic-ref --short -q HEAD || git describe --tags --exact-match 2>/dev/null || git rev-parse HEAD) - export REF_NAME="${REF_NAME#heads/}" + REF_NAME="${REF_NAME#heads/}" fi - export REF_NAME="${REF_NAME#release/}" - # echo "REF_NAME=$REF_NAME" - [ -z "${REF_NAME:-}" ] && exit 1 + + # Strip off any leading "release/" + REF_NAME="${REF_NAME#release/}" + + # If this is github merge queue, just keep the queue name. + if [[ "$REF_NAME" =~ ^gh-readonly-queue/([^/]+)/ ]]; then + REF_NAME=${BASH_REMATCH[1]} + fi + + [ -z "$REF_NAME" ] && exit 1 + + export REF_NAME fi if [ -z "${CI_FULL:-}" ]; then - if [ "$CI" -eq 0 ]; then - export CI_FULL=0 - elif semver check "$REF_NAME"; then - export CI_FULL=1 - elif [ "$REF_NAME" == "master" ]; then + export CI_FULL=0 + if [ "$CI" -eq 1 ] && { semver check "$REF_NAME" || [ "$REF_NAME" == "master" ]; }; then export CI_FULL=1 - else - export CI_FULL=0 fi fi From 5f5c8632e809a6ac82ae3d23eb4b6f15b9420167 Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Wed, 5 Mar 2025 12:33:43 +0000 Subject: [PATCH 5/9] redirect for grind --- ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.sh b/ci.sh index 6d8eb3787d55..07f7e40fb9ae 100755 --- a/ci.sh +++ b/ci.sh @@ -91,7 +91,7 @@ case "$cmd" in export DENOISE=1 num=${1:-5} seq 0 $((num - 1)) | parallel --tag --line-buffered \ - 'INSTANCE_POSTFIX={} bootstrap_ec2 "USE_TEST_CACHE=0 ./bootstrap.sh ci" | cache_log "Grind {}"' + 'INSTANCE_POSTFIX={} bootstrap_ec2 "USE_TEST_CACHE=0 ./bootstrap.sh ci" 2>&1 | cache_log "Grind {}"' ;; "local") # Create container with clone of local repo and bootstrap. From 092da6dd5925fbe31d7864f508b66daacf5bbaff Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Wed, 5 Mar 2025 15:56:45 +0000 Subject: [PATCH 6/9] inject version cleanup --- barretenberg/cpp/bootstrap.sh | 86 ++++++++++++++++------------------- 1 file changed, 38 insertions(+), 48 deletions(-) diff --git a/barretenberg/cpp/bootstrap.sh b/barretenberg/cpp/bootstrap.sh index 5e01e28bc181..a4b06a337b9c 100755 --- a/barretenberg/cpp/bootstrap.sh +++ b/barretenberg/cpp/bootstrap.sh @@ -8,6 +8,24 @@ export preset=clang16-assert export pic_preset="clang16-pic" export hash=$(cache_content_hash .rebuild_patterns) +# Injects version number into a given bb binary. +# Means we don't actually need to rebuild bb to release a new version if code hasn't changed. +function inject_version { + local binary=$1 + local version=$(jq -r '."."' ../../.release-please-manifest.json) + local placeholder='00000000.00000000.00000000' + if [ ${#version} -gt ${#placeholder} ]; then + echo "Error: version ($version) is longer than placeholder. Cannot update bb binaries." + exit 1 + fi + local offset=$(grep -aobF "$placeholder" $binary | head -n 1 | cut -d: -f1) + if [ -z "$offset" ]; then + echo "Placeholder not found in $binary, can't inject version." + exit 1 + fi + printf "$version\0" | dd of=$binary bs=1 seek=$offset conv=notrunc 2>/dev/null +} + # Build all native binaries, including tests. function build_native { set -eu @@ -98,46 +116,26 @@ function download_old_crs { } function build_release { + local arch=$(arch) rm -rf build-release mkdir build-release - local version=$(jq -r '."."' ../../.release-please-manifest.json) - local version_placeholder='00000000.00000000.00000000' - local version_regex='00000000\.00000000\.00000000' - local arch=$(arch) - # We pad version to the length of our version_placeholder, adding null bytes to the end. - # We then write out to this version to our artifacts, using sed to replace the version placeholder in our binaries. - # Calculate lengths (both version and placeholder) - local placeholder_length=${#version_placeholder} - local version_length=${#version} - if (( version_length > placeholder_length )); then - echo "Error: version ($version) is longer than placeholder ($version_placeholder). Cannot update bb binaries." - exit 1 - fi - # Create a string for use in sed that will write the appropriate number of null bytes. - local N=$(( placeholder_length - version_length )) - local nullbytes="$(printf '\\x00%.0s' $(seq 1 "$N"))" - function update_bb_version { - local file=$1 - if ! grep $version_regex "$file" 2>/dev/null; then - echo_stderr "Error: $file does not have placeholder ($version_placeholder). Cannot update bb binaries." - exit 1 - fi - # Perform the actual replacement on a file. - sed "s/$version_regex/$version$nullbytes/" "$file" - } - update_bb_version build/bin/bb > build-release/bb - chmod +x build-release/bb - tar -czf build-release/barretenberg-$arch-linux.tar.gz -C build-release bb - # WASM binaries do not currently report version. - tar -czf build-release/barretenberg-wasm.tar.gz -C build-wasm/bin barretenberg.wasm - tar -czf build-release/barretenberg-debug-wasm.tar.gz -C build-wasm/bin barretenberg-debug.wasm - tar -czf build-release/barretenberg-threads-wasm.tar.gz -C build-wasm-threads/bin barretenberg.wasm - tar -czf build-release/barretenberg-threads-debug-wasm.tar.gz -C build-wasm-threads/bin barretenberg-debug.wasm + cp build/bin/bb build-release/bb + inject_version build-release/bb + tar -czf build-release/barretenberg-$arch-linux.tar.gz -C build-release --remove-files bb + if [ "$CI_FULL" -eq 1 ]; then - update_bb_version build-darwin-$arch/bin/bb > build-darwin-$arch/bin/bb.replaced - chmod +x build-darwin-$arch/bin/bb.replaced - tar -czf build-release/barretenberg-$arch-darwin.tar.gz -C build-darwin-$arch/bin --transform 's/.replaced//' bb.replaced + cp build-darwin-$arch/bin/bb build-release/bb + inject_version build-release/bb + tar -czf build-release/barretenberg-$arch-darwin.tar.gz -C build-release --remove-files bb + fi + + # Only release wasms built on amd64. + if [ "$arch" == "amd64 "]; then + tar -czf build-release/barretenberg-wasm.tar.gz -C build-wasm/bin barretenberg.wasm + tar -czf build-release/barretenberg-debug-wasm.tar.gz -C build-wasm/bin barretenberg-debug.wasm + tar -czf build-release/barretenberg-threads-wasm.tar.gz -C build-wasm-threads/bin barretenberg.wasm + tar -czf build-release/barretenberg-threads-debug-wasm.tar.gz -C build-wasm-threads/bin barretenberg-debug.wasm fi } @@ -152,16 +150,12 @@ function build { build_wasm_threads download_old_crs ) - if [ "$(arch)" == "amd64" ] && [ "${CI:-0}" = 1 ]; then + if [ "$(arch)" == "amd64" ] && [ "$CI" -eq 1 ]; then # TODO figure out why this is failing on arm64 with ultra circuit builder string op overflow. - builds+=( - build_gcc_syntax_check_only - ) + builds+=(build_gcc_syntax_check_only) fi if [ "$CI_FULL" -eq 1 ]; then - builds+=( - build_darwin - ) + builds+=(build_darwin) fi parallel --line-buffered --tag --halt now,fail=1 denoise {} ::: ${builds[@]} build_release @@ -280,10 +274,6 @@ function release { do_or_dryrun gh release upload $REF_NAME build-release/* --clobber } -function release_commit { - release -} - case "$cmd" in "clean") git clean -fdx @@ -304,7 +294,7 @@ case "$cmd" in "hash") echo $hash ;; - test|test_cmds|bench|release|release_commit|build_native|build_wasm|build_wasm_threads|build_darwin|build_release) + test|test_cmds|bench|release|build_native|build_wasm|build_wasm_threads|build_darwin|build_release|inject_version) $cmd "$@" ;; *) From 61602720a66e74d9ce9a9dec8a4c419d13b4008e Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:02:33 +0000 Subject: [PATCH 7/9] remove release_commit --- CI.md | 11 ++++------- barretenberg/ts/bootstrap.sh | 10 ++-------- bootstrap.sh | 25 +------------------------ boxes/bootstrap.sh | 7 +------ docs/bootstrap.sh | 4 ---- l1-contracts/bootstrap.sh | 7 +------ noir/bootstrap.sh | 6 +----- release-image/bootstrap.sh | 4 ---- yarn-project/bootstrap.sh | 9 ++------- 9 files changed, 12 insertions(+), 71 deletions(-) diff --git a/CI.md b/CI.md index c6c05d1a9cec..290b16759f42 100644 --- a/CI.md +++ b/CI.md @@ -341,15 +341,11 @@ The release image is created from a bootstrap, by the `release-image/Dockerfile` ## Releases -Releases can be performed directly from the terminal if necessary. However at present this will require `NPM_TOKEN` which is a secret restricted to a few people. In future we may provide a "staging organistion" for less secure unofficial releases. +Release please is used and will automatically tag the commit e.g. `v1.2.3`. The project will subsequently be released under that version. -One example might be to do an arbitrary commit release: +You can also trigger pre and post releases using extended semver notation such as `v1.2.3-nightly.20250101` or `v1.2.3-devnet.0`. This are made simply by tagging the appropriate master commit. -``` -./bootstrap.sh release_commit -``` - -Which will take the current working tree build, and release it under the current HEAD commit hash. Do this with caution as it's releasing your working tree, but it won't upgrade the official release. For example the npm packages will be published under the `next` distribution tag. +Releases can be performed directly from the terminal if necessary. However at present this will require `NPM_TOKEN` which is a secret restricted to a few people. In future we may provide a "staging organization" for less secure unofficial releases. One can also side-step Release Please automation by updating the version number in the root `.release-please-manifest.json`, committing, tagging the repository with e.g. `v1.2.3`, checking out the tag, and running: @@ -386,6 +382,7 @@ CI_FULL=1 ci ec2-test This will create a new instance, bootstrap, and run all tests that would run on master. ### How does swc compare to tsc (typescript compiler?) + 1. swc is stricter than tsc when it comes to hoisting ESM imports. This means that circular dependencies that were not causing issues previously may now do. madge seems like a good tool for spotting them (npx madge --circular path-to-file), since eslint no-circular-imports not always spots them. When dealing with circular deps, keep in mind type imports are removed, so you don't need to worry about those. 2. swc is a lot faster than tsc, but it does not type check. When running bootstrap eg after a rebase, a successful run does not mean the project types are correct. You need to run bootstrap with TYPECHECK=1 for that. If you want to keep a running process that alerts you of type errors, do yarn tsc -b -w --emitDeclarationOnly at the root of yarn project. 3. There is some combination of swc+tsc+jest that breaks things. If you happen to build your project with `tsc -b`, some test suites (such as prover-client or e2e) will fail to run with a parse error. Workaround is to re-build with swc before running tests by running `./bootstrap.sh compile` on yarn-project, and make sure you are not running `tsc -b -w` (or if you do, you set `--emitDeclarationOnly` as described above). diff --git a/barretenberg/ts/bootstrap.sh b/barretenberg/ts/bootstrap.sh index 58c3ad4838cd..ee3bdc50092c 100755 --- a/barretenberg/ts/bootstrap.sh +++ b/barretenberg/ts/bootstrap.sh @@ -41,13 +41,7 @@ function test { } function release { - local version=${REF_NAME#v} - deploy_npm $(dist_tag) $version -} - -function release_commit { - local version="$CURRENT_VERSION-commit.$COMMIT_HASH" - deploy_npm next $version + deploy_npm $(dist_tag) ${REF_NAME#v} } case "$cmd" in @@ -67,7 +61,7 @@ case "$cmd" in "bench") echo "ts/bootstrap.sh bench is empty" ;; - test|test_cmds|release|release_commit) + test|test_cmds|release) $cmd ;; *) diff --git a/bootstrap.sh b/bootstrap.sh index 56a8022409a3..99ddacf810e9 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -276,29 +276,6 @@ function release_dryrun { DRY_RUN=1 release } -function release_commit { - export REF_NAME="commit-$COMMIT_HASH" - - release_github - - projects=( - barretenberg/cpp - barretenberg/ts - noir - l1-contracts - yarn-project - boxes - aztec-up - playground - docs - release-image - ) - - for project in "${projects[@]}"; do - $project/bootstrap.sh release_commit - done -} - case "$cmd" in "clean") echo "WARNING: This will erase *all* untracked files, including hooks and submodules." @@ -338,7 +315,7 @@ case "$cmd" in release fi ;; - test|test_cmds|bench|release|release_dryrun|release_commit) + test|test_cmds|bench|release|release_dryrun) $cmd "$@" ;; *) diff --git a/boxes/bootstrap.sh b/boxes/bootstrap.sh index 69da2bda9221..bc2069bd90f2 100755 --- a/boxes/bootstrap.sh +++ b/boxes/bootstrap.sh @@ -102,11 +102,6 @@ function release { release_git_push $branch $REF_NAME ${REF_NAME#v} } -function release_commit { - echo_header "boxes release commit" - release_git_push "$CURRENT_VERSION" "commit-$COMMIT_HASH" "$CURRENT_VERSION-commit.$COMMIT_HASH" -} - case "$cmd" in "clean") git clean -fdx @@ -118,7 +113,7 @@ case "$cmd" in ""|"fast"|"full") build ;; - test|test_cmds|release|release_commit) + test|test_cmds|release) $cmd ;; "hash") diff --git a/docs/bootstrap.sh b/docs/bootstrap.sh index a6e1d2bb2d3f..4ff98a6a0391 100755 --- a/docs/bootstrap.sh +++ b/docs/bootstrap.sh @@ -83,10 +83,6 @@ function release { fi } -function release_commit { - yarn netlify deploy --site aztec-docs-dev -} - case "$cmd" in "clean") git clean -fdx diff --git a/l1-contracts/bootstrap.sh b/l1-contracts/bootstrap.sh index 44384c8e8a13..5d4624c843d8 100755 --- a/l1-contracts/bootstrap.sh +++ b/l1-contracts/bootstrap.sh @@ -138,11 +138,6 @@ function release { release_git_push $branch $REF_NAME ${REF_NAME#v} } -function release_commit { - echo_header "l1-contracts release commit" - release_git_push "$CURRENT_VERSION" "commit-$COMMIT_HASH" "$CURRENT_VERSION-commit.$COMMIT_HASH" -} - case "$cmd" in "clean") git clean -fdx @@ -157,7 +152,7 @@ case "$cmd" in "test") test ;; - test_cmds|release|release_commit) + test_cmds|release) $cmd ;; "hash") diff --git a/noir/bootstrap.sh b/noir/bootstrap.sh index bc6d5b3e2106..c41aa588e42e 100755 --- a/noir/bootstrap.sh +++ b/noir/bootstrap.sh @@ -179,10 +179,6 @@ function release { release_packages $(dist_tag) ${REF_NAME#v} } -function release_commit { - release_packages next "$CURRENT_VERSION-commit.$COMMIT_HASH" -} - case "$cmd" in "clean") git clean -fdx @@ -194,7 +190,7 @@ case "$cmd" in ""|"fast"|"full") build ;; - test_cmds|build_native|build_packages|format|test|release|release_commit|test_example) + test_cmds|build_native|build_packages|format|test|release|test_example) $cmd "$@" ;; "hash") diff --git a/release-image/bootstrap.sh b/release-image/bootstrap.sh index 7726da4edb57..f0de04e6e242 100755 --- a/release-image/bootstrap.sh +++ b/release-image/bootstrap.sh @@ -38,10 +38,6 @@ case "$cmd" in docker manifest push $(dist_tag) fi ;; - "release_commit") - echo_header "release-image release commit" - docker push aztecprotocol/aztec:$(git rev-parse HEAD) - ;; *) echo "Unknown command: $cmd" exit 1 diff --git a/yarn-project/bootstrap.sh b/yarn-project/bootstrap.sh index cd574c2fe3fc..ed1770451542 100755 --- a/yarn-project/bootstrap.sh +++ b/yarn-project/bootstrap.sh @@ -166,12 +166,7 @@ function release_packages { function release { echo_header "yarn-project release" # WORKTODO latest is only on master, otherwise use ref name - release_packages latest ${REF_NAME#v} -} - -function release_commit { - echo_header "yarn-project release commit" - release_packages next "$CURRENT_VERSION-commit.$COMMIT_HASH" + release_packages $(dist-tag) ${REF_NAME#v} } case "$cmd" in @@ -205,7 +200,7 @@ case "$cmd" in "lint") lint "$@" ;; - test|test_cmds|hash|release|release_commit|format) + test|test_cmds|hash|release|format) $cmd ;; *) From 47642f101f1a54151de05ebf3fb691d8c8d393bd Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Wed, 5 Mar 2025 16:05:23 +0000 Subject: [PATCH 8/9] remove release/ handling from source_ref and undo merge queue manipulation --- ci3/log_ci_run | 5 +++++ ci3/source_refname | 8 -------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ci3/log_ci_run b/ci3/log_ci_run index 62707235c3a1..dbaac5d188b5 100755 --- a/ci3/log_ci_run +++ b/ci3/log_ci_run @@ -13,6 +13,11 @@ if [ -z "$key" ]; then name=$REF_NAME [ "$(aws_get_meta_data instance-life-cycle)" == "spot" ] && spot=true || spot=false + # If this is github merge queue, just keep the queue name. + if [[ "$name" =~ ^gh-readonly-queue/([^/]+)/ ]]; then + name=${BASH_REMATCH[1]} + fi + json=$(jq -c -j -n \ --argjson timestamp "$key" \ --arg status "$status" \ diff --git a/ci3/source_refname b/ci3/source_refname index 7a86eef636e4..3893ddb1159e 100644 --- a/ci3/source_refname +++ b/ci3/source_refname @@ -25,14 +25,6 @@ if [ -z "${REF_NAME:-}" ]; then REF_NAME="${REF_NAME#heads/}" fi - # Strip off any leading "release/" - REF_NAME="${REF_NAME#release/}" - - # If this is github merge queue, just keep the queue name. - if [[ "$REF_NAME" =~ ^gh-readonly-queue/([^/]+)/ ]]; then - REF_NAME=${BASH_REMATCH[1]} - fi - [ -z "$REF_NAME" ] && exit 1 export REF_NAME From 635be1498c04c0938e89d2f5b1809e43db16e722 Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Sat, 8 Mar 2025 14:02:21 +0000 Subject: [PATCH 9/9] preset in patterns --- barretenberg/cpp/.rebuild_patterns | 1 + 1 file changed, 1 insertion(+) diff --git a/barretenberg/cpp/.rebuild_patterns b/barretenberg/cpp/.rebuild_patterns index c6dd24549afc..4c7ba2459ea5 100644 --- a/barretenberg/cpp/.rebuild_patterns +++ b/barretenberg/cpp/.rebuild_patterns @@ -3,3 +3,4 @@ ^barretenberg/cpp/.*Dockerfile.*$ ^barretenberg/cpp/scripts/ ^barretenberg/cpp/bootstrap.sh +^barretenberg/cpp/CMakePresets.json