This is an automated email from the ASF dual-hosted git repository.

vatsrahul1001 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 03f33a2da22 Make breeze verify tests pass on release branches (#74624)
03f33a2da22 is described below

commit 03f33a2da22fd43635f92951f19a57f3a9c9c855
Author: Rahul Vats <[email protected]>
AuthorDate: Tue Oct 13 12:55:55 2026 +0530

    Make breeze verify tests pass on release branches (#74624)
    
    The breeze verify command (#73241) derives the base ref and the
    selective-checks default_branch from branch_defaults.AIRFLOW_BRANCH, but
    its tests hardcode "main". On a vX-Y-test release branch - where
    AIRFLOW_BRANCH is e.g. "v3-4-test" - the base-ref lookup, the 
no-apache-remote
    fallback, and the docs list all differ, so eight tests fail. v3-4-test is
    the first release branch to include the command and surface this.
    
    Pin AIRFLOW_BRANCH / DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH to main /
    constraints-main in an autouse fixture so the suite asserts the main
    behaviour it was written for, on any branch.
---
 dev/breeze/tests/test_verify_commands.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/dev/breeze/tests/test_verify_commands.py 
b/dev/breeze/tests/test_verify_commands.py
index 58b9a163631..a77ce3924ff 100644
--- a/dev/breeze/tests/test_verify_commands.py
+++ b/dev/breeze/tests/test_verify_commands.py
@@ -58,6 +58,23 @@ def _no_git_lookups_against_the_checkout():
         yield
 
 
[email protected](autouse=True)
+def _pin_branch_to_main():
+    """Assert ``main`` behaviour regardless of the checked-out branch.
+
+    These tests hardcode ``main`` expectations, but 
``branch_defaults.AIRFLOW_BRANCH`` is different on a
+    release branch (``vX-Y-test``), which flows into the base ref and the 
``default_branch`` passed to
+    selective checks. Pin the constants so the suite passes on any branch.
+    """
+    with (
+        patch("airflow_breeze.commands.verify_commands.AIRFLOW_BRANCH", 
"main"),
+        patch(
+            
"airflow_breeze.commands.verify_commands.DEFAULT_AIRFLOW_CONSTRAINTS_BRANCH", 
"constraints-main"
+        ),
+    ):
+        yield
+
+
 @patch(
     "airflow_breeze.commands.verify_commands.get_changed_files_against",
     autospec=True,

Reply via email to