chore(node): upgrades to node 18 (#1189)

* chore(node): upgrades to node 18

Node 16 was out of support (but not security upgrades), so bumping to next stable version.

https://github.com/specklesystems/speckle-server/issues/1187

* Update server liveness and readiness probes for node 18
* Bump web-ifc to 0.0.36
* Apply `--no-experimental-fetch` flag to fileimport-service to prevent issues in web-ifc (via emscripten) with node 18
This commit is contained in:
Iain Sproat 2022-12-06 12:57:48 +00:00 коммит произвёл GitHub
Родитель 4d01e13a84
Коммит ee50b32b59
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
17 изменённых файлов: 30 добавлений и 29 удалений

Просмотреть файл

@ -6,7 +6,7 @@
"name": "root",
"private": true,
"engines": {
"node": ">=14.0.0 <17.0.0"
"node": "^18.12.1"
},
"scripts": {
"build": "yarn workspaces foreach -ptv run build",

Просмотреть файл

@ -1,4 +1,4 @@
FROM node:16.18.0-bullseye-slim as build-stage
FROM node:18.12.1-bullseye-slim as build-stage
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
@ -19,7 +19,7 @@ COPY packages/fileimport-service ./packages/fileimport-service/
RUN yarn workspaces foreach run build
FROM node:16.18.0-bullseye-slim as node
FROM node:18.12.1-bullseye-slim as node
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
@ -54,4 +54,4 @@ WORKDIR /speckle-server/packages/fileimport-service
RUN yarn workspaces focus --production
ENTRYPOINT [ "tini", "--" ]
CMD ["yarn", "node", "src/daemon.js"]
CMD ["node", "--no-experimental-fetch", "src/daemon.js"]

Просмотреть файл

@ -12,11 +12,11 @@
"url": "git+https://github.com/specklesystems/speckle-server.git"
},
"engines": {
"node": "^16.0.0"
"node": "^18.12.1"
},
"scripts": {
"dev": "cross-env POSTGRES_URL=postgres://speckle:speckle@localhost/speckle NODE_ENV=development SPECKLE_SERVER_URL=http://localhost:3000 nodemon ./src/daemon.js",
"parse:ifc": "node ./ifc/import_file.js /tmp/file_to_import/file 33763848d6 2e4bfb467a main File upload: steelplates.ifc",
"dev": "cross-env POSTGRES_URL=postgres://speckle:speckle@localhost/speckle NODE_ENV=development SPECKLE_SERVER_URL=http://localhost:3000 nodemon --no-experimental-fetch ./src/daemon.js",
"parse:ifc": "node --no-experimental-fetch ./ifc/import_file.js ./ifc/ifcs/steelplates.ifc 33763848d6 2e4bfb467a main File upload: steelplates.ifc",
"lint": "eslint . --ext .js,.ts"
},
"bugs": {
@ -32,7 +32,7 @@
"prom-client": "^14.0.1",
"undici": "^5.8.2",
"valid-filename": "^3.1.0",
"web-ifc": "^0.0.35"
"web-ifc": "^0.0.36"
},
"devDependencies": {
"cross-env": "^7.0.3",

Просмотреть файл

@ -87,6 +87,7 @@ async function doTask(task) {
await runProcessWithTimeout(
'node',
[
'--no-experimental-fetch',
'./ifc/import_file.js',
TMP_FILE_PATH,
info.userId,

Просмотреть файл

@ -1,7 +1,7 @@
# NOTE: Docker context should be set to git root directory, to include the viewer
# build stage
FROM node:16.18.0-bullseye-slim as build-stage
FROM node:18.12.1-bullseye-slim as build-stage
ARG SPECKLE_SERVER_VERSION=custom

Просмотреть файл

@ -97,6 +97,6 @@
"vue-tsc": "^1.0.8"
},
"engines": {
"node": "^16.0.0"
"node": "^18.12.1"
}
}

Просмотреть файл

@ -12,7 +12,7 @@
"directory": "packages/objectloader"
},
"engines": {
"node": ">=14.0.0"
"node": "^18.12.1"
},
"scripts": {
"lint": "eslint . --ext .js,.ts",

Просмотреть файл

@ -2,7 +2,7 @@
# build stage
FROM node:16.18.0-bullseye-slim as build-stage
FROM node:18.12.1-bullseye-slim as build-stage
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
@ -32,7 +32,7 @@ RUN yarn workspaces foreach run build
FROM node:16.18.0-bullseye-slim as node
FROM node:18.12.1-bullseye-slim as node
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \

Просмотреть файл

@ -11,7 +11,7 @@
"directory": "packages/preview-service"
},
"engines": {
"node": ">=14.0.0 <17.0.0"
"node": "^18.12.1"
},
"scripts": {
"dev": "nodemon --trace-deprecation ./bin/www",

Просмотреть файл

@ -1,4 +1,4 @@
FROM node:16.18.0-bullseye-slim as build-stage
FROM node:18.12.1-bullseye-slim as build-stage
ARG NODE_ENV=production
ARG SPECKLE_SERVER_VERSION=custom
@ -32,7 +32,7 @@ RUN yarn workspaces foreach run build
WORKDIR /speckle-server/packages/server
RUN yarn workspaces focus --production
FROM node:16.18.0-bullseye-slim as production-stage
FROM node:18.12.1-bullseye-slim as production-stage
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
ARG SPECKLE_SERVER_VERSION=custom

Просмотреть файл

@ -12,7 +12,7 @@
"url": "https://github.com/specklesystems/Server.git"
},
"engines": {
"node": "^16.0.0"
"node": "^18.12.1"
},
"scripts": {
"build": "tsc -p ./tsconfig.build.json",

Просмотреть файл

@ -22,7 +22,7 @@
},
"sideEffects": false,
"engines": {
"node": ">=14.0.0"
"node": "^18.12.1"
},
"author": "AEC Systems",
"license": "Apache-2.0",

Просмотреть файл

@ -21,7 +21,7 @@
"dist"
],
"engines": {
"node": ">=14.0.0"
"node": "^18.12.1"
},
"scripts": {
"build": "NODE_ENV=production rollup --config",

Просмотреть файл

@ -1,4 +1,4 @@
FROM node:16.18.0-bullseye-slim as build-stage
FROM node:18.12.1-bullseye-slim as build-stage
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
@ -19,7 +19,7 @@ COPY packages/webhook-service/src ./packages/webhook-service/
RUN yarn workspaces foreach run build
FROM node:16.18.0-bullseye-slim as node
FROM node:18.12.1-bullseye-slim as node
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \

Просмотреть файл

@ -13,7 +13,7 @@
},
"homepage": "https://github.com/specklesystems/speckle-server#readme",
"engines": {
"node": "^16.0.0"
"node": "^18.12.1"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",

Просмотреть файл

@ -70,7 +70,7 @@ spec:
command:
- node
- -e
- "require('request')({headers: {'Content-Type': 'application/json'}, uri: 'http://localhost:3000/graphql?query={serverInfo{version}}', method: 'GET' }, (e,r,b) => process.exit(r.statusCode != 200 || b.toLowerCase().includes('error')))"
- "require('node:http').request({headers: {'Content-Type': 'application/json'}, port:3000, hostname:'127.0.0.1', path:'/graphql?query={serverInfo{version}}', method: 'GET' }, (res) => { body = ''; res.on('data', (chunk) => {body += chunk;}); res.on('end', () => {process.exit(res.statusCode != 200 || body.toLowerCase().includes('error'));}); }).end();"
readinessProbe:
initialDelaySeconds: 5
@ -80,7 +80,7 @@ spec:
command:
- node
- -e
- "require('request')({headers: {'Content-Type': 'application/json'}, uri: 'http://localhost:3000/graphql?query={serverInfo{version}}', method: 'GET' }, (e,r,b) => process.exit(r.statusCode != 200 || b.toLowerCase().includes('error')))"
- "require('node:http').request({headers: {'Content-Type': 'application/json'}, port:3000, hostname:'127.0.0.1', path:'/graphql?query={serverInfo{version}}', method: 'GET' }, (res) => { body = ''; res.on('data', (chunk) => {body += chunk;}); res.on('end', () => {process.exit(res.statusCode != 200 || body.toLowerCase().includes('error'));}); }).end();"
env:
- name: CANONICAL_URL

Просмотреть файл

@ -4835,7 +4835,7 @@ __metadata:
prom-client: ^14.0.1
undici: ^5.8.2
valid-filename: ^3.1.0
web-ifc: ^0.0.35
web-ifc: ^0.0.36
languageName: unknown
linkType: soft
@ -20953,10 +20953,10 @@ __metadata:
languageName: node
linkType: hard
"web-ifc@npm:^0.0.35":
version: 0.0.35
resolution: "web-ifc@npm:0.0.35"
checksum: 5ad1f61a7ad043d4484444e899f34a0e0397b02e1181cd40642a16ab4fa484dc2a5489307bfd202450ef9d5cbb1293dd7cf927089dac344823ad57f993ada06f
"web-ifc@npm:^0.0.36":
version: 0.0.36
resolution: "web-ifc@npm:0.0.36"
checksum: 930ad124c22527454888644940ec97b5e5990690d1ba9d8c2eea08d1f8429fbf614a32c3881f38184ceb6f18d5be845420dd2f90d06603a1e556f10d2a825402
languageName: node
linkType: hard