From 8d55ebc66297b8bf43649a7c4be097ed64341478 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Wed, 19 Apr 2023 15:15:31 +0100 Subject: [PATCH] Merge pull request #12706 from overleaf/bg-rollback-broken-node-18-services rollback broken node 18 services GitOrigin-RevId: 7aa84d0cc864474d00fe881db100a4c6ec7d798c --- services/clsi/.nvmrc | 2 +- services/clsi/Dockerfile | 2 +- services/clsi/buildscript.txt | 2 +- services/document-updater/.nvmrc | 2 +- services/document-updater/Dockerfile | 2 +- services/document-updater/buildscript.txt | 2 +- services/document-updater/docker-compose.yml | 4 ++-- services/history-v1/.nvmrc | 2 +- services/history-v1/Dockerfile | 2 +- services/history-v1/buildscript.txt | 2 +- services/history-v1/docker-compose.yml | 4 ++-- services/project-history/.nvmrc | 2 +- services/project-history/Dockerfile | 2 +- services/project-history/buildscript.txt | 2 +- services/project-history/docker-compose.yml | 4 ++-- services/spelling/.nvmrc | 2 +- services/spelling/Dockerfile | 2 +- services/spelling/buildscript.txt | 2 +- services/spelling/install_deps.sh | 10 +++++++-- .../spelling/test/acceptance/js/CheckTest.js | 21 +------------------ 20 files changed, 30 insertions(+), 43 deletions(-) diff --git a/services/clsi/.nvmrc b/services/clsi/.nvmrc index 6d80269a4f..c85fa1bbef 100644 --- a/services/clsi/.nvmrc +++ b/services/clsi/.nvmrc @@ -1 +1 @@ -18.16.0 +16.17.1 diff --git a/services/clsi/Dockerfile b/services/clsi/Dockerfile index f61085761b..1b773d9ad7 100644 --- a/services/clsi/Dockerfile +++ b/services/clsi/Dockerfile @@ -2,7 +2,7 @@ # Instead run bin/update_build_scripts from # https://github.com/overleaf/internal/ -FROM node:18.16.0 as base +FROM node:16.17.1 as base WORKDIR /overleaf/services/clsi COPY services/clsi/install_deps.sh /overleaf/services/clsi/ diff --git a/services/clsi/buildscript.txt b/services/clsi/buildscript.txt index e03a1acb5d..b1abcffac9 100644 --- a/services/clsi/buildscript.txt +++ b/services/clsi/buildscript.txt @@ -5,6 +5,6 @@ clsi --env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true" --env-pass-through=TEXLIVE_IMAGE --has-custom-cloudbuild=True ---node-version=18.16.0 +--node-version=16.17.1 --public-repo=True --script-version=4.1.0 diff --git a/services/document-updater/.nvmrc b/services/document-updater/.nvmrc index 6d80269a4f..c85fa1bbef 100644 --- a/services/document-updater/.nvmrc +++ b/services/document-updater/.nvmrc @@ -1 +1 @@ -18.16.0 +16.17.1 diff --git a/services/document-updater/Dockerfile b/services/document-updater/Dockerfile index aa5a6015eb..fd460d5153 100644 --- a/services/document-updater/Dockerfile +++ b/services/document-updater/Dockerfile @@ -2,7 +2,7 @@ # Instead run bin/update_build_scripts from # https://github.com/overleaf/internal/ -FROM node:18.16.0 as base +FROM node:16.17.1 as base WORKDIR /overleaf/services/document-updater diff --git a/services/document-updater/buildscript.txt b/services/document-updater/buildscript.txt index b4ceb54d7e..28c5cf434d 100644 --- a/services/document-updater/buildscript.txt +++ b/services/document-updater/buildscript.txt @@ -3,6 +3,6 @@ document-updater --docker-repos=gcr.io/overleaf-ops --env-add= --env-pass-through= ---node-version=18.16.0 +--node-version=16.17.1 --public-repo=True --script-version=4.1.0 diff --git a/services/document-updater/docker-compose.yml b/services/document-updater/docker-compose.yml index 51f7fa0205..23e2797aa5 100644 --- a/services/document-updater/docker-compose.yml +++ b/services/document-updater/docker-compose.yml @@ -6,7 +6,7 @@ version: "2.3" services: test_unit: - image: node:18.16.0 + image: node:16.17.1 volumes: - .:/overleaf/services/document-updater - ../../node_modules:/overleaf/node_modules @@ -20,7 +20,7 @@ services: user: node test_acceptance: - image: node:18.16.0 + image: node:16.17.1 volumes: - .:/overleaf/services/document-updater - ../../node_modules:/overleaf/node_modules diff --git a/services/history-v1/.nvmrc b/services/history-v1/.nvmrc index 6d80269a4f..c85fa1bbef 100644 --- a/services/history-v1/.nvmrc +++ b/services/history-v1/.nvmrc @@ -1 +1 @@ -18.16.0 +16.17.1 diff --git a/services/history-v1/Dockerfile b/services/history-v1/Dockerfile index e5ca3edb27..6a89ff890a 100644 --- a/services/history-v1/Dockerfile +++ b/services/history-v1/Dockerfile @@ -2,7 +2,7 @@ # Instead run bin/update_build_scripts from # https://github.com/overleaf/internal/ -FROM node:18.16.0 as base +FROM node:16.17.1 as base WORKDIR /overleaf/services/history-v1 diff --git a/services/history-v1/buildscript.txt b/services/history-v1/buildscript.txt index 622247a330..a0f67d781a 100644 --- a/services/history-v1/buildscript.txt +++ b/services/history-v1/buildscript.txt @@ -3,6 +3,6 @@ history-v1 --docker-repos=gcr.io/overleaf-ops --env-add= --env-pass-through= ---node-version=18.16.0 +--node-version=16.17.1 --public-repo=False --script-version=4.1.0 diff --git a/services/history-v1/docker-compose.yml b/services/history-v1/docker-compose.yml index d440d14433..8ba1f14b34 100644 --- a/services/history-v1/docker-compose.yml +++ b/services/history-v1/docker-compose.yml @@ -6,7 +6,7 @@ version: "2.3" services: test_unit: - image: node:18.16.0 + image: node:16.17.1 volumes: - .:/overleaf/services/history-v1 - ../../node_modules:/overleaf/node_modules @@ -20,7 +20,7 @@ services: user: node test_acceptance: - image: node:18.16.0 + image: node:16.17.1 volumes: - .:/overleaf/services/history-v1 - ../../node_modules:/overleaf/node_modules diff --git a/services/project-history/.nvmrc b/services/project-history/.nvmrc index 6d80269a4f..c85fa1bbef 100644 --- a/services/project-history/.nvmrc +++ b/services/project-history/.nvmrc @@ -1 +1 @@ -18.16.0 +16.17.1 diff --git a/services/project-history/Dockerfile b/services/project-history/Dockerfile index b26570e085..ebce9db91f 100644 --- a/services/project-history/Dockerfile +++ b/services/project-history/Dockerfile @@ -2,7 +2,7 @@ # Instead run bin/update_build_scripts from # https://github.com/overleaf/internal/ -FROM node:18.16.0 as base +FROM node:16.17.1 as base WORKDIR /overleaf/services/project-history diff --git a/services/project-history/buildscript.txt b/services/project-history/buildscript.txt index 2559100172..5cb01f49ea 100644 --- a/services/project-history/buildscript.txt +++ b/services/project-history/buildscript.txt @@ -3,6 +3,6 @@ project-history --docker-repos=gcr.io/overleaf-ops --env-add= --env-pass-through= ---node-version=18.16.0 +--node-version=16.17.1 --public-repo=False --script-version=4.1.0 diff --git a/services/project-history/docker-compose.yml b/services/project-history/docker-compose.yml index d2851345b9..3444430bcf 100644 --- a/services/project-history/docker-compose.yml +++ b/services/project-history/docker-compose.yml @@ -6,7 +6,7 @@ version: "2.3" services: test_unit: - image: node:18.16.0 + image: node:16.17.1 volumes: - .:/overleaf/services/project-history - ../../node_modules:/overleaf/node_modules @@ -20,7 +20,7 @@ services: user: node test_acceptance: - image: node:18.16.0 + image: node:16.17.1 volumes: - .:/overleaf/services/project-history - ../../node_modules:/overleaf/node_modules diff --git a/services/spelling/.nvmrc b/services/spelling/.nvmrc index 6d80269a4f..c85fa1bbef 100644 --- a/services/spelling/.nvmrc +++ b/services/spelling/.nvmrc @@ -1 +1 @@ -18.16.0 +16.17.1 diff --git a/services/spelling/Dockerfile b/services/spelling/Dockerfile index 9dbe01d4e3..e942dfa27b 100644 --- a/services/spelling/Dockerfile +++ b/services/spelling/Dockerfile @@ -2,7 +2,7 @@ # Instead run bin/update_build_scripts from # https://github.com/overleaf/internal/ -FROM node:18.16.0 as base +FROM node:16.17.1 as base WORKDIR /overleaf/services/spelling COPY services/spelling/install_deps.sh /overleaf/services/spelling/ diff --git a/services/spelling/buildscript.txt b/services/spelling/buildscript.txt index 4ef4e95ae6..8b3c1263d2 100644 --- a/services/spelling/buildscript.txt +++ b/services/spelling/buildscript.txt @@ -4,6 +4,6 @@ spelling --docker-repos=gcr.io/overleaf-ops --env-add= --env-pass-through= ---node-version=18.16.0 +--node-version=16.17.1 --public-repo=False --script-version=4.1.0 diff --git a/services/spelling/install_deps.sh b/services/spelling/install_deps.sh index e0b696e38e..559641bcf0 100644 --- a/services/spelling/install_deps.sh +++ b/services/spelling/install_deps.sh @@ -3,7 +3,7 @@ set -ex # Prefer Debian packages over Ubuntu packages -echo 'APT::Default-Release "bullseye";' >/etc/apt/apt.conf.d/default-release +echo 'APT::Default-Release "buster";' >/etc/apt/apt.conf.d/default-release # The following aspell packages exist in Ubuntu but not Debian: # aspell-af, aspell-id, aspell-nr, aspell-ns, aspell-st, aspell-tn, aspell-ts, aspell-xh @@ -11,5 +11,11 @@ echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main universe" > echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main universe" > /etc/apt/sources.list.d/focal-ports-arm.list apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 +# aspell-pt-pt is broken in buster, we'll obtain it from bullseye +echo "deb http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list.d/bullseye.list + apt-get update -apt-get install -y aspell aspell-en aspell-af aspell-ar aspell-ar-large aspell-bg aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-1901 aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-hr aspell-hsb aspell-id aspell-it aspell-kk aspell-ku aspell-lt aspell-lv aspell-nl aspell-no aspell-nr aspell-ns aspell-pa aspell-pl aspell-pt-br aspell-pt-pt aspell-ro aspell-ru aspell-sk aspell-sl aspell-st aspell-sv aspell-tl aspell-tn aspell-ts aspell-xh +apt-get install -y aspell aspell-en aspell-af aspell-ar aspell-ar-large aspell-bg aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-1901 aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-hr aspell-hsb aspell-id aspell-it aspell-kk aspell-ku aspell-lt aspell-lv aspell-nl aspell-no aspell-nr aspell-ns aspell-pa aspell-pl aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-st aspell-sv aspell-tl aspell-tn aspell-ts aspell-xh + +# aspell-pt-pt is broken in buster. Install it from bullseye +apt-get install -y -t bullseye aspell-pt-pt diff --git a/services/spelling/test/acceptance/js/CheckTest.js b/services/spelling/test/acceptance/js/CheckTest.js index 2e05a98692..0096209068 100644 --- a/services/spelling/test/acceptance/js/CheckTest.js +++ b/services/spelling/test/acceptance/js/CheckTest.js @@ -27,26 +27,7 @@ describe('checking words', function () { it('should return the list of misspellings', async function () { const body = JSON.parse(response.body) expect(body).to.deep.equal({ - misspellings: [ - { - index: 0, - suggestions: [ - 'anther', - 'another', - 'anthers', - 'panther', - 'anathema', - 'anthem', - 'nether', - "anther's", - 'ante', - 'neither', - 'norther', - 'ether', - 'other', - ], - }, - ], + misspellings: [{ index: 0, suggestions: ['anther', 'another'] }], }) }) })