MusicBrainz schema change release, 2019-05-13 (with upgrade instructions)

We’re happy to announce the release of our May 2019 schema change today! Thanks to all who were patient during today’s downtime as we released everything to our production servers.

This is a fairly minor release as far as schema changes go, but please do report any issues that you come across, especially any related to genres and collections.

Visible changes with this release are limited to an indication if a specific artist credit is being edited (MBS-5387). Work on some of the changes to collections and genres is quite advanced, and we’re hoping to release some of the new features onto beta already in a week or so from now, while others might take a while longer.

Now, on to the instructions.

Schema Change Upgrade Instructions

Note: Importing the latest data dump is always a valid alternative to running ./upgrade.sh on an existing database, if you’d prefer to also get new data in one go. Just follow the relevant instructions in INSTALL.md. The git tag is v-2019-05-13-schema-change. The rest of the instructions here assume an in-place upgrade.

  1. Make sure DB_SCHEMA_SEQUENCE is set to 24 in lib/DBDefs.pm.
  2. If you’re using the live data feed (your REPLICATION_TYPE is set to RT_SLAVE), ensure you’ve replicated up to the most recent replication packet available with the old schema. If you’re not sure, run ./admin/replication/LoadReplicationChanges and see what it tells you; if you’re ready to upgrade, it should say “This replication packet matches schema sequence #25, but the database is currently at #24.”
  3. Take down the web server running MusicBrainz, if you’re running a web server.
  4. Turn off cron jobs if you’re automatically updating the database via cron jobs.
  5. Switch to the new code with git fetch origin followed by git checkout v-2019-05-13-schema-change.
  6. Install newer dependencies Yarn and NodeJS 8 or later according to install prerequisites.
  7. Run cpanm --installdeps --notest . (note the dot at the end) to ensure your perl-based dependencies are up to date.
  8. Run ./upgrade.sh (it may take a while to vacuum at the end).
  9. Set DB_SCHEMA_SEQUENCE to 25 in lib/DBDefs.pm as instructed by the output of ./upgrade.sh.
  10. Turn cron jobs back on, if applicable.
  11. Restart the MusicBrainz web server, if applicable. It’s also recommended you restart redis. If you’re accessing your MusicBrainz server in a web browser, run ./script/compile_resources.sh.

Here’s the list of resolved tickets:

Bug

  • [MBS-5387] – ACs being edited aren’t marked as having pending edits on the aliases tab
  • [MBS-9365] – event_meta_fk_id was never created as part of any upgrade script
  • [MBS-9462] – Standalone databases created before schema 21 are missing some l_event_url triggers
  • [MBS-10146] – Regression: ISE on Remove DiscID page
  • [MBS-10149] – Swap track titles with artist credits fails to update both fields properly
  • [MBS-10150] – Regression: The link to the release group reviews in the release page is broken

Improvement

  • [MBS-9664] – Add database constraints to disallow loop relationship
  • [MBS-10044] – Add place area to place lists

Database Schema Change Task

  • [MBS-10052] – Add new schema for the event art archive
  • [MBS-10173] – Create a genre table in the DB and populate it with existing genres
  • [MBS-10174] – Create an addition timestamp in the DB for new collection items
  • [MBS-10175] – Create a position integer in the DB for collection items
  • [MBS-10176] – Create a comment text field in the DB for collection items
  • [MBS-10177] – Create an editor_collection_collaborator table for collaborative collections
  • [MBS-10178] – Create a genre_alias table
  • [MBS-10181] – Create filesize for cover art and each thumb in the DB

React Conversion Task

  • [MBS-9925] – Convert collection pages to React
  • [MBS-10179] – Convert all entity list components to React

MusicBrainz Schema change upgrade downtime: 17:00 UTC (10am PST, 1pm EST, 19:00CEST)

Hi!

At 17:00 UTC (10am PST, 1pm EST, 19:00CEST) we will start the process of our schema change release. The exact time that we plan to start the change will depend on how long it takes to finish our preparations, but we expect it to be shortly after 17:00UTC.

Once we start the process we will put a banner notification on musicbrainz.org and we will also post updates to the @MusicBrainz twitter account, so follow us there for more details.

After the release is complete, we will post instructions here on how to upgrade your replicated MusicBrainz instances.

Google Summer of Code 2019: Accepted students and their projects

The accepted students for Google Summer of Code have just been announced! We’re please to announce that Akhilesh Kumar (BookBrainz), Aidan Lawford-Wickham (AcousticBrainz), Vansika Pareek (ListenBrainz), Anirudh Jain (MusicBrainz), amCap1712 (MusicBrainz) and Shamroy Pellew (CritiqueBrainz) have been accepted on behalf of the MetaBrainz Foundation!

To find out more about the accepted students and what they will be working on, please take a look at the list of accepted projects.

This year was quite challenging to decide which students to accept. We had more good proposals than we could accept — which is quite heartbreaking, since we hate having to turn away good proposals. Still, we have a very good spread of students across our projects and we’re quite excited for Summer of Code this year.

Thanks to everyone who applied, all of our mentors and of course, Google’s Open Source Programs Office for making Summer of Code a reality.

MusicBrainz Server update, 2019-04-26

We finally have a new release! Some large conversions of the MusicBrainz website templates to React happened during the past three months, leading to a long delay between releases – sorry about that! This release also fixes several bugs and adds some small improvements.

Thanks to Cyna, Ge0rg3, and spellew for their contributed code, mostly written during GCI. Also, thanks to alpinetux, amCap1712, chirlu, culinko, cyberskull, derobert, Griomo, hibiscuskazeneko, Jeluang, jessew, kepstin, Kid Devine, ListMyCDs.com, Lotheric, mfmeulenbelt, rafwuk, RavenWorks, samj1912, yindesu, yurim, and everyone who tested beta version, reported issues, or updated website translations.

The git tag is v-2019-04-26.

Bug

  • [MBS-6895] – Cannot inc=tags when browsing releases
  • [MBS-8634] – Privileged user accounts page still mentions the style council
  • [MBS-9013] – Removing specific ordering of relationships doesn’t create an edit
  • [MBS-9276] – Transient test failure in Edit::Instrument::Merge
  • [MBS-9297] – “Set track lengths” from Disc ID with no change should not be allowed
  • [MBS-9309] – Mediums fail to merge when two recording positions are swapped
  • [MBS-9400] – Tags are missing from artist nodes in /ws/2/release JSON requests
  • [MBS-9413] – Older “Remove relationship” edits can’t be loaded
  • [MBS-9669] – UI language menu not available in Spanish and Greek
  • [MBS-9845] – country.null stats not being collected
  • [MBS-9893] – Batch voting check boxes disappeared
  • [MBS-9899] – Recording and recording artist tags/genres missing in JSON WS
  • [MBS-9943] – Autocomplete.js is pretty much untranslatable
  • [MBS-9975] – Clicking the “A-a” button (guess sort name) to add a release alias sort name does not work.
  • [MBS-9983] – Non-group artists statistics does not include characters
  • [MBS-9985] – “Last updated on Invalid date” on release sidebar
  • [MBS-9986] – RG types not translated on sidebar
  • [MBS-9991] – Relationship names are not translatable
  • [MBS-9993] – MusicBrainz server should allow CORS requests to /oauth/token
  • [MBS-9995] – Space missing in autoeditor election text
  • [MBS-10009] – Some sidebar types are not translated
  • [MBS-10021] – ArtistRoles is not translatable
  • [MBS-10027] – t::MusicBrainz::Server::Controller::Admin::EditBanner fails randomly
  • [MBS-10031] – Tooltip says ‘null’ for artist names in ‘writer’ column of ‘work’ search results
  • [MBS-10033] – Missing space after Wikipedia blurb
  • [MBS-10045] – Regression: External links to Anison Generation in the sidebar appends https
  • [MBS-10075] – Release with no mediums disappears from release collection when sorting on format/no. of tracks
  • [MBS-10081] – Invalid last updated date on search result pages
  • [MBS-10084] – Unable to add CDBaby URL containing “ï”
  • [MBS-10085] – Long URL fails to wrap on release page in Chrome
  • [MBS-10088] – Example search for relationships breaks with cardinality
  • [MBS-10090] – Loading a doc page containing %3F loads full wikipage html
  • [MBS-10099] – Lyrics URL relationship uses the wrong link phrase on work edit page

Improvement

  • [MBS-6574] – Recursive area tabs
  • [MBS-7463] – Add redirect from /tag to /tags
  • [MBS-8782] – Show artist name on “Edit Note” tab of “Edit Release” page
  • [MBS-8922] – User reporting: Remove “Reveal my email address” option (or default it to on)
  • [MBS-9340] – Don’t allow more languages if [No lyrics] is selected
  • [MBS-9656] – [Change release quality] → [Change data quality]
  • [MBS-9935] – Indicate what to do with annotation reports
  • [MBS-9936] – Move from CJS style to ES6 (imports, exports)
  • [MBS-9988] – On /tags page, allow to go back to not showing downvoted tags
  • [MBS-9989] – Add new “Not applicable” gender option to stats
  • [MBS-9990] – Make formatUserDate error rather than return wrong date if given object
  • [MBS-9998] – Improve cleanup of Facebook URLs
  • [MBS-10008] – Generalize and localize CPDL link’s title in the sidebar
  • [MBS-10010] – Simplify sidebar_name methods for URLs
  • [MBS-10029] – When viewing edits by editor X, include editor X in the page title
  • [MBS-10032] – Detect and clean iTunes “author” URLs for artists
  • [MBS-10063] – “No linguistic content” → “[No lyrics]” in work edits display
  • [MBS-10074] – Display – on release search results for format/tracks if no medium exists
  • [MBS-10094] – Right-justify barcode on release group page
  • [MBS-10101] – Allow SecondHandSongs performance URLs for Recordings
  • [MBS-10102] – Use the containing country area of artists and labels for country statistics
  • [MBS-10103] – Update Bandsintown URL cleanup to strip languages

New Feature

  • [MBS-10011] – Congratulate/thank users on their birthdays
  • [MBS-10022] – Event tab for areas

React conversion task

  • [MBS-9632] – Convert statistics to React
  • [MBS-9699] – Convert the user account pages to React
  • [MBS-9904] – Convert the list of privileged users to React
  • [MBS-9909] – Convert report templates to React
  • [MBS-9926] – Convert entity subscribers pages to React
  • [MBS-10005] – Convert “Details” and ”Tags” tabs, for each entity, to React
  • [MBS-10007] – Convert “Add annotation” edit display to React
  • [MBS-10014] – Convert “Add area” edit display to React
  • [MBS-10015] – Convert “Add artist” edit display to React
  • [MBS-10016] – Convert “Add event” edit display to React
  • [MBS-10017] – Convert artist/cannot_split.tt to React
  • [MBS-10018] – Convert artist/special_purpose.tt to React
  • [MBS-10019] – Convert the artist and place event pages to React
  • [MBS-10026] – Convert the Labels page for Area to React
  • [MBS-10042] – Convert “Aliases” tab, for each entity, to React
  • [MBS-10046] – Convert /admin/banner/edit to React
  • [MBS-10049] – Convert user/report to React
  • [MBS-10086] – Convert attributes admin lists to React
  • [MBS-10091] – Convert root/components/relationships.tt to React

Other task

  • [MBS-8360] – Show BookBrainz relationships in the sidebar
  • [MBS-9082] – Standardize SecondHandSongs URLs
  • [MBS-9932] – Remove or update “Releases with superfluous data tracks” report
  • [MBS-9999] – Allow setting custom redirect URI while registering applications to be installed
  • [MBS-10035] – Add text to the “Report editor” page asking for links
  • [MBS-10036] – Add ccMixter.org to other database whitelist
  • [MBS-10037] – Send editor reports to MB user admin mailing list
  • [MBS-10080] – Relabel “MusicBrainz Blog” link as “MetaBrainz Blog” on MusicBrainz frontpage

Mini ListenBrainz update released today

Following up on our release from last week, we found a number of minor problems in production that were really hard to spot on our test setup. Sometimes you need to have real data flowing through your system before you can find the real problems.

The following pull requests were merged and released just now:

This should hopefully make the follow page work a little better for everyone. 🙂

Automating the voting system

MetaMetaData

For the last several years, one of the things our community has struggled with is a lack of active voters. We’ve tried to implement various measures to decrease the need for voters and load for the wonderful ones that actually do actively look through edits and help vote on them—e.g., making more edits auto‐edits and decreasing amount of time edits stay open. However, the edit queue is still quite unwieldy and as such we’ve kept trying to come up with other ways to decrease the load on our contributors.

Over the past few months since our last summit, we’ve been working on training AIs, both for recommendation engines and data analytics, and for helping out with spam, but it soon appeared that we had another valuable dataset: our history of 15,693,824 votes from 16,336 voters and 56,374,198 edits from 2,007,134 editors. It turns out that this is an unintended side-effects of the editing and voting system in that it creates a paper trail of our habits as a community and our collective mind.

A paper trail that you could, say, train a neural network on. And that’s just what we did.

By feeding data from our top voters, we’ve been able to train our network to replicate with 96.4% accuracy the personality when using the other half as test data. That figure is the average for 300 bots each based on our top 300 voters.
We were really impressed with the results but the story doesn’t stop there…

Meet BrainzVoter

The next logical step was to create our own Frankenstein’s monster. By training on 70% of our entire set of votes, we gave birth to a voting bot that represents the essence of our community. “BrainzVoter”, as we dubbed it, is precise and scores a staggering 98.9% accuracy on test data and comparing with the other 30% of our dataset.

To quote the late Terry Pratchet:

Ankh-Morpork had dallied with many forms of government and had ended up with that form of democracy known as One Man, One Vote. The Patrician was the Man; he had the Vote.

Edit filters

In view of the recent developments on net neutrality taken by the European Union with articles 11 & 13/17, MusicBrainz is taking measures to protect against copyright infringement: we’re implementing automatic edit filters. BrainzVoter will use the latest in NLP technology to understand what you, the editors, write in your edit notes, and use this understanding to vote on your edit. It will also inspect any URLs included in the edit note to cross-reference the data. The aggregate data will not be available to the public.

Edits with better and clearer notes will become more likely to pass. Consider this a good opportunity to (re‐)read How to Write Edit Notes!

How will this affect me as an editor?

Not much will change, and you can continue doing what you were doing before! We recommend that you take the time to make clear statements in your edit notes.
You will also be able to use a system of tags to express intent, using for example #typo #correction in the content of your edit text. Syntax highlighting and shortcuts will be available in the text editor.

In the end, by removing the need for humans to look over edits, the bot should give you, the editor, more time to add and edit and fix data in MusicBrainz, without having to spend time checking everyone else’s edits or worry about other editors disagreeing with yours!

After a brief trial period on MusicBrainz, this system will be adapted and also rolled out to BookBrainz.

We hope you will share our excitement for the benefits of automation and help us improve our training models over time. I, for one, welcome our AI overlords.

ListenBrainz: Our new follow page

As promised, here is another blog post about the exciting new Follow page. The goal of this page is to finally make use of the data we collect in ListenBrainz and expose a new feature designed to let our users discover more music.

To use this new feature, you’ll need to link your Spotify account to ListenBrainz. Ideally you should give permission to record your listens and to play Spotify content. But if you’re not ready to dive into recording your listens, start with playback first. N.B. In order to really take advantage of this new feature, you’ll need a premium Spotify account.

Then head over to the recent listens page and hover over the tracks that are listed there. If the user listened on Spotify, then a play button will appear and you can listen to the track. Please note that playing from this page will interrupt whatever you’re already playing on Spotify. If you find that a user is listening to interesting music and you’d like to follow the user, head to the follow page and use the Follow Users section to add this user to your follow list.

When a user in your follow list finishes listening to a track, that track will appear as a line in the Playlist. In theory, you’ll be able to keep listening to what your followed users are playing: the player will attempt to play as many tracks as it can play and to keep the music going. The player also has a previous and next track button that allows you to easily skip tracks that you don’t like. Our team has found this feature exciting and to some extent even has started DJing for each other!

We’re pushing into new territory trying to offer music discovery features and trying out new features that we’ve not seen before. Expect bugs, missing features, and reactions of “why didn’t they do X?”. To be honest, we’re not entirely happy with it and we know that there are features missing. But we felt it important to push this out in order to start getting feedback from you — and we are also excited about the Spotify integration! That said, please continue reading and if you feel that we screwed something up, please open a ticket!

Also, keep in mind that we’re pushing against the tide of the music industry. Established players want to keep everything closed, controlled and in their silo (Apple Music, Tidal, etc). Spotify is slightly more open and allows us to record user’s histories and music playback from web pages, so we focused on working on Spotify first.

This has the unfortunate side-effect of making these new features useful only if you have a premium Spotify account, and following users who are not on Spotify is useless: we don’t know how to play this content. This blows — we know it and we hate it ourselves. But we needed to start with something to show what we’re trying to do and to generate some interest. If people are interested, we can start working in supporting more services and making more of the music in our pages playable.

Finally, the recording user’s listens API endpoint at Spotify has an annoying tendency to fall behind sometimes, which means that the flow of listens from Spotify slows or stops altogether, which is… less than ideal. We’re prodding Spotify to keep the bits flowing if at all possible, but know that all of this is a work in progress.

In fact, the release has already generated a flurry of fixes that we’ll push live before too long. A lot of these sorts of fixes are for problems that you can only see when real-live data flows through the data pipelines: these are tricky features to debug!

Please play with the follow feature and tell us what you think! If you know other services that we can use to play music from the data we have available, please comment! If you find bugs or have suggestions for how we make these features better, please open a ticket!

Have fun and discover some new music,
The ListenBrainz Team