Preamble: This document covers steps for releasing new versions of MusicBrainz Server which is performed by maintainers only. It includes discussion about private servers, repositories and tools which other contributors don’t have access to. It is made public for transparency and to allow for improvement suggestions.
-
Perl module Locale::PO
For updating translations, also part of
production
server features incpanfile
.
See the private system administration wiki for additional prerequisites.
The Git remote origin
is assumed to point at https://github.com/metabrainz/musicbrainz-server.git
.
Those steps should be followed when releasing beta, and then double-checked when releasing production.
-
Make sure a version with status “Unreleased”, usually named “next”, is present in the Jira MBS project administration panel. Its serial ID will be used for tagging the branch
production
in Git. -
Make sure that the field “Fix Version” is set to this version for all the tickets in beta testing. If needed, use “Tools”, “Bulk Change”, “Edit Issues”, without “Send mail for this update”.
-
Make sure that all of these tickets also have:
- A “type” that makes sense;
- A “summary” that makes sense for the type, and is clear even in a list that does not include other fields;
- A “description” that explains the why and the how, the situation before and after;
- The appropriate “components” and “labels” set.
(It is fairly common to have to update both summary and description after implementation.)
Assuming the source messages were updated when releasing beta (if not, see that under the beta process below first!), you need to start by updating the translated messages:
-
From the repository in Weblate:
-
If there are any “Pending changes”, “Commit” those and wait a bit before reloading the page.
-
If there are any commits “missing in the push branch”, “Push” those and wait (some more time) before reloading the page.
-
If there are any “missing commits” from “upstream” (beta branch), “Update” the “Weblate repository” and wait (even longer) before reloading the page.
-
-
Update your local
translations
branch and merge it tobeta
and push as follows:git fetch origin && \ git checkout origin/translations -B translations && \ git checkout beta && \ git merge --log=876423 --no-ff translations && \ git push
Wait until CircleCI is happy with this merge as some unmatching translations can break building Docker images.
🧱 While waiting you can pre-empt drafting blog post!
Create a new draft from the template. The list of tickets can be copied from the auto-generated release notes, by going to the Releases tab, selecting the version you are going to release, and clicking “Release Notes” in the top.
If there are any React conversion tasks (which should be sub-tasks of MBS-8609), move these to the section “React Conversion Task” at the end, and move other (sub-)tasks under the section “Other Task”. Otherwise, just put all the tasks under a unique section “Task”.
Last but not least, thank (in order of rarity):
- code contributors, who can be listed with
./script/list_code_contributors
, - translators, who can be listed with
./po/list_translators
, - reporters of each addressed issue at least,
and every other constructive feedback providers if possible:
- reporters of tickets addressed in beta
- reporters of tickets about beta (assuming a two weeks cycle)
- especially good comment authors if possible (using the same lists ordered by “Watchers” to find the most popular tickets, see also pull requests)
(Avoid thanking ourselves, contractors.)
-
Merge
beta
toproduction
(git merge --log=876423 --no-ff beta
) and push. Wait until CircleCI and Jenkins (Selenium) are happy with this merge.🧱 While waiting you can pre-empt drafting Docker Compose release notes!
-
Merge
production
tomaster
(git merge --log=876423 --no-ff production
) and push.
You should tag production releases by using ./script/tag.sh
, which will ask you
the necessary questions. Skip this step if you're releasing beta or test.
Then, you must build new MusicBrainz Server Docker images from Jenkins:
-
Go to https://ci.metabrainz.org/job/musicbrainz-docker-images/
-
“Build with Parameters” (in the left), and enter
production
for IMAGE_BRANCH.
A build can take some time (from a few minutes to half an hour). Once the image is built you can begin the deployment.
🧱 While waiting you can pre-empt building Docker image for mirrors!
Because any deployment may cause issues for MusicBrainz users and MetaBrainz staff, each deployment should be announced through the chat and the website’s banner.
MusicBrainz servers are being updated, slowdowns may occur for a few minutes, thanks for your patience.
Also drop a line about it to the MusicBrainz community in ChatBrainz.
See the private system administration wiki for instructions.
Then unset the banner message on the main website and set the banner message on beta to
Beta website is currently the same as the main website, nothing to be tested for now.
Now that you have done the release, you will need to update Jira:
-
Edit the unreleased version “next” in the Jira MBS project administration panel to set the field “Release date” to the current date and the field “Name” also to the current date (or to “Schema Change, Year Q#” for schema change release).
-
Close all the tickets in beta testing as “Fixed”.
-
Create a new version named “next” with “TBD” as description.
-
“Release” the current version. Any tickets remaining in this version and having a status other than “Closed” should be moved to the version “next”.
-
“Archive” any previous versions still marked as “Released”, except for the latest schema change release.
Assuming that you drafted a blog post already, just make sure to update the following if any changes occurred:
- Tickets’ title and type
- Acknowledgments (including translators and beta reporters)
To do so, you can adapt the draft section with:
- appending a Git revision range
v-prev-io-us..v-curr-en-t
to the listing commands (see--help
for details), - replacing some condition with
fixVersion =
the current version in the Jira queries.
Once the draft has been reviewed, then update the description of the MBS version in Jira with the blog post URL. This URL will also be used in the following section. The blog post will be published only after that.
In your clone of MusicBrainz’s Docker Compose project:
-
Update the version of MusicBrainz Server to dockerize. See example commit https://github.com/metabrainz/musicbrainz-docker/commit/a0930848751a9b923e8c7261f2ff2904af2577ec. See also prerequisites from
admin/repository/prebuild-musicbrainz --help
.Check files under
build/musicbrainz/
andbuild/musicbrainz-dev/
and update those if needed. It can usually be needed when changingDBDefs
, dependencies, or scripts in MusicBrainz Server. -
Build, tag and push Docker image for mirrors using the script
admin/repository/prebuild-musicbrainz
-
Manually test running a mirror with this image. (Test development setup too if there is any change to it.)
-
Tag your local Git branch
master
(git tag -u CE33CF04 $version_number -m 'Upgrade MusicBrainz Server.'
) and push both the commits and the tag. -
Draft a GitHub release of name
$version_number
(copy the structure from previous releases). -
Release the appropriate Jira version; as its description, set the GitHub release URL (
https://github.com/metabrainz/musicbrainz-docker/releases/tag/$version_number
). Archive the previous non-schema change releases, if not yet archived. Create a new version for the next expected release, with the description “TBD”. -
Edit the blog post to link to the new musicbrainz-docker release.
-
Publish both the blog post and the musicbrainz-docker release.
It has some differences with the production release process; follow these steps:
-
On the prepare Jira step, it might take some more time to update tickets than for production release when everything is ready.
-
On the translations update step, start with following the exact same two steps (more detailed above):
-
“Commit” any pending change, “push” any missing commit to downstream, and “update” any missing commit from upstream, all from the repository in Weblate.
-
Update your local
translations
branch and merge it tobeta
and push.
Then additionally update source messages for translation as follows:
- On
master
(orbeta
if changes have been pushed directly there), run./po/update_pot.sh
to generate new .pot files from the database and templates. It's often a good idea to manually check the changes to the .pot files: this is a good moment to find typos that were missed during code review, or small changes to lines that don't seem useful enough to justify breaking the existing translations. If you find any of these, you might want to correct the issues and generate the files again. Once you're done, commit the changes and push. Keep in mind Weblate is following*.pot
files from thebeta
branch; if you updatedmaster
here thenbeta
will be updated in the next step.
-
-
On the git branches merge step, to update the
beta
branch with the changes from themaster
branch, mergemaster
intobeta
(withgit merge --log=876423 --no-ff master
) and push tobeta
. (Skip this, of course, if you're just deploying changes pushed directly to thebeta
branch.) -
On the build Docker images step, enter
beta
for IMAGE_BRANCH when doing “Build with Parameters”. Wait until the build has completed. -
On the deployment’s announcement step, set the banner message on beta to
Beta website is being updated, slowdowns may occur for a few minutes, thanks for your patience.
Also drop a line about it to the MusicBrainz community in ChatBrainz.
-
On the deployment step itself, run
./script/update_containers.sh beta
. Wait until the deployment has completed.Notes:
- Background task runners follow the
production
branch only, which means that new reports are not available on the beta website for now. - The banner’s website is updated only after updating tickets; see below.
- Background task runners follow the
-
On the Jira step, transition all the tickets marked as in development branch to the status “In Beta Testing”. For tickets which fixed a beta-only issue not present in production, close the ticket as fixed and set the field “Fix Version” to “Beta”. Make sure all the tickets have a type that makes sense, enough information to be understandable, and the appropriate components and labels set.
Notes: None of the following steps are involved in releasing beta:
- Blog
- Add git tag
- Release
musicbrainz-docker
-
Again, set the banner message on beta to
Beta MusicBrainz Server has been updated on Month DD, see the list of <a href="https://tickets.metabrainz.org/issues/?filter=10715">tickets available for beta testing</a>.
Unlike production and beta, test is more flexible:
- The
test
branch is not protected and can be force-pushed, but you should always check with the other developers to make sure they are not currently using it. - The
test.musicbrainz.org
website does not use the production database, which means that background tasks can be tested too and that potential data loss is not an issue, but it might require to recreate the test database for schema changes.
-
Skip the translations; and instead of merging branches do as follows:
- Either cherry-pick the commits you want to test to the
test
branch and push; - Or reset the
test
branch to the branch you want to test and force-push.
- Either cherry-pick the commits you want to test to the
-
Then on the build Docker images step, enter
test
for IMAGE_BRANCH when doing “Build with Parameters”. -
On the deployment step, just run
./script/update_containers.sh test
. Note that only webservice and website can be deployed in test, but background tasks can be manually run from these if needed.