From 8418f35f01c6321dd2acb8037b39ea4bfcb7c6b5 Mon Sep 17 00:00:00 2001 From: comphead Date: Mon, 11 Aug 2025 13:14:58 -0700 Subject: [PATCH 1/4] chore: Enforce checks for RC branches --- .asf.yaml | 4 ++++ .github/workflows/extended.yml | 2 ++ dev/release/README.md | 13 +++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index aab8c1e6df2df..a4441295f3df9 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -50,6 +50,10 @@ github: main: required_pull_request_reviews: required_approving_review_count: 1 + # needs to be updated as part of the release process + branch-50: + required_pull_request_reviews: + required_approving_review_count: 1 pull_requests: # enable updating head branches of pull requests allow_update_branch: true diff --git a/.github/workflows/extended.yml b/.github/workflows/extended.yml index 805856339be51..17738490adb59 100644 --- a/.github/workflows/extended.yml +++ b/.github/workflows/extended.yml @@ -32,6 +32,8 @@ on: push: branches: - main + # release candidate branches + - 'branch-*' workflow_dispatch: inputs: pr_number: diff --git a/dev/release/README.md b/dev/release/README.md index e5444ba4c6912..02c2f663c69b5 100644 --- a/dev/release/README.md +++ b/dev/release/README.md @@ -36,8 +36,8 @@ If you would like to propose your change for inclusion in a release branch for a patch release: 1. Find (or create) the issue for the incremental release ([example release issue]) and discuss the proposed change there with the maintainers. -1. Follow normal workflow to create PR to `main` branch and wait for its approval and merge. -1. After PR is squash merged to `main`, branch from most recent release branch (e.g. `branch-37`), cherry-pick the commit and create a PR targeting the release branch [example backport PR]. +2. Follow normal workflow to create PR to `main` branch and wait for its approval and merge. +3. After PR is squash merged to `main`, branch from most recent release branch (e.g. `branch-37`), cherry-pick the commit and create a PR targeting the release branch [example backport PR]. For example, to backport commit `12345` from `main` to `branch-43`: @@ -128,6 +128,15 @@ release. See [#9697](https://github.com/apache/datafusion/pull/9697) for an example. +Modify `asf.yaml` to protect future release candidate branch to prevent accidental merges: + +```yaml +# needs to be updated as part of the release process +branch-50: + required_pull_request_reviews: + required_approving_review_count: 1 +``` + Here are the commands that could be used to prepare the `38.0.0` release: ### Update Version From 18424d85a4d2a5359b782645acdc81b8d4e3d9d9 Mon Sep 17 00:00:00 2001 From: comphead Date: Mon, 11 Aug 2025 13:17:59 -0700 Subject: [PATCH 2/4] chore: Enforce checks for RC branches --- .asf.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.asf.yaml b/.asf.yaml index a4441295f3df9..1b5ebfe3f21fa 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -51,6 +51,7 @@ github: required_pull_request_reviews: required_approving_review_count: 1 # needs to be updated as part of the release process + # Github doesn't support wildcard branch protection rules, only exact branch names branch-50: required_pull_request_reviews: required_approving_review_count: 1 From 90e1000baa31a87df539bd1b6d350621c925be42 Mon Sep 17 00:00:00 2001 From: comphead Date: Mon, 11 Aug 2025 16:33:35 -0700 Subject: [PATCH 3/4] chore: Enforce checks for RC branches --- .asf.yaml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/.asf.yaml b/.asf.yaml index 1b5ebfe3f21fa..db6d3153d2920 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -52,9 +52,72 @@ github: required_approving_review_count: 1 # needs to be updated as part of the release process # Github doesn't support wildcard branch protection rules, only exact branch names + # Keeping set of protected branches for future releases + # Meanwhile creating a prerelease script that will update the branch protection names + # automatically. Keep track on it https://github.com/apache/datafusion/issues/17134 branch-50: required_pull_request_reviews: required_approving_review_count: 1 + branch-51: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-52: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-53: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-54: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-55: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-56: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-57: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-58: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-59: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-60: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-61: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-62: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-63: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-64: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-65: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-66: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-67: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-68: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-69: + required_pull_request_reviews: + required_approving_review_count: 1 + branch-70: + required_pull_request_reviews: + required_approving_review_count: 1 pull_requests: # enable updating head branches of pull requests allow_update_branch: true From 987c346638781986b1232368b5113f3de9175f5f Mon Sep 17 00:00:00 2001 From: comphead Date: Tue, 12 Aug 2025 08:35:43 -0700 Subject: [PATCH 4/4] chore: Enforce checks for RC branches --- .asf.yaml | 1 + .github/workflows/extended.yml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.asf.yaml b/.asf.yaml index db6d3153d2920..7f597369664a1 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -52,6 +52,7 @@ github: required_approving_review_count: 1 # needs to be updated as part of the release process # Github doesn't support wildcard branch protection rules, only exact branch names + # https://github.com/apache/infrastructure-asfyaml?tab=readme-ov-file#branch-protection # Keeping set of protected branches for future releases # Meanwhile creating a prerelease script that will update the branch protection names # automatically. Keep track on it https://github.com/apache/datafusion/issues/17134 diff --git a/.github/workflows/extended.yml b/.github/workflows/extended.yml index 17738490adb59..ad63ea49d3514 100644 --- a/.github/workflows/extended.yml +++ b/.github/workflows/extended.yml @@ -32,7 +32,9 @@ on: push: branches: - main - # release candidate branches + # support extended test suite for release candidate branches, + # it is not expected to have many changes in these branches, + # so running extended tests is not a burden - 'branch-*' workflow_dispatch: inputs: