From 89b6d13c6794c25ede37fbda5323ce5bc4f1f4ff Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Fri, 23 May 2025 17:15:22 +0000 Subject: [PATCH 1/3] fix: test tracking --- ci3/run_test_cmd | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ci3/run_test_cmd b/ci3/run_test_cmd index bbcbad29ff6c..96deea7edac3 100755 --- a/ci3/run_test_cmd +++ b/ci3/run_test_cmd @@ -7,12 +7,11 @@ source $ci3/source_refname # We must enable job control to ensure our test runs in it's own process group. # Otherwise, when parallel sends a TERM to the group, it will also kill any child process of the test. # This can cause issues with proper cleanup (e.g. killing docker client processes as they run). -# Slightly breaking the abstraction here, but if using strict scheduling we don't have the above problem, -# but instead we want to avoid lots of "Terminated" messages. -# [ "${STRICT_SCHEDULING:-0}" -eq 0 ] && set -m set -m cmd=$1 +is_merge_queue=0 +[[ "$REF_NAME" =~ ^gh-readonly-queue/ ]] && is_merge_queue=1 # Extract the first token and export any variable assignments. hash_part="${cmd%% *}" @@ -169,15 +168,17 @@ if [ "$CI_REDIS_AVAILABLE" -eq 1 ]; then fi function track_test { - # We track tests in CI on in merge queues (TARGET_BRANCH will be set). - if [[ "$CI" -eq 1 && -n "${TARGET_BRANCH:-}" ]]; then - local key=${1}_$TARGET_BRANCH - local line="$2 (target: $TARGET_BRANCH)" - - redis_cli LPUSH $key "$(date "+%m-%d %H:%M:%S"): $(echo -e "$line")" &>/dev/null - # Keeps only the last 1000 lines. - redis_cli RTRIM $key -1000 -1 &>/dev/null + # We track tests in merge queues only. + if [ "$is_merge_queue" -eq 0 ]; then + return fi + + local key=$1 + local line="$2 (target: $TARGET_BRANCH)" + + redis_cli LPUSH $key "$(date "+%m-%d %H:%M:%S"): $(echo -e "$line")" &>/dev/null + # Keeps only the last 1000 lines. + redis_cli RTRIM $key -1000 -1 &>/dev/null } # Show PASSED and early out on success. @@ -193,6 +194,7 @@ function fail { local line="${red}FAILED${reset}${log_info:-}: $test_cmd (${SECONDS}s) (code: $code)${1:-}" track_test $test_hash "$line" track_test "failed_tests" "$line" + track_test "failed_tests_${TARGET_BRANCH:-}" "$line" echo -e "$line" if [ "${DUMP_FAIL:-0}" -eq 1 ]; then cat $tmp_file @@ -206,10 +208,11 @@ function flake { local line="${purple}FLAKED${reset}${log_info:-}: $test_cmd (${SECONDS}s) (code: $code)" track_test $test_hash "$line" track_test "failed_tests" "$line" + track_test "failed_tests_${TARGET_BRANCH:-}" "$line" echo -e "$line" # Early out if no token or not in merge queue. - if [ -z "${SLACK_BOT_TOKEN:-}" ] || [[ ! "$REF_NAME" =~ ^gh-readonly-queue/ ]]; then + if [ -z "${SLACK_BOT_TOKEN:-}" ] || [ "$is_merge_queue" -eq 0 ]; then return fi From 645c008e7e158d31298ce68058c3a3d1e3a5364f Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Fri, 23 May 2025 18:07:46 +0000 Subject: [PATCH 2/3] fix --- l1-contracts/bootstrap.sh | 2 +- l1-contracts/test/shouting.t.sol | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/l1-contracts/bootstrap.sh b/l1-contracts/bootstrap.sh index 9b2a5cbd9b10..0e31f3f399d9 100755 --- a/l1-contracts/bootstrap.sh +++ b/l1-contracts/bootstrap.sh @@ -56,7 +56,7 @@ function test_cmds { echo "$hash cd l1-contracts && solhint --config ./.solhint.json \"src/**/*.sol\"" echo "$hash cd l1-contracts && forge fmt --check" echo "$hash cd l1-contracts && forge test" - if [ "${TARGET_BRANCH:-}" == "master" ]; then + if [ "$CI" -eq 0 ] || [ "${TARGET_BRANCH:-}" == "master" ]; then echo "$hash cd l1-contracts && forge test --no-match-contract UniswapPortalTest --match-contract ScreamAndShoutTest" fi } diff --git a/l1-contracts/test/shouting.t.sol b/l1-contracts/test/shouting.t.sol index b2a728961126..a2afd0155b8c 100644 --- a/l1-contracts/test/shouting.t.sol +++ b/l1-contracts/test/shouting.t.sol @@ -31,7 +31,7 @@ contract ScreamAndShoutTest is Test { bytes32 codeHash = keccak256(creationCode); assertEq( - codeHash, 0x1ee8b65cce354f0149f5dc00ff4314acf147d4efe28a789016a4031adebec039, ERR_STRING + codeHash, 0x892b4a5c70e2e665b147db8ae02a0410ae400adefd02d85feb56847593d4b9dd, ERR_STRING ); } From 51e8575acb57910ca8858f30fd9f770ee55748e9 Mon Sep 17 00:00:00 2001 From: Charlie Lye <5764343+charlielye@users.noreply.github.com> Date: Fri, 23 May 2025 19:09:20 +0000 Subject: [PATCH 3/3] fix --- barretenberg/cpp/bootstrap.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/barretenberg/cpp/bootstrap.sh b/barretenberg/cpp/bootstrap.sh index 51d3153f654d..d6be779b10b1 100755 --- a/barretenberg/cpp/bootstrap.sh +++ b/barretenberg/cpp/bootstrap.sh @@ -107,12 +107,7 @@ function build_wasm { function build_wasm_threads { set -eu if ! cache_download barretenberg-wasm-threads-$hash.zst; then - if [ "$(arch)" == "amd64" ] && [ "$CI" -eq 1 ]; then - # We only want to sanity check that we haven't broken wasm ecc ops in merge queue. - build_preset wasm-threads --target barretenberg.wasm barretenberg.wasm.gz ecc_tests - else - build_preset wasm-threads - fi + build_preset wasm-threads --target barretenberg.wasm barretenberg.wasm.gz ecc_tests cache_upload barretenberg-wasm-threads-$hash.zst build-wasm-threads/bin fi }