This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-4-test by this push:
new 53fbcb974a1 [v3-4-test] Replace the empty breeze verify table with a
one-line hint (#74778) (#75018)
53fbcb974a1 is described below
commit 53fbcb974a1714bedb783c0c77a3ccbf784fd183
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Oct 18 22:37:28 2026 +0200
[v3-4-test] Replace the empty breeze verify table with a one-line hint
(#74778) (#75018)
When the changed files match no command that can run locally, for
example a README change or a change to e2e tests that only run in CI,
breeze verify printed a table with headers and no rows. That reads
like something failed to render rather than "nothing to run here".
(cherry picked from commit ee47d191279bcbfa2cce39ac6df06b5eb07f556a)
Co-authored-by: Andrew Chang <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>
---
dev/breeze/doc/03_developer_tasks.rst | 3 ++-
.../src/airflow_breeze/commands/verify_commands.py | 17 ++++++++++-------
dev/breeze/tests/test_verify_commands.py | 18 ++++++++++++++++++
3 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/dev/breeze/doc/03_developer_tasks.rst
b/dev/breeze/doc/03_developer_tasks.rst
index 02a72f69f3e..cab4539a317 100644
--- a/dev/breeze/doc/03_developer_tasks.rst
+++ b/dev/breeze/doc/03_developer_tasks.rst
@@ -329,7 +329,8 @@ when the remote was not fetched since. With ``--json`` the
warnings go to stderr
breeze verify --base-ref main
Each row says what kind of check it is, whether it runs on the host or needs
Docker and the
-CI image (``breeze``), and the exact command. Jobs CI runs on every PR
regardless of the change
+CI image (``breeze``), and the exact command. When there is no command to
list, a single line
+says so instead of an empty table. Jobs CI runs on every PR regardless of the
change
(breeze's own unit tests, the shared distributions) only show up with
``--full``. The translation
check is never listed: CI runs it with ``|| true``, so it cannot fail a PR.
Static checks are not listed either: ``prek`` already picks the hooks to run
for the changed files,
diff --git a/dev/breeze/src/airflow_breeze/commands/verify_commands.py
b/dev/breeze/src/airflow_breeze/commands/verify_commands.py
index 0392a600c6a..0dc8555a8cc 100644
--- a/dev/breeze/src/airflow_breeze/commands/verify_commands.py
+++ b/dev/breeze/src/airflow_breeze/commands/verify_commands.py
@@ -153,13 +153,16 @@ def verify(ctx: click.Context, base_ref: str | None,
full: bool, as_json: bool):
f"[info]{len(changed_files)} changed file(s) against {base_ref}, "
f"CI default Python {result['default_python_version']}[/]\n"
)
- table = Table(title="What CI runs for this change" if full else "What to
run for this change")
- table.add_column("kind")
- table.add_column("runs_in")
- table.add_column("command", overflow="fold")
- for item in result["items"]:
- table.add_row(item["kind"], item["runs_in"], escape(item["command"]))
- console.print(table)
+ if result["items"]:
+ table = Table(title="What CI runs for this change" if full else "What
to run for this change")
+ table.add_column("kind")
+ table.add_column("runs_in")
+ table.add_column("command", overflow="fold")
+ for item in result["items"]:
+ table.add_row(item["kind"], item["runs_in"],
escape(item["command"]))
+ console.print(table)
+ else:
+ console.print("[info]No tests or docs builds to run locally for the
changed files.[/]")
console.print(
"\n[info]Static checks are not listed. Run prek as usual. It picks the
hooks for the changed files.[/]"
)
diff --git a/dev/breeze/tests/test_verify_commands.py
b/dev/breeze/tests/test_verify_commands.py
index a77ce3924ff..0aebf5f219b 100644
--- a/dev/breeze/tests/test_verify_commands.py
+++ b/dev/breeze/tests/test_verify_commands.py
@@ -174,6 +174,24 @@ def test_full_suite_expansion_is_explained(files:
tuple[str, ...], expanded: boo
assert "breeze testing core-tests" not in " ".join(result.output.split())
[email protected](
+ ("files", "has_commands"),
+ [
+ (("README.md",), False),
+ (("airflow-core/docs/index.rst",), True),
+ ],
+)
+def test_table_is_shown_only_when_there_are_commands(files: tuple[str, ...],
has_commands: bool):
+ with patch(
+ "airflow_breeze.commands.verify_commands.get_changed_files_against",
autospec=True, return_value=files
+ ):
+ result = CliRunner().invoke(verify, [], catch_exceptions=False)
+ assert result.exit_code == 0
+ output = " ".join(result.output.split())
+ assert ("What to run for this change" in output) is has_commands
+ assert ("No tests or docs builds to run locally for the changed files." in
output) is not has_commands
+
+
@patch("airflow_breeze.commands.verify_commands.run_command", autospec=True)
def test_changed_files_list_renames_like_ci_diff_tree(mock_run):
mock_run.side_effect = [