Merge pull request #7766 from overleaf/jpa-em-clsi-node-16

[clsi] upgrade node docker image to upstream version 16

GitOrigin-RevId: 1f7a7ef67c94fd83a2df1061350ba52b8d01e640
This commit is contained in:
Jakob Ackermann 2022-04-26 14:29:42 +01:00 committed by Copybot
parent 5ed9987345
commit e1b07cd40a
7 changed files with 20 additions and 7 deletions

View file

@ -1 +1 @@
14.18.3 16.14.2

View file

@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # https://github.com/sharelatex/sharelatex-dev-environment
FROM gcr.io/overleaf-ops/node:14.18.3 as base FROM node:16.14.2 as base
WORKDIR /overleaf/services/clsi WORKDIR /overleaf/services/clsi
COPY services/clsi/install_deps.sh /overleaf/services/clsi/ COPY services/clsi/install_deps.sh /overleaf/services/clsi/

View file

@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) gcr.io/overleaf-ops/node:14.18.3 npm run --silent RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format: format:
$(RUN_LINTING) format $(RUN_LINTING) format

View file

@ -5,7 +5,6 @@ clsi
--env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true" --env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true"
--env-pass-through=TEXLIVE_IMAGE --env-pass-through=TEXLIVE_IMAGE
--has-custom-cloudbuild=True --has-custom-cloudbuild=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0

View file

@ -8,3 +8,17 @@ apt-get install -y \
ghostscript \ ghostscript \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Allow ImageMagick to process PDF files. This is for tests only, but since we
# use the production images for tests, this will apply to production as well.
patch /etc/ImageMagick-6/policy.xml <<EOF
--- old.xml 2022-03-23 09:16:03.985433900 -0400
+++ new.xml 2022-03-23 09:16:18.625471992 -0400
@@ -91,6 +91,5 @@
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
- <policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
</policymap>
EOF

View file

@ -28,7 +28,7 @@ function test(hashType, filePath, callback) {
ContentCacheManager.update(dir, filePath, x => { ContentCacheManager.update(dir, filePath, x => {
const t2 = process.hrtime.bigint() const t2 = process.hrtime.bigint()
const warm = Number(t2 - t1) / 1e6 const warm = Number(t2 - t1) / 1e6
fs.rmdir(dir, { recursive: true }, err => { fs.rm(dir, { recursive: true, force: true }, err => {
if (err) { if (err) {
return callback(err) return callback(err)
} }

View file

@ -40,7 +40,7 @@ describe('ContentCacheManager', function () {
}) })
before(async function () { before(async function () {
await fs.promises.rmdir(contentDir, { recursive: true }) await fs.promises.rm(contentDir, { recursive: true, force: true })
await fs.promises.mkdir(contentDir, { recursive: true }) await fs.promises.mkdir(contentDir, { recursive: true })
await fs.promises.mkdir(Path.dirname(pdfPath), { recursive: true }) await fs.promises.mkdir(Path.dirname(pdfPath), { recursive: true })
}) })