Skip to content

Commit b99c2ca

Browse files
committed
Merge branch 'develop'
2 parents ad84c8a + de394f7 commit b99c2ca

31 files changed

+544
-322
lines changed

.github/workflows/frontend-admin-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: "Frontend admin tests"
1+
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
2+
name: "Frontend admin tests powered by Sauce Labs"
23

34
on: [push]
45

.github/workflows/frontend-tests.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
name: "Frontend tests"
1+
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
2+
name: "Frontend tests powered by Sauce Labs"
23

34
on: [push]
45

@@ -35,7 +36,7 @@ jobs:
3536
run: |
3637
sed -e '/^ *"importExportRateLimiting":/,/^ *\}/ s/"max":.*/"max": 0/' -i settings.json
3738
38-
- uses: saucelabs/sauce-connect-action@v1.1.2
39+
- uses: saucelabs/sauce-connect-action@v1
3940
with:
4041
username: ${{ secrets.SAUCE_USERNAME }}
4142
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
@@ -78,6 +79,7 @@ jobs:
7879
ep_align
7980
ep_author_hover
8081
ep_cursortrace
82+
ep_embedmedia
8183
ep_font_size
8284
ep_hash_auth
8385
ep_headings2
@@ -114,7 +116,7 @@ jobs:
114116
- name: Remove standard frontend test files, so only plugin tests are run
115117
run: rm src/tests/frontend/specs/*
116118

117-
- uses: saucelabs/sauce-connect-action@v1.1.2
119+
- uses: saucelabs/sauce-connect-action@v1
118120
with:
119121
username: ${{ secrets.SAUCE_USERNAME }}
120122
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}

.github/workflows/load-test.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: sudo npm install -g etherpad-load-test
2929

3030
- name: Run load test
31-
run: src/tests/frontend/travis/runnerLoadTest.sh
31+
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
3232

3333
withplugins:
3434
# run on pushes to any branch
@@ -80,4 +80,32 @@ jobs:
8080

8181
# configures some settings and runs npm run test
8282
- name: Run load test
83-
run: src/tests/frontend/travis/runnerLoadTest.sh
83+
run: src/tests/frontend/travis/runnerLoadTest.sh 25 50
84+
85+
long:
86+
# run on pushes to any branch
87+
# run on PRs from external forks
88+
if: |
89+
(github.event_name != 'pull_request')
90+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
91+
name: long running
92+
runs-on: ubuntu-latest
93+
94+
steps:
95+
- name: Checkout repository
96+
uses: actions/checkout@v2
97+
98+
- uses: actions/setup-node@v2
99+
with:
100+
node-version: 12
101+
102+
- name: Install all dependencies and symlink for ep_etherpad-lite
103+
run: src/bin/installDeps.sh
104+
105+
- name: Install etherpad-load-test
106+
run: sudo npm install -g etherpad-load-test
107+
108+
109+
# configures some settings and runs npm run test
110+
- name: Run load test
111+
run: src/tests/frontend/travis/runnerLoadTest.sh 5000 5
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "In-place git pull from master"
2+
3+
# any branch is useful for testing before a PR is submitted
4+
on: [push, pull_request]
5+
6+
jobs:
7+
withpluginsLinux:
8+
# run on pushes to any branch
9+
# run on PRs from external forks
10+
if: |
11+
(github.event_name != 'pull_request')
12+
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
13+
name: Linux with Plugins
14+
runs-on: ubuntu-latest
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
node: [10, 12, 14, 15]
20+
21+
steps:
22+
- name: Checkout master repository
23+
uses: actions/checkout@v2
24+
with:
25+
ref: master
26+
27+
- uses: actions/setup-node@v2
28+
with:
29+
node-version: ${{ matrix.node }}
30+
31+
- name: Install Etherpad plugins
32+
# The --legacy-peer-deps flag is required to work around a bug in npm v7:
33+
# https://github.com/npm/cli/issues/2199
34+
run: >
35+
npm install --no-save --legacy-peer-deps
36+
ep_align
37+
ep_author_hover
38+
ep_cursortrace
39+
ep_font_size
40+
ep_hash_auth
41+
ep_headings2
42+
ep_image_upload
43+
ep_markdown
44+
ep_readonly_guest
45+
ep_set_title_on_pad
46+
ep_spellcheck
47+
ep_subscript_and_superscript
48+
ep_table_of_contents
49+
50+
# This must be run after installing the plugins, otherwise npm will try to
51+
# hoist common dependencies by removing them from src/node_modules and
52+
# installing them in the top-level node_modules. As of v6.14.10, npm's hoist
53+
# logic appears to be buggy, because it sometimes removes dependencies from
54+
# src/node_modules but fails to add them to the top-level node_modules. Even
55+
# if npm correctly hoists the dependencies, the hoisting seems to confuse
56+
# tools such as `npm outdated`, `npm update`, and some ESLint rules.
57+
- name: Install all dependencies and symlink for ep_etherpad-lite
58+
run: src/bin/installDeps.sh
59+
60+
- name: Run the backend tests
61+
run: cd src && npm test
62+
63+
- name: Git fetch
64+
run: git fetch
65+
66+
- name: Checkout this branch over master
67+
run: git checkout "${GITHUB_SHA}"
68+
69+
- name: Install all dependencies and symlink for ep_etherpad-lite
70+
run: src/bin/installDeps.sh
71+
72+
- name: Run the backend tests
73+
run: cd src && npm test
74+
75+
- name: Install Cypress
76+
run: npm install cypress -g
77+
78+
- name: Run Etherpad & Test Frontend
79+
run: |
80+
node src/node/server.js &
81+
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
82+
cd src/tests/frontend
83+
cypress run --spec cypress/integration/test.js --config-file cypress/cypress.json

.github/workflows/windows-zip.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,13 @@ jobs:
6565
- name: Extract Etherpad
6666
run: 7z x etherpad-lite-win.zip -oetherpad
6767

68-
- name: list
69-
run: dir etherpad
68+
- name: Install Cypress
69+
run: npm install cypress -g
7070

7171
- name: Run Etherpad
7272
run: |
7373
cd etherpad
7474
node node_modules\ep_etherpad-lite\node\server.js &
7575
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test
76+
cd src\tests\frontend
77+
cypress run --spec cypress\integration\test.js --config-file cypress\cypress.json

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# 1.8.12
2+
3+
Special mention: Thanks to Sauce Labs for additional testing tunnels to help us grow! :)
4+
5+
### Security patches
6+
7+
* Fixed a regression in v1.8.11 which caused some pad names to cause Etherpad to restart.
8+
9+
### Notable fixes
10+
11+
* Fixed a bug in the `dirty` database driver that sometimes caused Node.js to
12+
crash during shutdown and lose buffered database writes.
13+
* Fixed a regression in v1.8.8 that caused "Uncaught TypeError: Cannot read
14+
property '0' of undefined" with some plugins (#4885)
15+
* Less warnings in server console for supported element types on import.
16+
* Support Azure and other network share installations by using a
17+
more truthful relative path.
18+
19+
### Notable enhancements
20+
21+
* Dependency updates
22+
* Various Docker deployment improvements
23+
* Various new translations
24+
* Improvement of rendering of plugin hook list and error message handling
25+
126
# 1.8.11
227

328
### Notable fixes

Dockerfile

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,20 @@ ENV NODE_ENV=production
4040
#
4141
# Running as non-root enables running this image in platforms like OpenShift
4242
# that do not allow images running as root.
43-
RUN useradd --uid 5001 --create-home etherpad
44-
45-
RUN mkdir /opt/etherpad-lite && chown etherpad:0 /opt/etherpad-lite
43+
#
44+
# If any of the following args are set to the empty string, default
45+
# values will be chosen.
46+
ARG EP_HOME=
47+
ARG EP_UID=5001
48+
ARG EP_GID=0
49+
ARG EP_SHELL=
50+
RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
51+
useradd --system ${EP_UID:+--uid "${EP_UID}" --non-unique} --gid etherpad \
52+
${EP_HOME:+--home-dir "${EP_HOME}"} --create-home \
53+
${EP_SHELL:+--shell "${EP_SHELL}"} etherpad
54+
55+
ARG EP_DIR=/opt/etherpad-lite
56+
RUN mkdir -p "${EP_DIR}" && chown etherpad:etherpad "${EP_DIR}"
4657

4758
# install abiword for DOC/PDF/ODT export
4859
RUN [ -z "${INSTALL_ABIWORD}" ] || (apt update && apt -y install abiword && apt clean && rm -rf /var/lib/apt/lists/*)
@@ -53,24 +64,20 @@ RUN [ -z "${INSTALL_SOFFICE}" ] || (apt update && mkdir -p /usr/share/man/man1 &
5364

5465
USER etherpad
5566

56-
WORKDIR /opt/etherpad-lite
67+
WORKDIR "${EP_DIR}"
5768

58-
COPY --chown=etherpad:0 ./ ./
69+
COPY --chown=etherpad:etherpad ./ ./
5970

6071
# install node dependencies for Etherpad
6172
RUN src/bin/installDeps.sh && \
6273
rm -rf ~/.npm/_cacache
6374

64-
# Install the plugins, if ETHERPAD_PLUGINS is not empty.
65-
#
66-
# Bash trick: in the for loop ${ETHERPAD_PLUGINS} is NOT quoted, in order to be
67-
# able to split at spaces.
68-
RUN for PLUGIN_NAME in ${ETHERPAD_PLUGINS}; do npm install "${PLUGIN_NAME}" || exit 1; done
75+
RUN [ -z "${ETHERPAD_PLUGINS}" ] || npm install ${ETHERPAD_PLUGINS}
6976

7077
# Copy the configuration file.
71-
COPY --chown=etherpad:0 ./settings.json.docker /opt/etherpad-lite/settings.json
78+
COPY --chown=etherpad:etherpad ./settings.json.docker "${EP_DIR}"/settings.json
7279

73-
# Fix permissions for root group
80+
# Fix group permissions
7481
RUN chmod -R g=u .
7582

7683
EXPOSE 9001

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Etherpad is extremely flexible providing you the means to modify it to solve wha
2323

2424
### Testing
2525
[![Backend tests](https://github.com/ether/etherpad-lite/actions/workflows/backend-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/backend-tests.yml) [![Simulated Load](https://github.com/ether/etherpad-lite/actions/workflows/load-test.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/load-test.yml) [![Rate Limit](https://github.com/ether/etherpad-lite/actions/workflows/rate-limit.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/rate-limit.yml) [![Windows Zip](https://github.com/ether/etherpad-lite/actions/workflows/windows-zip.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/windows-zip.yml) [![Docker file](https://github.com/ether/etherpad-lite/actions/workflows/dockerfile.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/dockerfile.yml)
26-
[![Frontend admin tests](https://github.com/ether/etherpad-lite/actions/workflows/frontend-admin-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/frontend-admin-tests.yml) [![Frontend tests](https://github.com/ether/etherpad-lite/actions/workflows/frontend-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/frontend-tests.yml) [![Windows Installer](https://github.com/ether/etherpad-lite/actions/workflows/windows-installer.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/windows-installer.yml)
26+
[![Frontend admin tests powered by Sauce Labs](https://github.com/ether/etherpad-lite/actions/workflows/frontend-admin-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/frontend-admin-tests.yml) [![Frontend tests powered by Sauce Labs](https://github.com/ether/etherpad-lite/actions/workflows/frontend-tests.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/frontend-tests.yml) [![Sauce Test Status](https://saucelabs.com/buildstatus/etherpad.svg)](https://saucelabs.com/u/etherpad) [![Windows Installer](https://github.com/ether/etherpad-lite/actions/workflows/windows-installer.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/windows-installer.yml)
2727

2828
### Engagement
29-
<a href="https://hub.docker.com/r/etherpad/etherpad"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/etherpad/etherpad?color=%2344b492"></a> ![Discord](https://img.shields.io/discord/741309013593030667?color=%2344b492) ![Etherpad plugins](https://img.shields.io/endpoint?url=https%3A%2F%2Fstatic.etherpad.org%2Fshields.json&color=%2344b492 "Etherpad plugins") ![Languages](https://img.shields.io/static/v1?label=Languages&message=105&color=%2344b492) ![Translation Coverage](https://img.shields.io/static/v1?label=Languages&message=98%&color=%2344b492)
29+
<a href="https://hub.docker.com/r/etherpad/etherpad"><img alt="Docker Pulls" src="https://img.shields.io/docker/pulls/etherpad/etherpad?color=%2344b492"></a> [![Discord](https://img.shields.io/discord/741309013593030667?color=%2344b492)](https://discord.com/invite/daEjfhw) [![Etherpad plugins](https://img.shields.io/endpoint?url=https%3A%2F%2Fstatic.etherpad.org%2Fshields.json&color=%2344b492 "Etherpad plugins")](https://static.etherpad.org/index.html) ![Languages](https://img.shields.io/static/v1?label=Languages&message=105&color=%2344b492) ![Translation Coverage](https://img.shields.io/static/v1?label=Languages&message=98%&color=%2344b492)
3030

3131
# Installation
3232

src/bin/plugins/stalePlugins.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
// Returns a list of stale plugins and their authors email
4+
5+
const superagent = require('superagent');
6+
const currentTime = new Date();
7+
8+
(async() => {
9+
const res = await superagent.get('https://static.etherpad.org/plugins.full.json');
10+
const plugins = JSON.parse(res.text);
11+
for (const plugin of Object.keys(plugins)) {
12+
const name = plugins[plugin].data.name;
13+
const date = new Date(plugins[plugin].time);
14+
const diffTime = Math.abs(currentTime - date);
15+
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
16+
if (diffDays > (365*2)) {
17+
console.log(`${name}, ${plugins[plugin].data.maintainers[0].email}`)
18+
}
19+
}
20+
})();

src/locales/sl.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
"Upwinxp"
1010
]
1111
},
12+
"admin_plugins.description": "Opis",
1213
"admin_plugins.last-update": "Zadnja posodobitev",
1314
"admin_plugins.name": "Ime",
1415
"admin_plugins.version": "Različica",
1516
"admin_settings": "Nastavitve",
17+
"admin_settings.current_save.value": "Shrani nastavitve",
1618
"index.newPad": "Nov dokument",
1719
"index.createOpenPad": "ali pa ustvari/odpri dokument z imenom:",
1820
"pad.toolbar.bold.title": "Krepko (Ctrl-B)",

0 commit comments

Comments
 (0)