Skip to content

Commit

Permalink
Expllicitly skip API tests for compatiblity tests on 2.7 and 2.8 (apa…
Browse files Browse the repository at this point in the history
…che#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.
  • Loading branch information
potiuk authored and fdemiane committed Jun 6, 2024
1 parent 60773a4 commit 3abbb80
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions scripts/docker/entrypoint_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3abbb80

Please sign in to comment.