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 d4d68b5ceee Fix breeze ignoring --providers-constraints-mode (#73171)
d4d68b5ceee is described below

commit d4d68b5ceeeab28657e7dbdd430edd74ab7698f4
Author: PoAn Yang <[email protected]>
AuthorDate: Wed Sep 23 07:08:14 2026 +0800

    Fix breeze ignoring --providers-constraints-mode (#73171)
    
    Signed-off-by: PoAn Yang <[email protected]>
---
 .../in_container/install_airflow_and_providers.py  |  2 +-
 .../test_install_airflow_and_providers.py          | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/scripts/in_container/install_airflow_and_providers.py 
b/scripts/in_container/install_airflow_and_providers.py
index 4f203e8c6c3..4bcbbba6a11 100755
--- a/scripts/in_container/install_airflow_and_providers.py
+++ b/scripts/in_container/install_airflow_and_providers.py
@@ -905,7 +905,7 @@ FUTURE_CONTENT = "from __future__ import annotations"
     type=click.Choice(ALLOWED_CONSTRAINTS_MODE),
     default=ALLOWED_CONSTRAINTS_MODE[0],
     show_envvar=True,
-    envvar="AIRFLOW_CONSTRAINTS_MODE",
+    envvar="PROVIDERS_CONSTRAINTS_MODE",
     help="Providers constraints mode.",
 )
 @click.option(
diff --git a/scripts/tests/in_container/test_install_airflow_and_providers.py 
b/scripts/tests/in_container/test_install_airflow_and_providers.py
new file mode 100644
index 00000000000..47e4f169168
--- /dev/null
+++ b/scripts/tests/in_container/test_install_airflow_and_providers.py
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import install_airflow_and_providers as m
+
+
+def 
test_providers_constraints_mode_is_read_from_providers_env_var(monkeypatch):
+    monkeypatch.setenv("DEFAULT_CONSTRAINTS_BRANCH", "constraints-main")
+    monkeypatch.setenv("MOUNT_SOURCES", "selected")
+    monkeypatch.setenv("AIRFLOW_CONSTRAINTS_MODE", "constraints")
+    monkeypatch.setenv("PROVIDERS_CONSTRAINTS_MODE", 
"constraints-no-providers")
+
+    ctx = 
m.install_airflow_and_providers.make_context("install_airflow_and_providers", 
[])
+
+    assert ctx.params["airflow_constraints_mode"] == "constraints"
+    assert ctx.params["providers_constraints_mode"] == 
"constraints-no-providers"

Reply via email to