Debian Codegraph @

release_checklist.md

raw
1 # Jsonnet Release Checklist
2
3 ## Preparation
4
5 Before doing the release, make sure that the project is in good state:
6
7 - Triage issues – make sure that all issues are labelled.
8 - Check for release-blocking bugs. All bugs which results in a wrong result of the evaluation are release-blocking.
9 - Go through the open PRs – consider merging any outstanding ones. Do not merge big changes right before the release.
10 - Check for new major Bazel versions (https://bazel.build/release), update
11 `.github/workflows/build_and_test.yml` "Build Bazel example" job to check all actively maintained Bazel versions
12 and confirm that it stays green.
13 - Sync google/go-jsonnet and google/jsonnet
14 1. Check out master from both
15 1. Use the `update_cpp_jsonnet.sh` script in the go-jsonnet repository to sync it to jsonnet master.
16 1. Run tests: `./tests.sh`
17 1. Fix any failing tests.
18 1. Send a PR with the updated version, so that all the CI tests are run.
19 - Check that CI is green in both C++ and Go jsonnet: Checks should run automatically on pushes to `master`,
20 so you can check the status on the latest master commit.
21 - Optionally, run tests locally to double-check.
22 - C++:
23 1. `make test`
24 1. `bazel test ...:all`
25 1. `mkdir build ; cd build ; cmake .. ; make ; make test`
26 - Go:
27 1. `./tests.sh`
28 2. `bazel test //:go_default_test`
29 - Optionally, make sure the Python bindings build and work correctly locally.
30 - Go through the commits since the last release and prepare the release notes.
31 The release notes should have separate sections for the language changes and
32 changes specific to each implementation.
33 - Make sure that the stdlib documentation is complete. Check the git history for any
34 changes to stdlib (including builtins) and make sure they are reflected in the documentation.
35 - Make sure that you can build the website locally.
36 - Download or build libjsonnet.wasm (see README.md for instructions)
37 - `jekyll serve -s doc/` (you need Jekyll 4.3.0 or later) to serve the site locally to check it.
38 - Check that it works in two different browsers. Make sure that live evaluation
39 in the tutorial works.
40
41 All the above points apply to both google/jsonnet and google/go-jsonnet.
42
43 ## Make a final decision to release
44
45 A this point you should be confident that the project is ready for the release, and know what
46 will be included in that release.
47
48 ## Release the C++ version
49
50 1. Checkout the `prepare-release` branch.
51 1. Fast-forward merge it to match `master` (it should fast-forward cleanly!):
52 `git merge --ff-only upstream/master`
53 (`upstream` might have a different name depending on your local git checkout)
54 1. Modify `include/libjsonnet.h` to the version number for the new release. If you are making a
55 release candidate and not a full release, include a suffix like `-rc1`.
56 1. Modify `MODULE.bazel` to match the new release version number.
57 1. Update `test_cmd` golden file version numbers:
58
59 ```
60 ./tools/scripts/replace_test_cmd_version.sh <NEW_VERSION>
61 ```
62
63 1. In `doc/_stdlib_gen/stdlib-content.jsonnet` replace any `availableSince: "upcoming"` with NEW_VERSION".
64
65 1. Commit the version number changes. Typically I use a commit message like:
66 `git commit -m "release: prepare to release v0.21.0-rc2"`
67
68 1. Push the `prepare-release` up to github. CI checks should automatically be triggered on the branch.
69 Wait for them to be green, in: https://github.com/google/jsonnet/actions
70 If CI checks don't pass, fix the problems.
71 1. Optionally: Perform a test Python build & publish to `testpypi`. This is important to do if the Python
72 build/publish process has changed, but less important otherwise. To do this, on the GitHub Actions page,
73 manually trigger the "Build and Publish Python Package" workflow. Set the options appropriately
74 (check the "Upload generate package files to PyPI" checkbox, select "testpypi" as the instance to
75 publish to). You will need to explicitly approve the publish step after the build step is completed.
76 This lets you check the whole workflow end to end and check that all the steps succeeded.
77 If you just want to verify that building the Python packages works (without checking the publishing
78 process) you can run the workflow but leave "Upload generate package files to PyPI" unchecked.
79 1. On the GitHub Actions page, manually trigger the "Release" workflow.
80 This will create a new _draft_ release in GitHub, and attach a tarball archive of the repository content.
81 The version number for the release is extracted directly from the `LIB_JSONNET_VERSION` in the jsonnet header.
82 1. On the GitHub Actions page, manually trigger the "Build and Publish Python Package" workflow. In the
83 workflow settings, check "Upload generate package files to PyPI" and select "pypi" as the instance to
84 publish to.
85 This will build Python packages for a variety of systems. It will then _pause_ and wait for an approval
86 before publishing them to PyPI. I generally wait until I'm really ready to hit the publish button on the
87 release in GitHub before approving the PyPI publish step (but I let PyPI publishing complete before hitting
88 the GitHub button so that I can confirm that the packages get uploaded successfully).
89 1. Do any last minute checks you want to do!
90 If you want to manually check any of the built Python packages before they're published, you can download
91 them GitHub Actions - they are available as "Artifacts" on the workflow. If you want to download and check
92 the source tarball you can download it from the draft release in GitHub.
93 1. Finalise the release notes in the GitHub release UI.
94 1. Approve PyPI publishing and let it complete.
95 1. Check that the new/proposed version tag specified in the GitHub release is correct and hit the Publish button
96 (you do not have to manually create the tag - GitHub creates tag when you publish the release).
97 1. Fast-forward merge the `prepare-release` branch to `master` and push `master` so that the repo master state
98 matches the release that was just published.
99 1. TO BE WRITTEN: Update the Bazel module at https://registry.bazel.build/modules/jsonnet.
100
101 ## Release the Go version
102
103 This should be done _after_ the C++ version release, because the Go version depends on the C++ version: it uses
104 the standard library from the C++ version, and some header files.
105
106 1. In `go-jsonnet`, switch to the `prepare-release` branch and bring it up to date with `master`:
107 Fast-forward merge with `git merge --ff-only`.
108 1. In `go-jsonnet` you can run the `update_cpp_jsonnet.sh` script and pass in the published version tag
109 for the C++ version; this will update go-jsonnet to pin it to that specific release (instead of pinning
110 to a commit hash). Pinning to the release is better, because it will use the stable jsonnet release
111 source tarball (which has a stable hash that can be used) instead of the unstable GitHub automatic
112 tarball for the commit.
113 1. Modify `vm.go` to update the version number.
114 1. Modify `MODULE.bazel` to update the version number.
115 1. Run tests locally, commit, and push to the `go-jsonnet` `prepare-release` branch. CI checks should run
116 automatically on this branch - check the results in https://github.com/google/go-jsonnet/actions
117 1. Optionally: Perform a preflight Python build & publish by manually triggering the workflow in GitHub actions.
118 1. Start a release Python build & publish by manually triggering the workflow in GitHub Actions.
119 It will wait for an approval before publishing (don't approve it yet).
120 Check that the Python packages are all built successfully.
121 1. Manually trigger the Release workflow in GitHub Actions to create a new _draft_ release with all the
122 built packages attached to it.
123 1. Fill in the release notes in the GitHub draft release.
124 1. Do any final release checks (including downloading built packages and checking them locally if you want).
125 1. Approve the Python publish step and wait for that to complete successfully.
126 1. Check that the new tag number is correct and click Publish in the GitHub draft release.
127 1. Fast-forward merge the `prepare-release` branch to `master` and push `master` so that the repo master state
128 matches the release that was just published.
129 1. TO BE WRITTEN: Update the Bazel module at https://registry.bazel.build/modules/jsonnet_go.
130
131 ## Update the website
132
133 In google/jsonnet:
134
135 - Build or download libjsonnet.wasm (see README.md)
136 - `jekyll serve -s docs/`
137 - Check that the local version works in two different browsers. Make sure that live evaluation in the tutorial works.
138 - `tools/scripts/push_docs.sh`
139 - Check that the public works in two different browsers. Make sure that you are getting the new version (and not an old cached version). Make sure that live evaluation in the tutorial works.
140
141 ## Make the announcement
142
143 - Send an email to the mailing list.
144 - Announce the new release on Slack.
145
146 ## After the release
147
148 It's a good time to merge big PRs.