kaxil commented on a change in pull request #12154:
URL: https://github.com/apache/airflow/pull/12154#discussion_r519768341
##########
File path: scripts/ci/images/ci_prepare_prod_image_on_ci.sh
##########
@@ -48,4 +48,61 @@ function build_prod_images_on_ci() {
}
+
+function verify_prod_image_has_airflow_and_providers {
+ echo
+ echo "Airflow folders installed in the image:"
+ echo
+
+ AIRFLOW_INSTALLATION_LOCATION="/home/airflow/.local"
+
+ docker run --rm --entrypoint /bin/bash "${AIRFLOW_PROD_IMAGE}" -c \
+ 'find
'"${AIRFLOW_INSTALLATION_LOCATION}"'/lib/python*/site-packages/airflow/ -type d'
+
+ EXPECTED_MIN_AIRFLOW_DIRS_COUNT="60"
+ readonly EXPECTED_MIN_AIRFLOW_DIRS_COUNT
+
+ COUNT_AIRFLOW_DIRS=$(docker run --rm --entrypoint /bin/bash
"${AIRFLOW_PROD_IMAGE}" -c \
+ 'find
'"${AIRFLOW_INSTALLATION_LOCATION}"'/lib/python*/site-packages/airflow/ -type d
| grep -c -v "/airflow/providers"')
+
+ echo
+ echo "Number of airflow dirs: ${COUNT_AIRFLOW_DIRS}"
+ echo
+
+ if [[ "${COUNT_AIRFLOW_DIRS}" -lt "${EXPECTED_MIN_AIRFLOW_DIRS_COUNT}" ]];
then
+ >&2 echo
+ >&2 echo Number of airflow folders installed is less than
${EXPECTED_MIN_AIRFLOW_DIRS_COUNT}
+ >&2 echo This is unexpected. Please investigate, looking at the output
above!
Review comment:
Can we add some more information on what needs to be investigated, i.e.
something like "Providers might not have been installed" etc
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]