This is an automated email from the ASF dual-hosted git repository.
ash pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 1f52a85dec6 Fix local running of backcompat tests after we switched to
UV (#48669)
1f52a85dec6 is described below
commit 1f52a85dec6cdef7fa2079a1f3573c458a489b94
Author: Ash Berlin-Taylor <[email protected]>
AuthorDate: Wed Apr 2 12:19:02 2025 +0100
Fix local running of backcompat tests after we switched to UV (#48669)
We were including a real `airflow/__init__.py` which has the unfortunate
side-effect of making `AIRFLOW_V_3_0_PLUS` find 3.0.0dev0 as the version!
Oops. The fix for that is to mount an empyt init file instead (we need a
file
to keep the uv build etc happy)
Also uninstall edge provider for 2.9, as that needs 2.10.
Oh and volume mount devel-common as that is part of test code.
---
scripts/ci/docker-compose/providers-and-tests-sources.yml | 6 ++++--
scripts/in_container/install_airflow_and_providers.py | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/scripts/ci/docker-compose/providers-and-tests-sources.yml
b/scripts/ci/docker-compose/providers-and-tests-sources.yml
index a8008d83892..c40e9faa371 100644
--- a/scripts/ci/docker-compose/providers-and-tests-sources.yml
+++ b/scripts/ci/docker-compose/providers-and-tests-sources.yml
@@ -29,11 +29,13 @@ services:
# Remove airflow sources from container
- ../../../empty:/opt/airflow/airflow-core/src
# But keep airflow/__init__.py to make hatchling happy when building
empty package
- -
../../../airflow-core/src/airflow/__init__.py:/opt/airflow/airflow-core/src/airflow/__init__.py
+ - /dev/null:/opt/airflow/airflow-core/src/airflow/__init__.py
# Remove task-sdk sources from container
- ../../../empty:/opt/airflow/task-sdk/src
# But keep task-sdk/a__init__.py to make hatchling happy when building
empty package
- -
../../../task-sdk/src/airflow/sdk/__init__.py:/opt/airflow/task-sdk/src/airflow/sdk/__init__.py
+ - /dev/null:/opt/airflow/task-sdk/src/airflow/sdk/__init__.py
+
+ - ../../../devel-common:/opt/airflow/devel-common
# And keep tests
- ../../../airflow-core/tests/:/opt/airflow/airflow-core/tests:cached
# Mount providers to make sure that we have the latest providers - both
tests and sources
diff --git a/scripts/in_container/install_airflow_and_providers.py
b/scripts/in_container/install_airflow_and_providers.py
index 1d93b74f8fe..dd5472bf0bf 100755
--- a/scripts/in_container/install_airflow_and_providers.py
+++ b/scripts/in_container/install_airflow_and_providers.py
@@ -796,6 +796,8 @@ def install_airflow_and_providers(
"apache-airflow-providers-common-messaging",
"apache-airflow-providers-git",
]
+ if version.minor < 10:
+
providers_to_uninstall_for_airflow_2.append("apache-airflow-providers-edge")
run_command(
["uv", "pip", "uninstall",
*providers_to_uninstall_for_airflow_2],
github_actions=github_actions,