Page MenuHomePhabricator

Upgrade etherpad.wikimedia.org to v2.1.0
Open, MediumPublic

Description

Upgrade etherpad.wikimedia.org to the most recent version (v2.0.3).

The process is documented at https://wikitech.wikimedia.org/wiki/Etherpad.wikimedia.org#Upgrading_Etherpad_version

Releases since last upgrade (1.9.7)

v2.0.0

Compatibility changes

  • Socket io has been updated to 4.7.5. This means that the json.send function won't work anymore and needs to be changed to .emit('message', myObj)
  • Deprecating npm version 6 in favor of pnpm: We have made the decision to switch to the well established pnpm (https://pnpm.io/). It works by symlinking dependencies into a global directory allowing you to have a cleaner and more reliable environment.
  • Introducing Typescript to the Etherpad core: Etherpad core logic has been rewritten in Typescript allowing for compiler checking of errors.
  • Rewritten Admin Panel: The Admin panel has been rewritten in React and now features a more pleasant user experience. It now also features an integrated pad searching with sorting functionality.

Notable enhancements and fixes

  • Bugfixes
    • Live Plugin Manager: The live plugin manager caused problems when a plugin had depdendencies defined. This issue is now resolved.
  • Enhancements
    • pnpm Workspaces: In addition to pnpm we introduced workspaces. A clean way to manage multiple bounded contexts like the admin panel or the bin folder.
    • Bin folder: The bin folder has been moved from the src folder to the root folder. This change was necessary as the contained scripts do not represent core functionality of the user.
    • Starting Etherpad: Etherpad can now be started with a single command: pnpm run prod in the root directory.
    • Installing Etherpad: Etherpad no longer symlinks itself in the root directory. This is now also taken care by pnpm, and it just creates a node_modules folder with the src directory`s ep_etherpad-lite folder
    • Plugins can now be installed simply via the command: pnpm run install-plugins first-plugin second-plugin or if you want to install from path you can do: pnpm run install-plugins --path ../path-to-plugin

v2.0.1

Notable enhancements and fixes

  • Fixed a bug where a plugin depending on a scoped dependency would not install successfully.

v2.0.2

Notable enhancements and fixes

  • Fixed the locale loading in the admin panel
  • Added OAuth2.0 support for the Etherpad API. You can now log in into the Etherpad API with your admin user using OAuth2

Compatibility changes

  • The tests now require generating a token from the OAuth secret. You can find the generateJWTToken in the common.ts script for plugin endpoint updates.

v2.0.3

  • Notable enhancements and fixes
    • Added documentation for replacing apikeys with oauth2
    • Bumped live plugin manager to 0.20.0. Thanks to @fgreinacher
    • Added better documentation for using docker-compose with Etherpad

v2.1. 0

  • Notable enhancements and fixes
    • Added PWA support. You can now add your Etherpad instance to your home screen on your mobile device or desktop.
    • Fixed live plugin manager versions clashing. Thanks to @yacchin1205
    • Fixed a bug in the pad panel where pagination was not working correctly when sorting by pad name
  • Compatibility changes
    • Reintroduced APIKey.txt support. You can now switch between APIKey and OAuth2.0 authentication. This can be toggled with the setting authenticationMethod. The default is OAuth2. If you want to use the APIKey method you can set that to apikey.

Event Timeline

dzahn@packager02:~$   git clone https://gerrit.wikimedia.org/r/operations/debs/etherpad-lite
...
dzahn@packager02:~$   curl https://codeload.github.com/ether/etherpad-lite/tar.gz/2.0.2 -o 2.0.2.tar.gz
...
dzahn@packager02:~$ cd etherpad-lite/
...
dzahn@packager02:~/etherpad-lite$ git checkout upstream
...
dzahn@packager02:~/etherpad-lite$ git checkout master


dzahn@packager02:~/etherpad-lite$ gbp import-orig ../2.0.2.tar.gz
What is the upstream version? [] 2.0.2
gbp:info: Importing '../2.0.2.tar.gz' to branch 'upstream'...
gbp:info: Source package is etherpad-lite
gbp:info: Upstream version is 2.0.2
gbp:info: Replacing upstream source on 'master'
gbp:info: Successfully imported version 2.0.2 of ../2.0.2.tar.gz

...

If you are lucky, they will all apply cleanly.

Wasn't lucky:

dzahn@packager02:~/etherpad-lite$   QUILT_PATCHES=debian/patches quilt push -a
Applying patch debian/patches/remove_npm_dependency.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: etherpad-lite/src/bin/run.sh
|===================================================================
|--- etherpad-lite.orig/src/bin/run.sh
|+++ etherpad-lite/src/bin/run.sh
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch debian/patches/remove_npm_dependency.patch does not apply (enforce with -f)
LSobanski renamed this task from Upgrade etherpad.wikimedia.org to v2.0.2 to Upgrade etherpad.wikimedia.org to v2.0.3.Apr 30 2024, 10:00 AM
LSobanski updated the task description. (Show Details)
LSobanski renamed this task from Upgrade etherpad.wikimedia.org to v2.0.3 to Upgrade etherpad.wikimedia.org to v2.1.0.Mon, Jun 3, 10:39 AM
LSobanski updated the task description. (Show Details)
Jelto raised the priority of this task from Low to Medium.Mon, Jun 17, 12:40 PM
Jelto subscribed.

As discussed in T367544, the VM used for building the Etherpad Debian package will be deleted soon. Therefore, it might be sensible to attempt one last version upgrade. This would give us additional time to evaluate new systems for building and deploying Etherpad (like Kubernetes, wmf-debci or another bookworm build vm).

So I'm raising the priority a bit.