From 34aa2a360818cea38f38df2bc7df4812a5e5515c Mon Sep 17 00:00:00 2001 From: cam-schultz <78878559+cam-schultz@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:50:49 -0500 Subject: [PATCH] Rename race condition image tags (#3311) --- scripts/build_image.sh | 8 ++++---- scripts/tests.build_image.sh | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/build_image.sh b/scripts/build_image.sh index 3a7b7e588d0..d587f41373e 100755 --- a/scripts/build_image.sh +++ b/scripts/build_image.sh @@ -28,8 +28,8 @@ AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) # Load the constants source "$AVALANCHE_PATH"/scripts/constants.sh -if [[ $image_tag == *"-race" ]]; then - echo "Branch name must not end in '-race'" +if [[ $image_tag == *"-r" ]]; then + echo "Branch name must not end in '-r'" exit 1 fi @@ -84,8 +84,8 @@ echo "Building Docker Image with tags: $DOCKER_IMAGE:$commit_hash , $DOCKER_IMAG ${DOCKER_CMD} -t "$DOCKER_IMAGE:$commit_hash" -t "$DOCKER_IMAGE:$image_tag" \ "$AVALANCHE_PATH" -f "$AVALANCHE_PATH/Dockerfile" -echo "Building Docker Image with tags: $DOCKER_IMAGE:$commit_hash-race , $DOCKER_IMAGE:$image_tag-race" -${DOCKER_CMD} --build-arg="RACE_FLAG=-r" -t "$DOCKER_IMAGE:$commit_hash-race" -t "$DOCKER_IMAGE:$image_tag-race" \ +echo "Building Docker Image with tags: $DOCKER_IMAGE:$commit_hash-r , $DOCKER_IMAGE:$image_tag-r" +${DOCKER_CMD} --build-arg="RACE_FLAG=-r" -t "$DOCKER_IMAGE:$commit_hash-r" -t "$DOCKER_IMAGE:$image_tag-r" \ "$AVALANCHE_PATH" -f "$AVALANCHE_PATH/Dockerfile" # Only tag the latest image for the master branch when images are pushed to a registry diff --git a/scripts/tests.build_image.sh b/scripts/tests.build_image.sh index af3cea84f1d..a383b3190f9 100755 --- a/scripts/tests.build_image.sh +++ b/scripts/tests.build_image.sh @@ -36,13 +36,13 @@ build_and_test() { local target_images=( "$image_name:$commit_hash" "$image_name:$image_tag" - "$image_name:$commit_hash-race" - "$image_name:$image_tag-race" + "$image_name:$commit_hash-r" + "$image_name:$image_tag-r" ) for arch in "${arches[@]}"; do for target_image in "${target_images[@]}"; do - if [[ "$host_arch" == "amd64" && "$arch" == "arm64" && "$target_image" =~ "-race" ]]; then + if [[ "$host_arch" == "amd64" && "$arch" == "arm64" && "$target_image" =~ "-r" ]]; then # Error reported when trying to sanity check this configuration in github ci: # # FATAL: ThreadSanitizer: unsupported VMA range