Skip to content

v4.0.0

Compare
Choose a tag to compare
@Gargron Gargron released this 14 Nov 19:48
· 3793 commits to main since this release
fb389bd

Mastodon

Upgrade overview

This release contains upgrade notes that deviate from the norm:

ℹ️ Requires two-step database migration process for zero-downtime deployment
ℹ️ Some migrations may take a long time to run
ℹ️ Behaviour of AUTHORIZED_FETCH changed
ℹ️ Requires review of Sidekiq queues in some setups (new queue: ingress)
ℹ️ Some server settings, like thumbnail, short description, and so on, changed and may need to be looked at

For more information, scroll down to the upgrade instructions section.

Changelog

Some of the features in this release have been funded through the NGI0 Discovery Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825322.

Added

Changed

Removed

  • Remove setting that disables account deletes (Gargron)
  • Remove digest e-mails (Gargron)
  • Remove unnecessary sections from welcome e-mail (Gargron)
  • Remove item titles from RSS feeds (Gargron)
  • Remove volume number from hashtags in web UI (Gargron)
  • Remove Nanobox configuration (tonyjiang)

Fixed

  • Fix rules with same priority being sorted non-deterministically (Gargron)
  • Fix error when invalid domain name is submitted (Gargron)
  • Fix icons having an image role (Gargron)
  • Fix connections to IPv6-only servers (ClearlyClaire)
  • Fix unnecessary service worker registration and preloading when logged out in web UI (ClearlyClaire)
  • Fix unnecessary and slow regex construction (raggi)
  • Fix mailers queue not being used for mailers (Gargron)
  • Fix error in webfinger redirect handling (ClearlyClaire)
  • Fix report category not being set to violation if rule IDs are provided (trwnh)
  • Fix nodeinfo metadata attribute being an array instead of an object (ClearlyClaire)
  • Fix account endorsements not being idempotent (trwnh)
  • Fix status and rule IDs not being strings in admin reports REST API (trwnh)
  • Fix error on invalid replies_policy in REST API (trwnh)
  • Fix redrafting a currently-editing post not leaving edit mode in web UI (ClearlyClaire)
  • Fix performance by avoiding method cache busts (raggi)
  • Fix opening the language picker scrolling the single-column view to the top in web UI (ClearlyClaire)
  • Fix content warning button missing aria-expanded attribute in web UI (ClearlyClaire)
  • Fix redundant aria-pressed attributes in web UI (Brawaru)
  • Fix crash when external auth provider has no display name set (ClearlyClaire)
  • Fix followers count not being updated when migrating follows (ClearlyClaire)
  • Fix double button to clear emoji search input in web UI (sunny)
  • Fix missing null check on applications on strike disputes (kescherCode)
  • Fix featured tags not saving preferred casing (Gargron)
  • Fix language not being saved when editing status (Gargron)
  • Fix not being able to input featured tag with hash symbol (Gargron)
  • Fix user clean-up scheduler crash when an unconfirmed account has a moderation note (ClearlyClaire)
  • Fix being unable to withdraw follow request when confirmation modal is disabled in web UI (ClearlyClaire)
  • Fix inaccurate admin log entry for re-sending confirmation e-mails (ClearlyClaire)
  • Fix edits not being immediately reflected (ClearlyClaire)
  • Fix bookmark import stopping at the first failure (ClearlyClaire)
  • Fix account action type validation (Gargron)
  • Fix upload progress not communicating processing phase in web UI (Gargron)
  • Fix wrong host being used for custom.css when asset host configured (Gargron)
  • Fix account migration form ever using outdated account data (Gargron, nightpool)
  • Fix error when uploading malformed CSV import (Gargron)
  • Fix avatars not using image tags in web UI (Gargron)
  • Fix handling of duplicate and out-of-order notifications in web UI (ClearlyClaire)
  • Fix reblogs being discarded after the reblogged status (ClearlyClaire)
  • Fix indexing scheduler trying to index when Elasticsearch is disabled (Gargron)
  • Fix n+1 queries when rendering initial state JSON (Gargron)
  • Fix n+1 query during status removal (Gargron)
  • Fix OCR not working due to Content Security Policy in web UI (prplecake)
  • Fix nofollow rel being removed in web UI (Gargron)
  • Fix language dropdown causing zoom on mobile devices in web UI (Gargron)
  • Fix button to dismiss suggestions not showing up in search results in web UI (ClearlyClaire)
  • Fix language dropdown sometimes not appearing in web UI (Gargron)
  • Fix quickly switching notification filters resulting in empty or incorrect list in web UI (ClearlyClaire, ClearlyClaire)
  • Fix media modal link button in web UI (ClearlyClaire)
  • Fix error upon successful account migration (Gargron)
  • Fix negatives values in search index causing queries to fail (Gargron, Gargron)
  • Fix error when searching for invalid URL (ClearlyClaire)
  • Fix IP blocks not having a unique index (Gargron)
  • Fix remote account in contact account setting not being used (Gargron)
  • Fix swallowing mentions of unconfirmed/unapproved users (ClearlyClaire)
  • Fix incorrect and slow cache invalidation when blocking domain and removing media attachments (ClearlyClaire)
  • Fix HTTPs redirect behaviour when running as I2P service (gi-yt)
  • Fix deleted pinned posts potentially counting towards the pinned posts limit (ClearlyClaire)
  • Fix compatibility with OpenSSL 3.0 (ClearlyClaire)
  • Fix error when a remote report includes a private post the server has no access to (ClearlyClaire)
  • Fix suspicious sign-in mails never being sent (ClearlyClaire)
  • Fix fallback locale when somehow user's locale is an empty string (tribela)
  • Fix avatar/header not being deleted locally when deleted on remote account (tribela)
  • Fix missing , in Blurhash validation (noellabo)
  • Fix order by most recent not working for relationships page in admin UI (tribela)
  • Fix uncaught error when invalid date is supplied to API (Gargron)
  • Fix REST API sometimes returning HTML on error (ClearlyClaire)
  • Fix ambiguous column names in tootctl media refresh (tribela)
  • Fix ambiguous column names in tootctl search deploy (mashirozx)
  • Fix CDN_HOST not being used in some asset URLs (tribela)
  • Fix CAS_DISPLAY_NAME, SAML_DISPLAY_NAME and OIDC_DISPLAY_NAME being ignored (ClearlyClaire)
  • Fix various typos in comments throughout the codebase (luzpaz)
  • Fix CSV import error when rows include unicode characters (HamptonMakes)

Security

  • Fix being able to spoof link verification (Gargron)
  • Fix emoji substitution not applying only to text nodes in backend code (ClearlyClaire)
  • Fix emoji substitution not applying only to text nodes in web UI (ClearlyClaire)
  • Fix rate limiting for paths with formats (Gargron)
  • Fix out-of-bound reads in blurhash transcoder (delroth)

Upgrade notes

To get the code for v4.0.0, use git fetch && git checkout v4.0.0.

As always, make sure you have backups of the database before performing any upgrades. If you are using docker-compose, this is how a backup command might look: docker exec mastodon_db_1 pg_dump -Fc -U postgres postgres > name_of_the_backup.dump

Update steps

The following instructions are for updating from 3.5.3.

If you are upgrading directly from an earlier release, please carefully read the upgrade notes for the skipped releases as well, as they often require extra steps such as database migrations.

Non-Docker only:

  • The recommended Ruby version has been bumped to 3.0.4. You can upgrade, or you can continue using the old version by overwriting the .ruby-version file with e.g. 3.0.3 which was recommended previously. The minimum version you can use is 2.7.
  • The minimum Node.js version has been bumped to 14.
  • Install dependencies: bundle install and yarn install

Both Docker and non-Docker:

⚠️ Incoming federated activity now uses a new ingress queue in Sidekiq. This allows better management of the workload and e.g. prioritizing user experience of local users even if there is a lot of incoming federation activity. If you customize Sidekiq processes/queues or use an old version of the mastodon-sidekiq.service file, ensure that there is at least one process handling the ingress queue.

ℹ️ The AUTHORIZED_FETCH option no longer affects the REST API to allow the web app to function properly for logged out users. The information available through the REST API was previously available on HTML pages. To restore previous behaviour, use new environment variable DISALLOW_UNAUTHENTICATED_API_ACCESS.

ℹ️ Server thumbnails are now post-processed. Extended description now supports Markdown. Short description no longer supports any markup and is limited by 200 characters. All this is to ensure that your server's information is correctly and consistently rendered in native apps, OpenGraph previews, joinmastodon.org (if submitted), and the web app.

ℹ️ Media upload of images and animated GIFs are now processed differently. Make sure your installed systemd service files (mastodon-web.service, mastodon-sidekiq.service and mastodon-streaming.service) are up to date, or you may experience failures when uploading some media files.

  1. Run the pre-deployment database migrations by specifying the SKIP_POST_DEPLOYMENT_MIGRATIONS=true environment variable:
    • Non-Docker: SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate
    • Docker: docker-compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true web rails db:migrate
  2. Precompile the assets:
    • Non-Docker: RAILS_ENV=production bundle exec rails assets:precompile
    • Docker: The assets are already precompiled during the build step
  3. Restart all Mastodon processes
  4. Now that the new code is running, we can finish the database migrations. This will run the post-deployment ones:
    • Non-Docker: RAILS_ENV=production bundle exec rails db:migrate
    • Docker: docker-compose run --rm web rails db:migrate
  5. Restart all Mastodon processes