2019-12-21 20:14:01 +03:00
|
|
|
# Maintainers' Guide
|
|
|
|
|
|
|
|
## Hotfixes
|
|
|
|
|
|
|
|
Here lies an informal guide for making hotfix releases and deploying them to
|
|
|
|
the network.
|
|
|
|
|
2020-02-18 15:51:07 +03:00
|
|
|
Take [this PR][1], as an example. This constituted a great hotfix. It's a
|
|
|
|
single commit, targeting a problem that existed on the network at the time.
|
|
|
|
Here's it should be released and deployed OTA.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
[1]: https://github.com/urbit/urbit/pull/2025
|
|
|
|
|
|
|
|
### If the thing is acceptable to merge, merge it to master
|
|
|
|
|
|
|
|
Unless it's very trivial, it should probably have a single "credible looking"
|
|
|
|
review from somebody else on it.
|
|
|
|
|
2020-02-18 15:51:07 +03:00
|
|
|
You should avoid merging the PR in GitHub directly. Instead, use the
|
|
|
|
`sh/merge-with-custom-msg` script -- it will produce a merge commit with
|
|
|
|
message along the lines of:
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
```
|
|
|
|
Merge branch FOO (#PR_NUM)
|
|
|
|
|
|
|
|
* FOO:
|
|
|
|
bar: ...
|
|
|
|
baz: ...
|
|
|
|
|
2020-02-18 15:51:07 +03:00
|
|
|
Signed-off-by: SIGNER <signer@example.com>
|
2019-12-21 20:14:01 +03:00
|
|
|
```
|
|
|
|
|
2020-02-18 15:51:07 +03:00
|
|
|
We do this as it's nice to have the commit log information in the merge commit,
|
|
|
|
which GitHub's "Merge PR" button doesn't do (at least by default).
|
|
|
|
`sh/merge-with-custom-msg` performs some useful last-minute urbit-specific
|
|
|
|
checks, as well.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
2020-02-18 15:51:07 +03:00
|
|
|
You might want to alias `sh/merge-with-custom-msg` locally, to make it easier
|
|
|
|
to use. My .git/config contains the following, for example:
|
|
|
|
|
|
|
|
```
|
|
|
|
[alias]
|
|
|
|
mu = !sh/merge-with-custom-msg
|
|
|
|
```
|
|
|
|
|
|
|
|
so that I can type e.g. `git mu origin/foo 1337`.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
### Prepare a release commit
|
2019-12-21 20:14:01 +03:00
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
You should create Landscape or alternative pill builds, if or as appropriate
|
|
|
|
(i.e., if anything in Landscape changed -- don't trust any compiled JS/CSS
|
|
|
|
that's included in the commit), and commit these in a release commit.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
2020-02-18 15:51:07 +03:00
|
|
|
You should always create a solid pill, in particular, as it's convenient for
|
2020-03-16 10:32:55 +03:00
|
|
|
tooling to be able to boot directly from a given release.
|
|
|
|
|
|
|
|
If you're making a Vere release, just play it safe and update all the pills.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
### Tag the resulting commit
|
|
|
|
|
|
|
|
What you should do here depends on the type of release being made.
|
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
First, for Urbit OS releases:
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
If it's a very trivial hotfix that you know isn't going to break
|
2020-03-16 10:32:55 +03:00
|
|
|
anything, tag it as `urbit-os-vx.y.z`. Here 'x' refers to the product version
|
|
|
|
(e.g. OS1, OS2..), 'y' to the continuity era in that version, and 'z' to an
|
|
|
|
OTA patch counter. So for a hotfix version, you'll just want to increment 'z'.
|
|
|
|
|
|
|
|
Use an annotated tag, i.e.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
```
|
2020-03-16 10:32:55 +03:00
|
|
|
git tag -a urbit-os-vx.y.z
|
2019-12-21 20:14:01 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
The tag format should look something like this:
|
|
|
|
|
|
|
|
```
|
2020-03-16 10:32:55 +03:00
|
|
|
urbit-os-vx.y.z
|
2019-12-21 20:14:01 +03:00
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
This release will be pushed to the network as an over-the-air update.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
Release notes:
|
|
|
|
|
|
|
|
[..]
|
|
|
|
|
|
|
|
Contributions:
|
|
|
|
|
|
|
|
[..]
|
|
|
|
```
|
|
|
|
|
|
|
|
You can get the "contributions" section by the shortlog between the
|
|
|
|
last release and this release:
|
|
|
|
|
|
|
|
```
|
2020-02-18 15:51:07 +03:00
|
|
|
git log --pretty=short LAST_RELEASE.. | git shortlog
|
2019-12-21 20:14:01 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
I originally tried to curate this list somewhat, but now just paste it
|
|
|
|
verbatim. If it's too noisy, yell at your colleagues to improve their commit
|
|
|
|
messages.
|
|
|
|
|
|
|
|
Try to include a high-level summary of the changes in the "release notes"
|
|
|
|
section. You should be able to do this by simply looking at the git log and
|
|
|
|
skimming the commit descriptions (or perhaps copying some of them in verbatim).
|
|
|
|
If the commit descriptions are too poor to easily do this, then again, yell at
|
|
|
|
your fellow contributors to make them better in the future.
|
|
|
|
|
|
|
|
If it's *not* a trivial hotfix, you should probably make any number of release
|
2020-03-16 10:32:55 +03:00
|
|
|
candidate tags (e.g. `urbit-os-vx.y.z.rc1`, `urbit-os-vx.y.z.rc2`, ..), test
|
2019-12-21 20:14:01 +03:00
|
|
|
them, and after you confirm one of them is good, tag the release as
|
2020-03-16 10:32:55 +03:00
|
|
|
`urbit-os-vx.y.z`.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
For Vere releases:
|
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
Tag the release as `urbit-vx.y.z`. The tag format should look something like
|
|
|
|
this:
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
```
|
2020-03-16 10:32:55 +03:00
|
|
|
urbit-vx.y.z
|
|
|
|
|
2020-04-20 11:32:47 +03:00
|
|
|
Note that this Vere release will by default boot fresh ships using an Urbit OS
|
|
|
|
va.b.c pill.
|
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
Release binaries:
|
2019-12-21 20:14:01 +03:00
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
(linux64)
|
|
|
|
https://bootstrap.urbit.org/urbit-vx.y.z-linux64.tgz
|
2019-12-21 20:14:01 +03:00
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
(macOS)
|
|
|
|
https://bootstrap.urbit.org/urbit-vx.y.z-darwin.tgz
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
Release notes:
|
|
|
|
|
|
|
|
[..]
|
|
|
|
|
|
|
|
Contributions:
|
|
|
|
|
|
|
|
[..]
|
|
|
|
```
|
|
|
|
|
|
|
|
The same schpeel re: release candidates applies here.
|
|
|
|
|
2020-04-20 11:32:47 +03:00
|
|
|
Note that the release notes indicate which version of Urbit OS the Vere release
|
|
|
|
will use by default when booting fresh ships. Do not include implicit Urbit OS
|
|
|
|
changes in Vere releases; this used to be done, historically, but shouldn't be
|
|
|
|
any longer. If there are Urbit OS and Vere changes to be released, make two
|
|
|
|
separate releases.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
### Deploy the update
|
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
(**Note**: the following steps are automated by some other Tlon-internal
|
|
|
|
tooling. Just ask `~nidsut-tomdun` for details.)
|
|
|
|
|
|
|
|
For Urbit OS updates, this means copying the files into ~zod's %base desk. The
|
2020-02-18 15:51:07 +03:00
|
|
|
changes will be synced to /~zod/kids and then propagated through other galaxies
|
|
|
|
and stars to the rest of the network.
|
|
|
|
|
2020-03-16 10:32:55 +03:00
|
|
|
For consistency, I create a release tarball and then rsync the files in.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
```
|
2020-03-16 10:32:55 +03:00
|
|
|
$ wget https://github.com/urbit/urbit/archive/urbit-os-vx.y.z.tar.gz
|
|
|
|
$ tar xzf urbit-os-vx.y.z.tar.gz
|
2019-12-21 20:14:01 +03:00
|
|
|
$ herb zod -p hood -d "+hood/mount /=base="
|
2020-03-16 10:32:55 +03:00
|
|
|
$ rsync -zr --delete urbit-urbit-os-vx.y.z/pkg/arvo/ zod/base
|
2019-12-21 20:14:01 +03:00
|
|
|
$ herb zod -p hood -d "+hood/commit %base"
|
|
|
|
```
|
|
|
|
|
2020-02-18 15:51:07 +03:00
|
|
|
For Vere updates, this means simply shutting down each desired ship, installing
|
|
|
|
the new binary, and restarting the pier with it.
|
2019-12-21 20:14:01 +03:00
|
|
|
|
|
|
|
### Announce the update
|
|
|
|
|
|
|
|
Post an announcement to urbit-dev. The tag annotation, basically, is fine here
|
2020-03-16 10:32:55 +03:00
|
|
|
-- I usually add the %base hash (for Urbit OS releases) and the release binary
|
|
|
|
URLs (for Vere releases). Check the urbit-dev archives for examples of these
|
2019-12-21 20:14:01 +03:00
|
|
|
announcements.
|
|
|
|
|