From 1fd4deb76de2927e5819ae549528773304fca628 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 23 Sep 2024 08:34:27 -0700 Subject: [PATCH] Update Etherpad to v2.2.5 After the 2.2.4 release we upgraded to a development commit between 2.2.4 and the future (at that time non existant) 2.2.5 release to fix integration between meetpad and etherpad. Now there is a proper 2.2.5 and we should update to get off the dev commit. This release fixes a number of bugs, updates dependencies, and adds proper swagger documentation for the API. The "complete" changelog can be seen here: https://github.com/ether/etherpad-lite/blob/v2.2.5/CHANGELOG.md Note that I don't believe the API has changed they are merely documenting it properly using swagger. Our testing should confirm. To expose the new swagger documentation we do add /api-docs/ and /api-docs.json to our proxy exclusion list. We also update our settings.json files to sync with upstream. This pulls in a new `updateServer` key value pair to set the location that should be checked by etherpad to determine if there is a newer version available. I believe this behavior has existing for years they are just now making it a bit more configurable. Unfortunately the way this value is used I think we will do a local file lookup if we set the value to "". I've stuck with the default since this shouldn't be a regression and we can try to disable it later. Change-Id: I73a09a0c79db18887cb1703c84f9aebae6f072eb --- docker/etherpad/Dockerfile | 10 ++-------- docker/etherpad/settings.json.docker | 17 +++++++++++++++++ .../roles/etherpad/templates/etherpad.vhost.j2 | 2 ++ .../roles/etherpad/templates/settings.json.j2 | 16 ++++++++++++++++ zuul.d/docker-images/etherpad.yaml | 2 +- 5 files changed, 38 insertions(+), 9 deletions(-) diff --git a/docker/etherpad/Dockerfile b/docker/etherpad/Dockerfile index cfa867c13f..82dc01c9f2 100644 --- a/docker/etherpad/Dockerfile +++ b/docker/etherpad/Dockerfile @@ -42,10 +42,7 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ rm -rf /var/lib/apt/lists/* RUN npm install -g pnpm@9.0.4 RUN git clone https://github.com/ether/etherpad-lite ${EP_DIR} -# This is a commit after v2.2.4 and before 2.2.5. -# We check this out to pickup a fix for embedding etherpad as -# we do with meetpad. -RUN git checkout 08f199178d2932cc0ec956aaeb3f62e8a535598a +RUN git checkout v2.2.5 RUN pnpm install RUN pnpm run build:ui @@ -152,10 +149,7 @@ USER etherpad RUN git clone https://github.com/ether/etherpad-lite ${EP_DIR} WORKDIR "${EP_DIR}" -# This is a commit after v2.2.4 and before 2.2.5. -# We check this out to pickup a fix for embedding etherpad as -# we do with meetpad. -RUN git checkout 08f199178d2932cc0ec956aaeb3f62e8a535598a +RUN git checkout v2.2.5 FROM build AS development ARG ETHERPAD_PLUGINS diff --git a/docker/etherpad/settings.json.docker b/docker/etherpad/settings.json.docker index bbe96fc519..da1d51c13a 100644 --- a/docker/etherpad/settings.json.docker +++ b/docker/etherpad/settings.json.docker @@ -171,6 +171,14 @@ */ "showSettingsInAdminPage": "${SHOW_SETTINGS_IN_ADMIN_PAGE:true}", + /* + * Settings for cleanup of pads + */ + "cleanup": { + "enabled": false, + "keepRevisions": 5 + }, + /* The authentication method used by the server. The default value is sso @@ -194,6 +202,15 @@ }, */ + + /* + * Enables the use of a different server. We have a different one that syncs changes from the original server. + * It is hosted on GitHub and should not be blocked by many firewalls. + * https://etherpad.org/ep_infos + */ + + "updateServer": "https://etherpad.org/ep_infos", + /* * The type of the database. * diff --git a/playbooks/roles/etherpad/templates/etherpad.vhost.j2 b/playbooks/roles/etherpad/templates/etherpad.vhost.j2 index 0550cb0c1c..da63ee2f83 100644 --- a/playbooks/roles/etherpad/templates/etherpad.vhost.j2 +++ b/playbooks/roles/etherpad/templates/etherpad.vhost.j2 @@ -80,6 +80,8 @@ RewriteCond %{REQUEST_URI} !^/timeSliderBootstrap-.*\.min\.js$ RewriteCond %{REQUEST_URI} !^/indexBootstrap-.*\.min\.js$ RewriteCond %{REQUEST_URI} !^/api/ + RewriteCond %{REQUEST_URI} !^/api-docs/ + RewriteCond %{REQUEST_URI} !^/api-docs.json RewriteCond %{REQUEST_URI} !^/ro/ RewriteCond %{REQUEST_URI} !^/error/ RewriteCond %{REQUEST_URI} !^/jserror diff --git a/playbooks/roles/etherpad/templates/settings.json.j2 b/playbooks/roles/etherpad/templates/settings.json.j2 index 40174c1c56..342d12d500 100644 --- a/playbooks/roles/etherpad/templates/settings.json.j2 +++ b/playbooks/roles/etherpad/templates/settings.json.j2 @@ -166,6 +166,14 @@ */ "showSettingsInAdminPage": true, + /* + * Settings for cleanup of pads + */ + "cleanup": { + "enabled": false, + "keepRevisions": 5 + }, + /* * Node native SSL support * @@ -279,6 +287,14 @@ "pageDown": true }, + /* + * Enables the use of a different server. We have a different one that syncs changes from the original server. + * It is hosted on GitHub and should not be blocked by many firewalls. + * https://etherpad.org/ep_infos + */ + + "updateServer": "https://etherpad.org/ep_infos", + /* * Should we suppress errors from being visible in the default Pad Text? */ diff --git a/zuul.d/docker-images/etherpad.yaml b/zuul.d/docker-images/etherpad.yaml index 9e0c87523f..daee989bff 100644 --- a/zuul.d/docker-images/etherpad.yaml +++ b/zuul.d/docker-images/etherpad.yaml @@ -11,7 +11,7 @@ repository: opendevorg/etherpad tags: - latest - - v2.2.4.dev17 + - v2.2.5 build_args: - EP_GID=5001 files: ðerpad_files