This is an automated email from the ASF dual-hosted git repository.
potiuk 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 e0c5458c333 Fix constraint mode when installing from dist or version
airflow (#60304)
e0c5458c333 is described below
commit e0c5458c3334544c6432d6bc6b5e9c6345363ef6
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Jan 9 02:39:08 2026 +0100
Fix constraint mode when installing from dist or version airflow (#60304)
When Airflow is installed in breeze with `--use-airflow-version`
and it's either wheel, dist or version number, we should use
PyPI constraints, rather than source constraints, because in some
edge cases, pre-installed providers might be installed using
different version than the version specified in PyPI constraints.
This might happen if the dependency resolution run by uv will
determine that another package is more important to be installed
in higher version and that higher version conflicts with newer
preinstalled provider version.
In this case Fab Provider is pinned with fab provider and the
version of fab provider in v3-1-test sources was pretty old.
---
scripts/in_container/install_airflow_and_providers.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/in_container/install_airflow_and_providers.py
b/scripts/in_container/install_airflow_and_providers.py
index 2b4688de7a6..5337643f152 100755
--- a/scripts/in_container/install_airflow_and_providers.py
+++ b/scripts/in_container/install_airflow_and_providers.py
@@ -391,6 +391,8 @@ def find_installation_spec(
airflow_version =
get_airflow_version_from_package(airflow_distribution_spec)
if airflow_version:
console.print(f"[bright_blue]Using airflow version retrieved
from package: {airflow_version}")
+ console.print("[yellow]Constraints mode is forced to
'constraints': installation from dist")
+ airflow_constraints_mode = "constraints"
airflow_constraints_location =
get_airflow_constraints_location(
install_airflow_with_constraints=install_airflow_with_constraints,
airflow_constraints_mode=airflow_constraints_mode,
@@ -503,6 +505,7 @@ def find_installation_spec(
)
sys.exit(1)
else:
+ # Install specific airflow version
compile_ui_assets = False
if use_airflow_version.startswith("2"):
airflow_extras = _add_pydantic_to_extras(airflow_extras)
@@ -511,6 +514,8 @@ def find_installation_spec(
airflow_core_distribution_spec = (
f"apache-airflow-core=={use_airflow_version}" if not
use_airflow_version.startswith("2") else None
)
+ console.print("[yellow]Constraints mode is forced to 'constraints':
installation from PyPI")
+ airflow_constraints_mode = "constraints"
airflow_constraints_location = get_airflow_constraints_location(
install_airflow_with_constraints=install_airflow_with_constraints,
airflow_constraints_mode=airflow_constraints_mode,