You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/01/21 20:19:29 UTC
[airflow] 04/44: Enable PIP check for both CI and PROD image
(#12664)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 52eb912c30cb043c6632b35c92cdcf82ddb02e01
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Fri Nov 27 21:33:50 2020 +0100
Enable PIP check for both CI and PROD image (#12664)
This PR enables PIP check after constraints have been updated
to be stable and 'pip check' compliant in #12636
(cherry picked from commit fa8af2d16551e287673d94a40cfb41e49d685412)
---
scripts/ci/images/ci_wait_for_ci_image.sh | 17 +++++++++++++++++
scripts/ci/images/ci_wait_for_prod_image.sh | 18 ++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/scripts/ci/images/ci_wait_for_ci_image.sh b/scripts/ci/images/ci_wait_for_ci_image.sh
index 0c3ea08..4b52b9a 100755
--- a/scripts/ci/images/ci_wait_for_ci_image.sh
+++ b/scripts/ci/images/ci_wait_for_ci_image.sh
@@ -18,6 +18,17 @@
# shellcheck source=scripts/ci/libraries/_script_init.sh
. "$( dirname "${BASH_SOURCE[0]}" )/../libraries/_script_init.sh"
+function verify_ci_image_dependencies {
+ echo
+ echo "Checking if Airflow dependencies are non-conflicting in CI image."
+ echo
+
+ push_pull_remove_images::pull_image_github_dockerhub "${AIRFLOW_CI_IMAGE}" \
+ "${GITHUB_REGISTRY_AIRFLOW_CI_IMAGE}:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
+
+ docker run --rm --entrypoint /bin/bash "${AIRFLOW_CI_IMAGE}" -c 'pip check'
+}
+
push_pull_remove_images::check_if_github_registry_wait_for_image_enabled
push_pull_remove_images::check_if_jq_installed
@@ -32,3 +43,9 @@ echo
push_pull_remove_images::wait_for_github_registry_image \
"${AIRFLOW_CI_IMAGE_NAME}" "${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
+
+echo
+echo "Verifying the ${AIRFLOW_CI_IMAGE_NAME} image after pulling it"
+echo
+
+verify_ci_image_dependencies
diff --git a/scripts/ci/images/ci_wait_for_prod_image.sh b/scripts/ci/images/ci_wait_for_prod_image.sh
index 1c7cef5..e53aec1 100755
--- a/scripts/ci/images/ci_wait_for_prod_image.sh
+++ b/scripts/ci/images/ci_wait_for_prod_image.sh
@@ -18,6 +18,18 @@
# shellcheck source=scripts/ci/libraries/_script_init.sh
. "$( dirname "${BASH_SOURCE[0]}" )/../libraries/_script_init.sh"
+function verify_prod_image_dependencies {
+ echo
+ echo "Checking if Airflow dependencies are non-conflicting in PROD image."
+ echo
+
+ push_pull_remove_images::pull_image_github_dockerhub "${AIRFLOW_PROD_IMAGE}" \
+ "${GITHUB_REGISTRY_AIRFLOW_PROD_IMAGE}:${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
+
+ # TODO: remove the | true after we fixed pip check for prod image
+ docker run --rm --entrypoint /bin/bash "${AIRFLOW_PROD_IMAGE}" -c 'pip check' || true
+}
+
push_pull_remove_images::check_if_github_registry_wait_for_image_enabled
push_pull_remove_images::check_if_jq_installed
@@ -32,3 +44,9 @@ echo
push_pull_remove_images::wait_for_github_registry_image \
"${AIRFLOW_PROD_IMAGE_NAME}" "${GITHUB_REGISTRY_PULL_IMAGE_TAG}"
+
+echo
+echo "Verifying the ${AIRFLOW_PROD_IMAGE_NAME} image after pulling it"
+echo
+
+verify_prod_image_dependencies