This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new da3c7c92aac [v3-1-test] Fix constraint mode when installing from dist
or version airflow (#60304) (#60305)
da3c7c92aac is described below
commit da3c7c92aac85674d0a4fbf3a198e38a5a3786e1
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jan 9 02:41:33 2026 +0100
[v3-1-test] Fix constraint mode when installing from dist or version
airflow (#60304) (#60305)
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.
(cherry picked from commit e0c5458c3334544c6432d6bc6b5e9c6345363ef6)
Co-authored-by: Jarek Potiuk <[email protected]>
---
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 1b3341ef954..f42dfc9431f 100755
--- a/scripts/in_container/install_airflow_and_providers.py
+++ b/scripts/in_container/install_airflow_and_providers.py
@@ -383,6 +383,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,
@@ -494,6 +496,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)
@@ -502,6 +505,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,