From 808af16023940c9d1f68984246590e88f63124ef Mon Sep 17 00:00:00 2001 From: Edward Gao Date: Wed, 12 Oct 2022 14:08:46 -0700 Subject: [PATCH] Fix Docker image existence check (normalization) (#17908) * fix path to NormalizationRunnerFactory * check for file existence also --- tools/bin/check_images_exist.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/bin/check_images_exist.sh b/tools/bin/check_images_exist.sh index 39a582b2cd4d..efbab4272f04 100755 --- a/tools/bin/check_images_exist.sh +++ b/tools/bin/check_images_exist.sh @@ -29,7 +29,10 @@ checkPlatformImages() { checkNormalizationImages() { # the only way to know what version of normalization the platform is using is looking in NormalizationRunnerFactory. local image_version; - image_version=$(cat airbyte-workers/src/main/java/io/airbyte/workers/normalization/NormalizationRunnerFactory.java | grep 'NORMALIZATION_VERSION =' | cut -d"=" -f2 | sed 's:;::' | sed -e 's:"::g' | sed -e 's:[[:space:]]::g') + factory_path=airbyte-commons-worker/src/main/java/io/airbyte/workers/normalization/NormalizationRunnerFactory.java + # This check should fail if the file doesn't exist, so just try to ls the file + ls $factory_path > /dev/null + image_version=$(cat $factory_path | grep 'NORMALIZATION_VERSION =' | cut -d"=" -f2 | sed 's:;::' | sed -e 's:"::g' | sed -e 's:[[:space:]]::g') echo "Checking normalization images with version $image_version exist..." VERSION=$image_version docker-compose -f airbyte-integrations/bases/base-normalization/docker-compose.yaml pull || exit 1 echo "Success! All normalization images exist!"