Skip to content

Commit 1254d94

Browse files
qinsoonwks
andauthored
Add document for release (#1007)
Co-authored-by: Kunshan Wang <wks1986@gmail.com>
1 parent 91191be commit 1254d94

File tree

2 files changed

+97
-9
lines changed

2 files changed

+97
-9
lines changed

docs/team/pull_request.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,27 @@ This process should be done automatically by [`auto-merge.yml`](https://github.c
4242
when an mmtk-core PR is merged and the `binding-refs` comment is present.
4343

4444
1. Make sure there is no other PR in this merging process. If so, resolve those first.
45-
1. Make sure all the PRs (the mmtk-core PR, the binding PRs, and the associated PRs in the VM repo if any) are ready to merge.
46-
1. For each binding PR that we need to merge:
45+
2. Make sure all the PRs (the mmtk-core PR, the binding PRs, and the associated PRs in the VM repo if any) are ready to merge.
46+
3. Make sure there is a comment that provides `binding-refs` for all the binding PRs.
47+
4. For each binding PR that we need to merge:
4748
1. If the binding PR has an assocate PR in the VM repo, merge the VM PR first. Once it is merged, we will have a commit hash (we refer to it as `{vm_commit}`).
48-
1. Update `mmtk/Cargo.toml` in the binding:
49+
2. Update `mmtk/Cargo.toml` in the binding:
4950
* Find the section `[package.metadata.{binding-name}]`.
5051
* Update the field `{binding-name}_repo` if necessary. It should point to our VM fork, such as `https://github.com/mmtk/{binding-name}.git`.
5152
* Update the field `{binding-name}_version`. It should point to the new commit hash `{vm_commit}`.
5253
* Commit the change.
53-
1. Merge the mmtk-core PR.
54-
1. When a new commit is pushed to `master`, `auto-merge.yml` will be triggered.
55-
1. The binding PRs should be updated and auto merge will be eanbled for the PR. Keep an eye until the PRs are all merged. Resolve any
54+
5. Merge the mmtk-core PR.
55+
6. When a new commit is pushed to `master`, `auto-merge.yml` will be triggered.
56+
7. The binding PRs should be updated and auto merge will be eanbled for the PR. Keep an eye until the PRs are all merged. Resolve any
5657
issue that prevents the PR from being auto merged (e.g. flaky tests).
5758

5859
#### Manual merging process
5960

6061
If `auto-merge.yml` failed for any reason, or if we have to manually merge binding PRs, this is the process to follow:
6162

62-
1. Follow Step 1-4 in the auto merging process.
63-
1. When a new commit is pushed to `master`, we record the commit hash (as `{mmtk_core_commit}`).
64-
1. For each binding PR that we need to merge:
63+
1. Follow Step 1-5 in the auto merging process. (Step 3 is optional)
64+
2. When a new commit is pushed to `master`, we record the commit hash (as `{mmtk_core_commit}`).
65+
3. For each binding PR that we need to merge:
6566
1. Update `mmtk/Cargo.toml` in the binding:
6667
* Find the `mmtk` dependency under `[dependencies]`.
6768
* Update the field `git` if necessary. It should point to our mmtk-core repo, `https://github.com/mmtk/mmtk-core.git`.

docs/team/release.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Release
2+
3+
This documents how MMTk is currently released in the pre-1.0 stage.
4+
5+
## Release Cycle
6+
7+
We maintain a 6-week release cycle. A release is usually cut at the end of a week (Friday).
8+
9+
## Release Scope
10+
11+
MMTk releases include MMTk core and the officially supported bindings. They share the same version number as MMTk core.
12+
13+
The current releases include the following bindings:
14+
* OpenJDK
15+
* JikesRVM
16+
17+
The current releases do not include the following bindings:
18+
* Julia: We have made good progress on the binding development, and we will include it soon.
19+
* Ruby: We have made good progress on the binding development, and we will include it soon.
20+
* V8: We currently lack of resources to work on the binding.
21+
22+
## Release Process
23+
24+
### Create PRs to bump the version number
25+
26+
Create pull requests for each repository (mmtk-core, and binding repos that will be included in the release).
27+
We use semantic versioning for MMTk core, and use the same version number for all the bindings in the same release.
28+
If the current version is `0.X.x`, the new version should be `0.X+1.0`.
29+
30+
#### MMTk core
31+
32+
The PR should include these changes:
33+
34+
1. Bump version in `Cargo.toml`.
35+
2. Bump version in `macros/Cargo.toml`. Use the new version for the `mmtk-macros` dependency in `Cargo.toml`
36+
3. Update `CHANGELOG.md`:
37+
1. Add a section for the new version number and the cut-off date (when the PR is created)
38+
2. Add change logs for the release. The following shows one convenient way to do it. If there is a better way, we should adopt.
39+
1. Auto generate the list of changes for the release on Github. Click on [`releases`](https://github.com/mmtk/mmtk-core/releases),
40+
then click [`Draft a new release`](https://github.com/mmtk/mmtk-core/releases/new). Enter the new version tag,
41+
and the `Generate release notes` button should be avaialble. Copy the notes as the change logs to `CHANGELOG.md`.
42+
Close the release page without tagging a release.
43+
2. Categorize the changes in `CHANGELOG.md`. We use these categories: Plan, Policy, Allocator, Scheduler, API, Misc.
44+
4. Update the pinned Rust version in `rust-toolchain` if necessary.
45+
1. Talk with system admin for our CI machines, and check if there is a newer Rust version that we should be using.
46+
2. If we update to a new Rust version, make necessary changes to the code base.
47+
48+
#### Bindings
49+
50+
The PR should include these changes:
51+
52+
1. Bump version in `mmtk/Cargo.toml`. Use the same version as MMTk core.
53+
2. Update `CHANGELOG.md`, similar to the process in MMTk core.
54+
3. Update the pinned Rust version in `rust-toolchain` if the Rust version is updated for MMTk core.
55+
4. Update the dependency of `mmtk` in `mmtk/Cargo.toml` to use the MMTk core PR. Update `Cargo.lock`.
56+
57+
#### Merging PRs
58+
59+
We should have a mmtk-core PR and multiple binding PRs. When all the PRs are approved, we can start merging the PRs.
60+
The merging is the same as ['Merging a PR with API breaking changes' in pull_request.md](./pull_request.md#merging-a-pr-with-api-breaking-changes).
61+
62+
### Tag releases
63+
64+
Once the PRs are merged, we can tag releases on Github.
65+
66+
1. Go to 'Create a new release' for each involved repository. E.g. https://github.com/mmtk/mmtk-core/releases/new for `mmtk-core.`
67+
2. Enter the new version (prefixed with `v`) in the box of 'Choose a tag'. Use the default 'target' (`master`).
68+
3. Enter the release title
69+
* `MMTk 0.x.0`
70+
* `MMTk OpenJDK Binding 0.x.0`
71+
4. Copy the markdown section for this version in the `CHANGELOG.md` as the description for the release.
72+
5. Tick 'Set as a pre-release'.
73+
6. Click 'Publish release'.
74+
75+
### Post release checklist
76+
77+
1. Keep an eye on the badges in [README](https://github.com/mmtk/mmtk-core#mmtk)
78+
* crates.io: Once a release is tagged for `mmtk-core`, [cargo-publish.yml](https://github.com/mmtk/mmtk-core/blob/master/.github/workflows/cargo-publish.yml) should be trigger to publish `mmtk-core` to `crates.io`. https://crates.io/crates/mmtk should show the new version.
79+
* docs: Document hosting: Once `mmtk-core` is published to `crates.io`, a job should be queue'd for document generation on `docs.rs`. https://docs.rs/mmtk/latest/mmtk/ should show
80+
the docs for the new version once the generation is done.
81+
2. Keep an eye on the CI status for the latest commit in MMTk core.
82+
3. Do point release for fixing severe issues. Currently we normally do not need point releases. Normal bug fixes or any other issues can be fixed in the next release.
83+
But in rare cases, such as the current tagged release cannot build, cannot run, or it somehow fails in publishing, we may need to do a point release.
84+
* If there is no other commit in `master` yet, doing a point release follows exactly the same process above. Depending on the changes, we may or may not need a point release
85+
for the bindings.
86+
* If there are commits in `master` that we do not want to include in the point release, the point release should be in a separate branch in the upstream repository.
87+
The changes for the point release should be merged back to `master`.

0 commit comments

Comments
 (0)