Skip to content

Commit dd3a2da

Browse files
authored
chore: add branch protection to release branches, update release_process.md (apache#4665)
1 parent e211ef0 commit dd3a2da

2 files changed

Lines changed: 79 additions & 5 deletions

File tree

.asf.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,57 @@ github:
4646
main:
4747
required_pull_request_reviews:
4848
required_approving_review_count: 1
49+
branch-0.1:
50+
required_pull_request_reviews:
51+
required_approving_review_count: 1
52+
branch-0.2:
53+
required_pull_request_reviews:
54+
required_approving_review_count: 1
55+
branch-0.3:
56+
required_pull_request_reviews:
57+
required_approving_review_count: 1
58+
branch-0.4:
59+
required_pull_request_reviews:
60+
required_approving_review_count: 1
61+
branch-0.5:
62+
required_pull_request_reviews:
63+
required_approving_review_count: 1
64+
branch-0.6:
65+
required_pull_request_reviews:
66+
required_approving_review_count: 1
67+
branch-0.7:
68+
required_pull_request_reviews:
69+
required_approving_review_count: 1
70+
branch-0.8:
71+
required_pull_request_reviews:
72+
required_approving_review_count: 1
73+
branch-0.9:
74+
required_pull_request_reviews:
75+
required_approving_review_count: 1
76+
branch-0.10:
77+
required_pull_request_reviews:
78+
required_approving_review_count: 1
79+
branch-0.11:
80+
required_pull_request_reviews:
81+
required_approving_review_count: 1
82+
branch-0.12:
83+
required_pull_request_reviews:
84+
required_approving_review_count: 1
85+
branch-0.13:
86+
required_pull_request_reviews:
87+
required_approving_review_count: 1
88+
branch-0.14:
89+
required_pull_request_reviews:
90+
required_approving_review_count: 1
91+
branch-0.15:
92+
required_pull_request_reviews:
93+
required_approving_review_count: 1
94+
branch-0.16:
95+
required_pull_request_reviews:
96+
required_approving_review_count: 1
97+
branch-0.17:
98+
required_pull_request_reviews:
99+
required_approving_review_count: 1
49100
pull_requests:
50101
allow_update_branch: true
51102
# publishes the content of the `asf-site` branch to

docs/source/contributor-guide/release_process.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ instructions on each step.
3030

3131
- [ ] Release preparation: review expression support status and user guide
3232
- [ ] Create release branch
33+
- [ ] Protect the release branch in `.asf.yaml`
3334
- [ ] Generate release documentation
3435
- [ ] Update Maven version in release branch
3536
- [ ] Update version in main for next development cycle
@@ -103,23 +104,45 @@ git checkout -b branch-0.13
103104
git push apache branch-0.13
104105
```
105106

107+
Creating the branch is the only direct push to it. After protecting the branch (next step), all later changes
108+
to the release branch (documentation, version bump, changelog) go through pull requests targeting it.
109+
110+
### Protect the Release Branch
111+
112+
Add the new branch to `protected_branches` in `.asf.yaml` so it requires a pull request and review, the same as
113+
`main`. ASF applies `.asf.yaml` from the default branch, so this is a PR against `main`:
114+
115+
```yaml
116+
protected_branches:
117+
main:
118+
required_pull_request_reviews:
119+
required_approving_review_count: 1
120+
branch-0.13:
121+
required_pull_request_reviews:
122+
required_approving_review_count: 1
123+
```
124+
125+
All release branches stay protected, including older ones, so released code cannot be pushed to directly.
126+
106127
### Generate Release Documentation
107128
108-
Generate the documentation content for this release. The docs on `main` contain only template markers,
109-
so we need to generate the actual content (config tables, compatibility matrices) for the release branch:
129+
The docs on `main` contain only template markers; CI fills them at publish time. A release branch instead
130+
commits the generated content so the archived docs for the release render real tables. Run the script to
131+
generate the config reference and the per-Spark-version compatibility pages and freeze them onto the branch:
110132

111133
```shell
112134
./dev/generate-release-docs.sh
113135
git add docs/source/user-guide/latest/
114136
git commit -m "Generate docs for 0.13.0 release"
115-
git push apache branch-0.13
116137
```
117138

118-
This freezes the documentation to reflect the configs and expressions available in this release.
139+
The script runs one Maven build per supported Spark version, so it takes a while. Open a PR with this commit
140+
targeting the release branch.
119141

120142
### Update Maven Version
121143

122-
Update the `pom.xml` files in the release branch to update the Maven version from `0.13.0-SNAPSHOT` to `0.13.0`.
144+
Open a PR targeting the release branch that changes the Maven version from `0.13.0-SNAPSHOT` to `0.13.0` in
145+
the `pom.xml` files and in the diff files under `dev/diffs`.
123146

124147
There is no need to update the Rust crate versions because they will already be `0.13.0`.
125148

0 commit comments

Comments
 (0)