Skip to content

Commit 34aa2a3

Browse files
authored
Rename race condition image tags (#3311)
1 parent a5acbaa commit 34aa2a3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scripts/build_image.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ AVALANCHE_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )
2828
# Load the constants
2929
source "$AVALANCHE_PATH"/scripts/constants.sh
3030

31-
if [[ $image_tag == *"-race" ]]; then
32-
echo "Branch name must not end in '-race'"
31+
if [[ $image_tag == *"-r" ]]; then
32+
echo "Branch name must not end in '-r'"
3333
exit 1
3434
fi
3535

@@ -84,8 +84,8 @@ echo "Building Docker Image with tags: $DOCKER_IMAGE:$commit_hash , $DOCKER_IMAG
8484
${DOCKER_CMD} -t "$DOCKER_IMAGE:$commit_hash" -t "$DOCKER_IMAGE:$image_tag" \
8585
"$AVALANCHE_PATH" -f "$AVALANCHE_PATH/Dockerfile"
8686

87-
echo "Building Docker Image with tags: $DOCKER_IMAGE:$commit_hash-race , $DOCKER_IMAGE:$image_tag-race"
88-
${DOCKER_CMD} --build-arg="RACE_FLAG=-r" -t "$DOCKER_IMAGE:$commit_hash-race" -t "$DOCKER_IMAGE:$image_tag-race" \
87+
echo "Building Docker Image with tags: $DOCKER_IMAGE:$commit_hash-r , $DOCKER_IMAGE:$image_tag-r"
88+
${DOCKER_CMD} --build-arg="RACE_FLAG=-r" -t "$DOCKER_IMAGE:$commit_hash-r" -t "$DOCKER_IMAGE:$image_tag-r" \
8989
"$AVALANCHE_PATH" -f "$AVALANCHE_PATH/Dockerfile"
9090

9191
# Only tag the latest image for the master branch when images are pushed to a registry

scripts/tests.build_image.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ build_and_test() {
3636
local target_images=(
3737
"$image_name:$commit_hash"
3838
"$image_name:$image_tag"
39-
"$image_name:$commit_hash-race"
40-
"$image_name:$image_tag-race"
39+
"$image_name:$commit_hash-r"
40+
"$image_name:$image_tag-r"
4141
)
4242

4343
for arch in "${arches[@]}"; do
4444
for target_image in "${target_images[@]}"; do
45-
if [[ "$host_arch" == "amd64" && "$arch" == "arm64" && "$target_image" =~ "-race" ]]; then
45+
if [[ "$host_arch" == "amd64" && "$arch" == "arm64" && "$target_image" =~ "-r" ]]; then
4646
# Error reported when trying to sanity check this configuration in github ci:
4747
#
4848
# FATAL: ThreadSanitizer: unsupported VMA range

0 commit comments

Comments
 (0)