Skip to content

Commit 584c4fe

Browse files
potiukEmmanuela Opurum
authored andcommitted
Use fast-forward for airflow-ctl -test to -stable sync, not squash (apache#65637)
Squash- and rebase-merges both rewrite the commit SHAs from -test onto -stable, which means the subsequent rc tag points at a different commit than the release-prep PR that was reviewed and merged into -test. Fast-forward preserves the original SHAs so the tag, the testing-status issue, and the SVN source tarball all reference the same commit the contributors reviewed. Caught during 0.1.4rc3 prep — the initial sync PR was squash-merged and had to be redone as a fast-forward before tagging.
1 parent db2e863 commit 584c4fe

1 file changed

Lines changed: 35 additions & 4 deletions

File tree

dev/README_RELEASE_AIRFLOWCTL.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,41 @@ gh pr create \
274274
--body "Sync airflow-ctl/v${CTL_VERSION_BRANCH}-test into airflow-ctl/v${CTL_VERSION_BRANCH}-stable for airflow-ctl ${VERSION} release."
275275
```
276276

277-
Wait for CI to pass and for the PR to be merged. After merge, pull
278-
`airflow-ctl/vX-Y-stable` locally before continuing to the
279-
"Commit the version bump and release notes via a merged PR" step — the
280-
release-prep PR also targets `airflow-ctl/vX-Y-stable`.
277+
Wait for CI to pass and for the PR to be approved.
278+
279+
> [!IMPORTANT]
280+
> **Merge the sync PR as a fast-forward, not as a squash or rebase.**
281+
> `airflow-ctl/vX-Y-stable` enforces `required_linear_history: true`,
282+
> which permits squash, rebase, *and* fast-forward merges. Squash and
283+
> rebase both **rewrite the commit SHAs** from `-test`, so the rc tag
284+
> you cut afterwards points at a different commit than the release-prep
285+
> PR that was reviewed and merged into `-test`. Fast-forward preserves
286+
> the original SHAs and makes the `-stable` history a clean extension
287+
> of `-test` — which is what the rc tag, the testing-status issue, and
288+
> the SVN source tarball all need to agree on.
289+
>
290+
> The GitHub web UI does not offer "fast-forward" for protected
291+
> branches; use the CLI against the unprotected remote ref, then close
292+
> the PR as merged (GitHub auto-closes the PR once its head commit
293+
> appears on the target branch):
294+
>
295+
> ```shell script
296+
> git fetch apache
297+
> git push apache \
298+
> "apache/airflow-ctl/v${CTL_VERSION_BRANCH}-test:refs/heads/airflow-ctl/v${CTL_VERSION_BRANCH}-stable"
299+
> ```
300+
>
301+
> The `:refs/heads/…` form pushes the remote-tracking ref of
302+
> `-test` directly onto `-stable`. Apache INFRA's branch protection
303+
> allows the release manager this fast-forward push because
304+
> `required_linear_history: true` is satisfied (no merge commit is
305+
> introduced) and `required_pull_request_reviews` is satisfied by the
306+
> PR you opened above.
307+
308+
After the sync lands, pull `airflow-ctl/vX-Y-stable` locally before
309+
continuing to the "Commit the version bump and release notes via a
310+
merged PR" step — the release-prep PR also targets
311+
`airflow-ctl/vX-Y-stable`.
281312

282313
```shell script
283314
git fetch apache

0 commit comments

Comments
 (0)