From baa8bd0b3115b3e545fea4220123f07d37b2a7dc Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Tue, 7 Apr 2026 19:40:59 +0200 Subject: [PATCH 1/4] Skip pre-commit checks on automated CI tool upgrades --- dev/breeze/src/airflow_breeze/commands/ci_commands.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dev/breeze/src/airflow_breeze/commands/ci_commands.py b/dev/breeze/src/airflow_breeze/commands/ci_commands.py index a011f7ba6d3de..ce367d5824f61 100644 --- a/dev/breeze/src/airflow_breeze/commands/ci_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/ci_commands.py @@ -849,7 +849,15 @@ def upgrade( run_command(["git", "checkout", "-b", branch_name]) run_command(["git", "add", "."]) - run_command(["git", "commit", "-m", f"[{target_branch}] CI: Upgrade important CI environment"]) + run_command( + [ + "git", + "commit", + "--no-verify", + "--message", + f"[{target_branch}] CI: Upgrade important CI environment", + ] + ) # Push the branch to origin (use detected origin or fallback to 'origin') push_remote = origin_remote_name if origin_remote_name else "origin" From 9638de002b5a50477ac797b4228f3abbf036dbfe Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Tue, 7 Apr 2026 19:41:55 +0200 Subject: [PATCH 2/4] Skip pre-commit checks on automated CI tool upgrades --- dev/breeze/src/airflow_breeze/commands/ci_commands.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dev/breeze/src/airflow_breeze/commands/ci_commands.py b/dev/breeze/src/airflow_breeze/commands/ci_commands.py index ce367d5824f61..7ee9ed802ce2a 100644 --- a/dev/breeze/src/airflow_breeze/commands/ci_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/ci_commands.py @@ -853,6 +853,7 @@ def upgrade( [ "git", "commit", + # postpone pre-commit checks to CI, not to fail in automation if e.g. mypy changes force code checks "--no-verify", "--message", f"[{target_branch}] CI: Upgrade important CI environment", From 1cea06a897816ec26b74de8f636fce7f42cbf82b Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Tue, 7 Apr 2026 22:21:08 +0200 Subject: [PATCH 3/4] Review feedback, attempt with checks once, collect auto-fixes and commit again --- .../airflow_breeze/commands/ci_commands.py | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/commands/ci_commands.py b/dev/breeze/src/airflow_breeze/commands/ci_commands.py index 7ee9ed802ce2a..cb494217d384f 100644 --- a/dev/breeze/src/airflow_breeze/commands/ci_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/ci_commands.py @@ -849,16 +849,28 @@ def upgrade( run_command(["git", "checkout", "-b", branch_name]) run_command(["git", "add", "."]) - run_command( - [ - "git", - "commit", - # postpone pre-commit checks to CI, not to fail in automation if e.g. mypy changes force code checks - "--no-verify", - "--message", - f"[{target_branch}] CI: Upgrade important CI environment", - ] - ) + try: + run_command( + [ + "git", + "commit", + "--message", + f"[{target_branch}] CI: Upgrade important CI environment", + ] + ) + except subprocess.CalledProcessError: + console_print("[info]Commit failed, assume some auto-fixes might have been made...[/]") + run_command(["git", "add", "."]) + run_command( + [ + "git", + "commit", + # postpone pre-commit checks to CI, not to fail in automation if e.g. mypy changes force code checks + "--no-verify", + "--message", + f"[{target_branch}] CI: Upgrade important CI environment", + ] + ) # Push the branch to origin (use detected origin or fallback to 'origin') push_remote = origin_remote_name if origin_remote_name else "origin" From b5fb81ead0a4668bc9914c7ed935c2ab5795ae81 Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Tue, 7 Apr 2026 22:24:17 +0200 Subject: [PATCH 4/4] Shorten code --- dev/breeze/src/airflow_breeze/commands/ci_commands.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dev/breeze/src/airflow_breeze/commands/ci_commands.py b/dev/breeze/src/airflow_breeze/commands/ci_commands.py index cb494217d384f..b8d4138371345 100644 --- a/dev/breeze/src/airflow_breeze/commands/ci_commands.py +++ b/dev/breeze/src/airflow_breeze/commands/ci_commands.py @@ -851,12 +851,7 @@ def upgrade( run_command(["git", "add", "."]) try: run_command( - [ - "git", - "commit", - "--message", - f"[{target_branch}] CI: Upgrade important CI environment", - ] + ["git", "commit", "--message", f"[{target_branch}] CI: Upgrade important CI environment"] ) except subprocess.CalledProcessError: console_print("[info]Commit failed, assume some auto-fixes might have been made...[/]")