Skip to content

Commit

Permalink
feat: update version and .binproto, fix error of no file
Browse files Browse the repository at this point in the history
  • Loading branch information
W0ngL1 authored Apr 3, 2024
1 parent a305357 commit 4a6c780
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,30 @@ PROJECT_ROOT="$(cd -- "${SCRIPT_PATH}/../../../.." >/dev/null 2>&1 ; pwd -P)"
# Path to the configurations for starting a live instance of Airflow.
APP_PATH="${SCRIPT_PATH}/app"
# Path to the temporary data holder.
TMP_DATA="/root/airflow_fingerprints"
TMP_DATA="/tmp/airflow_fingerprints"
# Path to the local git repository for Airflow codebase.
GIT_REPO="${TMP_DATA}/repo"
# Path to the directory of all the updated fingerprints data.
FINGERPRINTS_PATH="${TMP_DATA}/fingerprints"
# Json data of the final result.
JSON_DATA="${FINGERPRINTS_PATH}/fingerprint.json"
# Binary proto data of the final result.
BIN_DATA="${FINGERPRINTS_PATH}/fingerprint.binproto"
BIN_DATA="${FINGERPRINTS_PATH}/airflow.binproto"
# Read all the versions to be fingerprinted.
readarray -t ALL_VERSIONS < "${SCRIPT_PATH}/versions.txt"
mkdir -p "${FINGERPRINTS_PATH}"

startAirflow() {
local version="$1"
pushd "${APP_PATH}" >/dev/null
# add COMPOSE_HTTP_TIMEOUT to avoid docker-compose errors
SOLR_VERSION="${version}" COMPOSE_HTTP_TIMEOUT=200 docker-compose -f airflow-${version}.yaml up -d
COMPOSE_HTTP_TIMEOUT=200 docker-compose -f airflow-${version}.yaml up -d
popd >/dev/null
}

stopAirflow() {
local version="$1"
pushd "${APP_PATH}" >/dev/null
SOLR_VERSION="${version}" COMPOSE_HTTP_TIMEOUT=200 docker-compose -f airflow-${version}.yaml down --volumes --remove-orphans
COMPOSE_HTTP_TIMEOUT=200 docker-compose -f airflow-${version}.yaml down --volumes --remove-orphans
popd >/dev/null
}

Expand All @@ -71,8 +70,9 @@ for version in "${ALL_VERSIONS[@]}"; do
startAirflow "${version}"
# Arbitrarily chosen so that Airflow is up and running.
echo "Waiting for Airflow ${version} to be ready ..."
sleep 60
sleep 60
# No need to do other installation process for Airflow.
touch ${FINGERPRINTS_PATH}/fingerprint.${version}.json

# Checkout the repository to the correct tag.
checkOutRepo "${GIT_REPO}" "${version}"
Expand All @@ -92,5 +92,3 @@ convertFingerprint "${JSON_DATA}" "${BIN_DATA}"

echo "Fingerprint updated for Airflow. Please commit the following file:"
echo " ${BIN_DATA}"


Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
2.8.4
2.8.3
2.8.2
2.8.1
Expand Down

0 comments on commit 4a6c780

Please sign in to comment.