Skip to content

Commit 4e6ac50

Browse files
committed
chore: update release process documentation
Updates the documented process and the release tracking issue template with streamlined and up to date process. Signed-off-by: Shon Feder <shon.feder@gmail.com>
1 parent 251c36b commit 4e6ac50

2 files changed

Lines changed: 121 additions & 92 deletions

File tree

.github/ISSUE_TEMPLATE/release.md

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,39 +14,65 @@ assignees: ''
1414
- [ ] Create release candidate branch `X.Y.Z-rc` from last point tag `X.Y.Z-1`
1515
- [ ] Open release draft PR from branch `X.Y.Z-rc` into `main` [link to dune PR]
1616

17-
### Fixes
17+
## Fixes
1818

1919
Regressions requiring fixes in `main` and backports to `X.Y.Z-rc`:
2020

2121
- [ ] #...
2222
- [ ] backported via PR #...
2323
- [ ] #...
2424
- [ ] backported via PR #...
25+
26+
For each PR needing a backport
27+
28+
- Run `VERSION=X.Y.Z PR=<pr-number> ./doc/dev/releases/backport.sh`
29+
- Wait for the PR into the rc branch to pass CI.
30+
- Merge the PR, and record it above, completing the checklist item.
31+
32+
## Release
33+
34+
- [ ] Work thru the [point release process][point-release].
35+
- [ ] opam repo publication PR [link to opam PR]
36+
37+
[point-release]: https://github.com/ocaml/dune/blob/main/doc/dev/releases/process.md#point-releases--patch-releases-xyz-z--0
38+
2539
<!-- } else if MINOR OR MAJOR RELEASE { -->
2640

2741
## Known blockers
2842

29-
Regressions requiring fixes in `main` and backports to the latest version:
43+
Issues blocking the release
3044

3145
- [ ] issue #... blocking the release because of ...
32-
- [ ] backported via PR #...
33-
<!-- } -->
46+
- [ ] resolved by PR #...
47+
- [ ] issue #... blocking the release because of ...
48+
- [ ] resolved by PR #...
49+
50+
## Preparation
51+
52+
To begin once all initial blockers are resolved.
53+
54+
- [ ] Run pre-release CI jobs on `main` branch
55+
- [ ] [mirage](https://github.com/ocaml/dune/actions/workflows/mirage.yml)
56+
- [ ] [packaging](https://github.com/ocaml/dune/actions/workflows/isolated-package-build.yml)
57+
- [ ] Work thru the [pre-release phase](https://github.com/ocaml/dune/blob/main/doc/dev/releases/process.md#pre-release-phase).
58+
Alpha release PRs into opam repo:
59+
- [link to OPAM PR 1]
60+
- [link to OPAM PR 2]
61+
- [ ] Draft PR from the release branch `X.Y.Z-rc` into `main`: [link to dune PR]
3462

3563
## Release
3664

37-
- [ ] Update changelog
38-
<!-- If MINOR OR MAJOR RELEASE: uncomment -->
39-
<!-- - [ ] Create release candidate branch `X.Y.Z-rc` from main -->
40-
<!-- - [ ] Open release draft PR from branch `X.Y.Z-rc` into `main` [link to dune PR] -->
41-
<!-- - [ ] Alpha release PRs into opam repo for triage: -->
42-
<!-- - [link to OPAM PR] -->
43-
<!-- - [ ] Review revdeps diff, and diagnose any new failures -->
65+
- [ ] Work thru the [release phase](https://github.com/ocaml/dune/blob/main/doc/dev/releases/process.md#release-phase).
4466
- [ ] opam repo publication PR [link to opam PR]
67+
<!-- } -->
4568

4669
## Post-release
4770

4871
- [ ] Merge release branch into `main` [link to dune PR]
4972
- [ ] Write a post about the release on Discuss [link to post]
5073
- [ ] Store the revdeps error file in the [logs](https://github.com/ocaml/dune/wiki/Reverse-dependencies-CI-logs) as HTML
5174
<!-- If MINOR OR MAJOR RELEASE: uncomment -->
52-
<!-- - [ ] Increase `lang dune` number -->
75+
<!-- - [ ] Increase the version of Dune to the new latest minor version -->
76+
<!-- - [ ] in the [CI workflow](https://github.com/ocaml/dune/tree/main/ci/workflow.yml.in) -->
77+
<!-- - [ ] in [dune-project](https://github.com/ocaml/dune/blob/main/dune-project#L1) -->
78+
<!-- - [ ] in the [dune-rpc](https://github.com/ocaml/dune/blob/main/otherlibs/dune-rpc/types.ml#L30). -->

doc/dev/releases/process.md

Lines changed: 83 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ aspects to this:
1111
- a softer "decision" section that explains what should inform the decisions to
1212
take when there is a manual call to make.
1313

14+
## Prerequisites
15+
16+
- The latest [dune-release](https://github.com/tarides/dune-release) installed in your dev switch
17+
- A recent version of [github-cli](https://github.com/cli/cli) installed on your system
18+
19+
## Prepare
20+
21+
Open a [release tracking issue][release-issue] and work thru its checklist,
22+
including listing and updating known blockers that are preventing release
23+
24+
[release-issue]: https://github.com/ocaml/dune/issues/new?template=release.md
25+
1426
## Major / Minor Releases (`x.y.0`)
1527

1628
```mermaid
@@ -39,56 +51,62 @@ stateDiagram-v2
3951
PostRelease --> [*]
4052
```
4153

42-
- Prepare:
43-
- Open tracking issue with expected branching date
44-
- List (and update) known blockers. These prevent releasing `x.y.0`
45-
- Add "All x.y.z changelogs merged" as blocker
46-
- Add "Mirage test" as blocker (manual workflow should be triggered on a
47-
alpha release)
48-
49-
- Alpha time:
50-
- Branch setup:
51-
- (for N=0) create `x.y` branch
52-
- Prepare alpha release:
53-
- cherry-pick extra commits from `main` (if any)
54-
- prepare changelog (ensure version is `x.y.0~alphaN`)
55-
- `make opam-release`
56-
- mark opam-repo PR as draft
57-
- Wait for `opam-repo-ci`
58-
- Triage phase:
59-
- consider new failures comparing from latest "known good" release
60-
- ignore transient errors (disk full, switch disconnected, cancelled, etc)
61-
- file issues about regressions, add them to known blockers
62-
- compare the new CI revdeps errors with the errors from [previous releases](https://github.com/ocaml/dune/wiki/Reverse-dependencies-CI-logs).
63-
- Release Go/No Go (go to Release, or need another alpha)
64-
- Mark opam alpha PR as closed
65-
66-
- Release time:
67-
- check versioned behaviors are relative to x.y
68-
- On release branch, prepare changelog (merge alpha entries, set header with version)
69-
- Open a PR `prepare-x.y.0`
70-
- Self-merge
71-
- `make opam-release` from updated main
72-
- Triage
73-
- In case of regression:
74-
- mitigate (for example if this happens on a single OS, set `available`
75-
appropriately)
76-
- prepare point release
77-
- in the worst case, the release can be cancelled completely and only come
78-
in a point release.
79-
80-
- Post-release:
81-
- Categorize changelog entries into Added / Fixed / Changed / Removed / Deprecated
82-
- Open PR on `ocaml/ocaml.org` to add a file in under `data/changelog/dune`
83-
- Post to discuss
84-
- Merge changelog
85-
- Increase the version of Dune to the new latest in the [GitHub CI](https://github.com/ocaml/dune/blob/9a274be98cb9c2786dd76184c19c44b89e061ea8/.github/workflows/workflow.yml#L350), [dune-project](https://github.com/ocaml/dune/blob/main/dune-project#L1) and in the [dune-rpc](https://github.com/ocaml/dune/blob/main/otherlibs/dune-rpc/private/types.ml#L30). E.g, if you released `X.Y.Z`, the new version become `X.(Y+1).Z`.
86-
- Update the Dune target in the [nix-ocaml/nix-overlays](https://github.com/nix-ocaml/nix-overlays) (the hash is computed using `nix-prefetch-url --type sha256 <URL>`)
87-
- Close release milestone
88-
- Add the copy of the revdeps file to the [previous releases](https://github.com/ocaml/dune/wiki/Reverse-dependencies-CI-logs) page
89-
- Close tracking issue
90-
91-
## Point Releases / Patch Releases (`x.y.z`, `z >= 0`)
54+
### Pre-release phase
55+
56+
During the pre-release phase, we produce alpha releases, which we use to run the
57+
opam-ci to check for integration with the wider ocaml ecosystem.
58+
59+
1. Create and checkout the release candidate branch `X.Y.Z-rc` from the head of
60+
`main`
61+
2. Let `N=0`
62+
3. Prepare alpha release
63+
- If `N>0`
64+
- Get all regressions fixed in `main`
65+
- Either cherry-pick the fixes from `main` into the rc branch, or create a
66+
new branch off `main`. (This is a judgment call, based on weighing risk of
67+
picking up new regressions vs. the benefits of simpler process and picking
68+
up additional improvements from main.)
69+
- Run pre-release CI jobs on `X.Y.Z-rc` branch
70+
- [mirage](https://github.com/ocaml/dune/actions/workflows/mirage.yml)
71+
- [packaging](https://github.com/ocaml/dune/actions/workflows/isolated-package-build.yml)
72+
- If the pre-release CI detects regreessions, goto (3).
73+
- Build the changelog via `doc/changes/scripts/build_changelog.sh x.y.0~alphaN`
74+
- Review the resulting changelog for intelligibility.
75+
- Commit the changelog update to the release branch with the commit message `[X.Y.Z] prepare alphaN release`
76+
- Run `make opam-release`
77+
- [edit the release][edit-release] to mark it with `Set as a pre-release`
78+
- mark resulting opam-repo PR as a draft
79+
- Wait for the `opam-ci` results
80+
- Review the results:
81+
- Any build or test failures in dune's own packages require fixes
82+
- compare the new CI revdeps errors with the [errors from previous
83+
releases][prev-releases].
84+
- ignore transient errors (disk full, switch disconnected, cancelled, etc)
85+
- If defects are discovered:
86+
- File issues about all regressions, add them to known blockers
87+
- Mark opam alpha PR as closed
88+
- Let `N=N+1` and goto (3)
89+
90+
[edit-release]: https://docs.github.com/en/rest/releases/releases?apiVersion=2026-03-10#update-a-release
91+
[prev-releases]: https://github.com/ocaml/dune/wiki/Reverse-dependencies-CI-logs
92+
93+
### Release phase
94+
95+
- On release branch, prepare changelog
96+
- combine all entries from different alpha release
97+
- set the version header to `X.Y.Z (<date>)`
98+
- commit onto `X.Y.Z-rc` branch with message `[X.Y.Z] release` and push to remote
99+
- Push release branch to remote
100+
- Run `make opam-release` from updated `X.Y.Z-rc` branch
101+
- Add a comment on the opam repo PR linking back to the release tracker issues
102+
and explaining that all triage is completed, and ask the opam repo maintainers
103+
to bypass the opam-ci.
104+
- In case of regression:
105+
- Cancel the minor release publication by closing the opam repo PR
106+
- Mark the GitHub release as a pre-release
107+
- Proceed to a patch release
108+
109+
## Point Releases / Patch Releases (`X.Y.Z`, `Z >= 0`)
92110

93111
```mermaid
94112
gitGraph
@@ -120,35 +138,21 @@ stateDiagram-v2
120138
PostRelease --> [*]
121139
```
122140

123-
- Prepare:
124-
- Create release tracking issue
125-
- List fixes present in main to backport
126-
- Blockers for this release include:
127-
- all backports of listed fixes
128-
- changelogs of previous point releases are merged
129-
130-
- Backport:
131-
- Branch setup
132-
- (z>0) Position on branch `x.y`
133-
- `git cherry-pick` commits as merged in `main`
134-
- Open PR
135-
- Set `x.y` as target branch, e.g. `gh pr create -B x.y`
136-
- Title must be `[x.y] backport #<PR id>`
137-
- List PR in blockers
138-
139-
- Release:
140-
- Position on `x.y`
141-
- Prepare changelog
142-
- Open a PR `prepare-x.y.z`
143-
- `make opam-release`
144-
- Triage
145-
146-
- Post-release:
147-
- Open PR on `ocaml/ocaml.org` to add a file in under `data/changelog/dune`
148-
- Post changelog on Discuss in the same thread as `x.y.0`
149-
- Merge changelog
150-
- Update the Dune target in the [nix-ocaml/nix-overlays](https://github.com/nix-ocaml/nix-overlays) (the hash is computed using `nix-prefetch-url --type sha256 <URL>`)
151-
- Close release tracking issue
141+
- Build the changelog via `doc/changes/scripts/build_changelog.sh X.Y.Z`
142+
- Review the resulting changelog for intelligibility.
143+
- Commit the changelog update to the release branch with the commit message `[X.Y.Z] release`
144+
- Push release branch to remote
145+
- Run `make opam-release`.
146+
- Wait for the `opam-ci` results
147+
- Review the results:
148+
- Any build or test failures in dune's own packages require fixes
149+
- compare the new CI revdeps errors with the [errors from previous releases][prev-releases].
150+
- ignore transient errors (disk full, switch disconnected, cancelled, etc)
151+
- If defects are discovered:
152+
- Close the opam repo PR.
153+
- File issues about all regressions.
154+
- Mark GitHub release as a pre-release.
155+
- Cut a new patch release.
152156

153157
## Decisions
154158

@@ -180,4 +184,3 @@ stateDiagram-v2
180184
`opam-repo-ci` but there is no good way to skip them.
181185
- Sending metadata fixes in `opam-repository` (e.g. OCaml 5 failures) is nice
182186
to do but not required.
183-

0 commit comments

Comments
 (0)