You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Document branch protection and release recovery workflow
Accept ASF branch protection policy in full (restrict_force_push +
restrict_deletion). Document the toggle-and-restore procedure for
release recovery when git push --force is needed, with emphasis on
immediately restoring protection afterward.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/site/markdown/release-process.md
+59-1Lines changed: 59 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ If you have multiple keys, you can define a ~/.gnupg/gpg.conf file for a default
180
180
181
181
When asked for a tag name, accept the default value (in the following format: `vX.Y.Z`).
182
182
183
-
2. Perform the release using the following command - though be aware you cannot rollback as shown above after that. That may need to happen if there are site problems further below. To start over, use 'git reset --hard last-hash-before-release-started' , then 'git push --delete origin vX.Y.Z':
183
+
2. Perform the release using the following command - though be aware you cannot rollback as shown above after that. That may need to happen if there are site problems further below. To start over, see the "Recovering from a failed release" section below.
184
184
185
185
mvn release:perform
186
186
@@ -261,3 +261,61 @@ of Axis2, because not everybody subscribed to that list knows about the project.
261
261
3. Remove old (archived) releases from <https://dist.apache.org/repos/dist/release/axis/axis2/java/core/>.
262
262
263
263
4. Create an empty release note for the next release under `src/site/markdown/release-notes`.
264
+
265
+
### Branch protection (`.asf.yaml`)
266
+
267
+
The repository has ASF-mandated branch protection rules in `.asf.yaml` that prevent
268
+
force-push and branch deletion on `master` and `release/*` branches. This is a supply
269
+
chain security measure applied across all ASF repositories (see PR #1200).
270
+
271
+
Under normal development, these rules are transparent — regular `git push` works as
272
+
before. The protection only matters during release recovery (see below).
273
+
274
+
### Recovering from a failed release
275
+
276
+
If `mvn release:prepare` or `mvn release:perform` fails and you need to start over,
277
+
the recovery requires `git push --force` which is blocked by branch protection.
278
+
279
+
**Recovery procedure:**
280
+
281
+
1. Temporarily disable force-push protection by editing `.asf.yaml` — remove or
282
+
comment out `restrict_force_push: true`. Commit and push this change:
283
+
284
+
# Edit .asf.yaml to remove restrict_force_push: true
285
+
git add .asf.yaml
286
+
git commit -m "Temporarily disable force-push protection for release recovery"
0 commit comments