From 3abbb807aadd8a954260921f3480d482bca46f59 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Wed, 5 Jun 2024 17:12:12 +0200 Subject: [PATCH] Expllicitly skip API tests for compatiblity tests on 2.7 and 2.8 (#40059) The Providers[fab] tests are generally excluded when backwards compatibility tests for 2.7 and 2.8 are run, however in some situation when selective checks determine that API tests should be run as well (for example when FAB code is modified), the FAB tests are also added to list of test types. This PR explicitly skips the whole TEST_TYPE execution in case Airfow 2.7 or 2.8 are supposed to be installed when running the tests. --- Dockerfile.ci | 6 ++++++ scripts/docker/entrypoint_ci.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Dockerfile.ci b/Dockerfile.ci index cc06ef923bffd..873ec62f2557c 100644 --- a/Dockerfile.ci +++ b/Dockerfile.ci @@ -985,6 +985,12 @@ function determine_airflow_to_use() { mkdir -p "${AIRFLOW_SOURCES}"/logs/ mkdir -p "${AIRFLOW_SOURCES}"/tmp/ else + if [[ ${USE_AIRFLOW_VERSION} =~ 2\.[7-8].* && ${TEST_TYPE} == "Providers[fab]" ]]; then + echo + echo "${COLOR_YELLOW}Skipping FAB tests on Airflow 2.7 and 2.8 because of FAB incompatibility with them${COLOR_RESET}" + echo + return + fi python "${IN_CONTAINER_DIR}/install_airflow_and_providers.py" # Some packages might leave legacy typing module which causes test issues pip uninstall -y typing || true diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh index 380008c9838ea..6b3130adbaa6a 100755 --- a/scripts/docker/entrypoint_ci.sh +++ b/scripts/docker/entrypoint_ci.sh @@ -204,6 +204,12 @@ function determine_airflow_to_use() { mkdir -p "${AIRFLOW_SOURCES}"/logs/ mkdir -p "${AIRFLOW_SOURCES}"/tmp/ else + if [[ ${USE_AIRFLOW_VERSION} =~ 2\.[7-8].* && ${TEST_TYPE} == "Providers[fab]" ]]; then + echo + echo "${COLOR_YELLOW}Skipping FAB tests on Airflow 2.7 and 2.8 because of FAB incompatibility with them${COLOR_RESET}" + echo + return + fi python "${IN_CONTAINER_DIR}/install_airflow_and_providers.py" # Some packages might leave legacy typing module which causes test issues pip uninstall -y typing || true