Skip to content

Commit

Permalink
Fix Docker image existence check (normalization) (#17908)
Browse files Browse the repository at this point in the history
* fix path to NormalizationRunnerFactory

* check for file existence also
  • Loading branch information
edgao authored Oct 12, 2022
1 parent bd0c238 commit 808af16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/bin/check_images_exist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down

0 comments on commit 808af16

Please sign in to comment.