Skip to content

Commit 2f18558

Browse files
committed
Compare breeze verify with main on the apache/airflow remote by default
The default --base-ref was the local main branch. In a fork it is often behind the main the branch has merged (a GitHub "Update branch" or a conflict fix), and then every merged-in commit counted as a change: 3287 files instead of the 21 the PR changes. The default is now main on the remote whose URL points at apache/airflow, preferring upstream, which is the base GitHub compares the PR with. Without such a remote it falls back to the local main and says so. The local copy of that remote can be stale too, after "Update branch" without a fetch. breeze verify now warns when a merge on the branch brought in commits the base does not have. With --json the warnings go to stderr so stdout stays parseable.
1 parent 5f19f2e commit 2f18558

5 files changed

Lines changed: 222 additions & 23 deletions

File tree

‎dev/breeze/doc/03_developer_tasks.rst‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,19 @@ Finding out what CI will run for your change
324324
and lists the commands to run locally for the change. Nothing is executed. The only non-zero exit
325325
is a usage error such as a base ref git cannot resolve.
326326

327+
By default ``--base-ref`` is ``main`` on the git remote that points at apache/airflow (``upstream``
328+
if several do), the same base GitHub compares a PR with. A local ``main`` that is behind the
329+
``main`` your branch has merged would count every merged-in commit as your change. Without such a
330+
remote, ``breeze verify`` falls back to the local ``main`` branch and says so. It also warns when
331+
the branch has merged commits the base does not have, for example after GitHub's "Update branch"
332+
when the remote was not fetched since. With ``--json`` the warnings go to stderr.
333+
327334
.. code-block:: bash
328335
329336
breeze verify
330337
breeze verify --json
331338
breeze verify --full
332-
breeze verify --base-ref upstream/main
339+
breeze verify --base-ref main
333340
334341
Each row says what kind of check it is, whether it runs on the host or needs Docker and the
335342
CI image (``breeze``), and the exact command. Jobs CI runs on every PR regardless of the change

‎dev/breeze/doc/images/output_verify.svg‎

Lines changed: 16 additions & 12 deletions
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
643ed2129027a31d158a80470b531b79
1+
af28dee252e39588e825b2fef52146f0

0 commit comments

Comments
 (0)