From ac3c13abbcaf3d26ffda976f73ffb8c3b8fdfda9 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Thu, 1 Jun 2023 18:54:43 +0400 Subject: [PATCH 01/13] update from node14 to node18 --- .github/workflows/joystream-cli.yml | 4 ++-- .github/workflows/joystream-types.yml | 4 ++-- .github/workflows/lint-typescript.yml | 4 ++-- .github/workflows/metadata-protobuf.yml | 2 +- .github/workflows/query-node.yml | 4 ++-- .github/workflows/run-network-tests.yml | 4 ++-- .github/workflows/storage-node.yml | 4 ++-- apps.Dockerfile | 2 +- cli/package.json | 4 ++-- colossus.Dockerfile | 2 +- distributor-node.Dockerfile | 2 +- distributor-node/client/package.json | 4 ++-- distributor-node/package.json | 4 ++-- docker-compose.yml | 12 ++++++------ package.json | 4 ++-- storage-node/client/package.json | 4 ++-- storage-node/package.json | 4 ++-- types/package.json | 2 +- utils/migration-scripts/package.json | 4 ++-- 19 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/joystream-cli.yml b/.github/workflows/joystream-cli.yml index 8d37a31430..1f0abcaf76 100644 --- a/.github/workflows/joystream-cli.yml +++ b/.github/workflows/joystream-cli.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -32,7 +32,7 @@ jobs: runs-on: macos-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/joystream-types.yml b/.github/workflows/joystream-types.yml index c4a175154d..206a48f4ec 100644 --- a/.github/workflows/joystream-types.yml +++ b/.github/workflows/joystream-types.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -30,7 +30,7 @@ jobs: runs-on: macos-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/lint-typescript.yml b/.github/workflows/lint-typescript.yml index 46f9c91d55..ef00cf96bf 100644 --- a/.github/workflows/lint-typescript.yml +++ b/.github/workflows/lint-typescript.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -24,7 +24,7 @@ jobs: runs-on: macos-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/metadata-protobuf.yml b/.github/workflows/metadata-protobuf.yml index d88474293b..bebc898ae8 100644 --- a/.github/workflows/metadata-protobuf.yml +++ b/.github/workflows/metadata-protobuf.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/query-node.yml b/.github/workflows/query-node.yml index afb8c9a9a1..4787ed5acc 100644 --- a/.github/workflows/query-node.yml +++ b/.github/workflows/query-node.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -27,7 +27,7 @@ jobs: runs-on: macos-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/run-network-tests.yml b/.github/workflows/run-network-tests.yml index 81bca9f41e..8a48d46020 100644 --- a/.github/workflows/run-network-tests.yml +++ b/.github/workflows/run-network-tests.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -28,7 +28,7 @@ jobs: runs-on: macos-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/.github/workflows/storage-node.yml b/.github/workflows/storage-node.yml index 338fdc1f45..320662b2a1 100644 --- a/.github/workflows/storage-node.yml +++ b/.github/workflows/storage-node.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} @@ -28,7 +28,7 @@ jobs: runs-on: macos-latest strategy: matrix: - node-version: [14.x] + node-version: [18.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} diff --git a/apps.Dockerfile b/apps.Dockerfile index 866ea2e0b9..1fa0712baf 100644 --- a/apps.Dockerfile +++ b/apps.Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/x86-64 node:14 as builder +FROM --platform=linux/x86-64 node:18 as builder WORKDIR /joystream COPY . /joystream diff --git a/cli/package.json b/cli/package.json index 513031794c..e83acecd3f 100644 --- a/cli/package.json +++ b/cli/package.json @@ -81,7 +81,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.0.0", + "node": ">=18.6.0", "yarn": "^1.22.0" }, "publishConfig": { @@ -170,7 +170,7 @@ }, "types": "lib/index.d.ts", "volta": { - "node": "14.16.1", + "node": "18.6.0", "yarn": "1.22.15" } } diff --git a/colossus.Dockerfile b/colossus.Dockerfile index da23d7301a..8855ca7283 100644 --- a/colossus.Dockerfile +++ b/colossus.Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/x86-64 node:14 as builder +FROM --platform=linux/x86-64 node:18 as builder WORKDIR /joystream COPY . /joystream diff --git a/distributor-node.Dockerfile b/distributor-node.Dockerfile index f6b2e77eab..9f157b94fd 100644 --- a/distributor-node.Dockerfile +++ b/distributor-node.Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=linux/x86-64 node:14 as builder +FROM --platform=linux/x86-64 node:18 as builder WORKDIR /joystream COPY ./.git .git diff --git a/distributor-node/client/package.json b/distributor-node/client/package.json index 02a4c39a1a..befc190bfa 100644 --- a/distributor-node/client/package.json +++ b/distributor-node/client/package.json @@ -11,10 +11,10 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.16.1" + "node": ">=18.6.0" }, "volta": { - "node": "14.16.1", + "node": "18.6.0", "yarn": "1.22.15" }, "homepage": "https://github.com/Joystream/joystream", diff --git a/distributor-node/package.json b/distributor-node/package.json index 134c8f61ab..a3d4535509 100644 --- a/distributor-node/package.json +++ b/distributor-node/package.json @@ -83,10 +83,10 @@ "widdershins": "^4.0.1" }, "engines": { - "node": ">=14.16.1" + "node": ">=18.6.0" }, "volta": { - "node": "14.16.1", + "node": "18.6.0", "yarn": "1.22.15" }, "files": [ diff --git a/docker-compose.yml b/docker-compose.yml index 71db3a96b0..eb7fc036e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: - 9933:9933 colossus-1: - image: node:14 + image: node:18 container_name: colossus-1 restart: on-failure volumes: @@ -41,7 +41,7 @@ services: ] distributor-1: - image: node:14 + image: node:18 container_name: distributor-1 restart: on-failure volumes: @@ -79,7 +79,7 @@ services: command: ['yarn', 'joystream-distributor', 'start'] colossus-2: - image: node:14 + image: node:18 container_name: colossus-2 restart: on-failure volumes: @@ -107,7 +107,7 @@ services: ] distributor-2: - image: node:14 + image: node:18 container_name: distributor-2 restart: on-failure volumes: @@ -180,7 +180,7 @@ services: PGPORT: ${ORION_DB_PORT} graphql-server: - image: node:14 + image: node:18 container_name: graphql-server restart: unless-stopped env_file: @@ -205,7 +205,7 @@ services: command: ['yarn', 'workspace', 'query-node-root', 'query-node:start:prod'] processor: - image: node:14 + image: node:18 container_name: processor restart: unless-stopped env_file: diff --git a/package.json b/package.json index bc21eb8cb1..97e97fd342 100644 --- a/package.json +++ b/package.json @@ -65,11 +65,11 @@ } }, "engines": { - "node": ">=14.0.0", + "node": ">=18.6.0", "yarn": "^1.22.15" }, "volta": { - "node": "14.18.0", + "node": "18.6.0", "yarn": "1.22.15" } } diff --git a/storage-node/client/package.json b/storage-node/client/package.json index 241aa1a3b9..fab3870bcc 100644 --- a/storage-node/client/package.json +++ b/storage-node/client/package.json @@ -11,10 +11,10 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.16.1" + "node": ">=18.6.0" }, "volta": { - "node": "14.16.1", + "node": "18.6.0", "yarn": "1.22.15" }, "homepage": "https://github.com/Joystream/joystream", diff --git a/storage-node/package.json b/storage-node/package.json index 3f94261f4f..bd57a97698 100644 --- a/storage-node/package.json +++ b/storage-node/package.json @@ -93,10 +93,10 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.16.1" + "node": ">=18.6.0" }, "volta": { - "node": "14.16.1", + "node": "18.6.0", "yarn": "1.22.15" }, "files": [ diff --git a/types/package.json b/types/package.json index 2bd22fb713..72d0034002 100644 --- a/types/package.json +++ b/types/package.json @@ -74,7 +74,7 @@ }, "homepage": "https://github.com/Joystream/joystream", "volta": { - "node": "14.16.1", + "node": "18.6.0", "yarn": "1.22.15" } } diff --git a/utils/migration-scripts/package.json b/utils/migration-scripts/package.json index cd788bf35f..106158bedf 100644 --- a/utils/migration-scripts/package.json +++ b/utils/migration-scripts/package.json @@ -48,11 +48,11 @@ "typescript": "^3.3" }, "engines": { - "node": ">=14.0.0", + "node": ">=18.6.0", "yarn": "^1.22.0" }, "volta": { - "node": "14.16.1", + "node": "18.6.0", "yarn": "1.22.15" }, "files": [ From ce4f71f099bcd1466ba07bc0665e1622bfa0b5a1 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Thu, 1 Jun 2023 19:59:10 +0400 Subject: [PATCH 02/13] missed some node version fixes in github workflows --- .github/workflows/joystream-node-docker-publish.yml | 2 +- .github/workflows/joystream-node-docker.yml | 4 ++-- .github/workflows/joystream-node.yml | 4 ++-- .github/workflows/run-network-tests.yml | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/joystream-node-docker-publish.yml b/.github/workflows/joystream-node-docker-publish.yml index 9b930964ef..9caba89bdd 100644 --- a/.github/workflows/joystream-node-docker-publish.yml +++ b/.github/workflows/joystream-node-docker-publish.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - id: compute_shasum name: Compute runtime code shasum diff --git a/.github/workflows/joystream-node-docker.yml b/.github/workflows/joystream-node-docker.yml index aafa3816a7..942e11aae9 100644 --- a/.github/workflows/joystream-node-docker.yml +++ b/.github/workflows/joystream-node-docker.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - id: compute_shasum name: Compute runtime code shasum @@ -71,7 +71,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - name: Check if we have pre-built image on Dockerhub id: compute_image_exists diff --git a/.github/workflows/joystream-node.yml b/.github/workflows/joystream-node.yml index 5193434505..a6857498f3 100644 --- a/.github/workflows/joystream-node.yml +++ b/.github/workflows/joystream-node.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - uses: technote-space/get-diff-action@v3 with: PREFIX_FILTER: | @@ -56,7 +56,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - uses: technote-space/get-diff-action@v3 with: PREFIX_FILTER: | diff --git a/.github/workflows/run-network-tests.yml b/.github/workflows/run-network-tests.yml index 8a48d46020..99ea16c2bd 100644 --- a/.github/workflows/run-network-tests.yml +++ b/.github/workflows/run-network-tests.yml @@ -50,7 +50,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - id: compute_shasum name: Compute runtime code shasum @@ -155,7 +155,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - name: Get artifacts uses: actions/download-artifact@v3 with: @@ -227,7 +227,7 @@ jobs: - name: setup node uses: actions/setup-node@v3 with: - node-version: '14.x' + node-version: '18.x' - name: Install packages and dependencies if: env.GIT_DIFF run: | From 3d304e6188f6ab96e2dbec9c42725f3737d38823 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Fri, 7 Jul 2023 00:33:45 +0300 Subject: [PATCH 03/13] update to latest yarn v1.22.19 - update some docs --- README.md | 8 ++++---- RUNTIME-CONTRIBUTING.md | 10 +++++----- cli/package.json | 2 +- distributor-node/client/package.json | 2 +- distributor-node/package.json | 2 +- package.json | 2 +- storage-node/client/package.json | 2 +- storage-node/package.json | 2 +- types/package.json | 2 +- utils/api-scripts/src/inspect-wasm-runtime-version.js | 4 ++-- utils/migration-scripts/package.json | 2 +- 11 files changed, 19 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 5866861328..36fce0ee50 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ functionality to support the [various roles](https://joystream.gitbook.io/testne The following tools are required for building, testing and contributing to this repo: - [Rust](https://www.rust-lang.org/tools/install) toolchain - _required_ -- [nodejs](https://nodejs.org/) v14.x - _required_ +- [nodejs](https://nodejs.org/) >= v18.6 - _required_ - [yarn classic](https://classic.yarnpkg.com/en/docs/install) package manager v1.22.x- _required_ - [docker](https://www.docker.com/get-started) and docker-compose v.1.29 or higher - _required_ - [ansible](https://www.ansible.com/) - _optional_ @@ -28,11 +28,11 @@ After cloning the repo run the following initialization scripts: # build local npm packages yarn build:packages -# Build joystream/node docker image -yarn build:node:docker +# Build joystream/node docker testing image +RUNTIME_PROFILE=TESTING yarn build:node:docker # start a local development network -yarn start +RUNTIME_PROFILE=TESTING yarn start ``` ## Software diff --git a/RUNTIME-CONTRIBUTING.md b/RUNTIME-CONTRIBUTING.md index 86be3a73da..7f9844c03d 100644 --- a/RUNTIME-CONTRIBUTING.md +++ b/RUNTIME-CONTRIBUTING.md @@ -42,7 +42,7 @@ WS_URI=wss://rpc.joystream.org yarn ts-node src/get-wasm-from-chain.ts ./runtime # compute the blake2-256 hash of the runtime b2sum -l 256 ./runtime.wasm # Inspect the runtime version -node --experimental-wasm-bigint src/inspect-wasm-runtime-version.js ./runtime.wasm +node src/inspect-wasm-runtime-version.js ./runtime.wasm ``` ### Using [subwasm](https://github.com/chevdor/subwasm) @@ -105,7 +105,7 @@ docker rm test # compute the blake2-256 hash of the runtime b2sum -l 256 ./master.wasm # Inspect the runtime version information -node --experimental-wasm-bigint utils/api-scripts/src/inspect-wasm-runtime-version.js ./master.wasm +node utils/api-scripts/src/inspect-wasm-runtime-version.js ./master.wasm ``` Compare results with the runtime you fetched from the chain in previous section. @@ -131,7 +131,7 @@ WS_URI=wss://rpc.joystream.org yarn ts-node src/get-wasm-from-proposal.ts 123 ./ # compute the blake2-256 hash of the runtime b2sum -l 256 ./proposed.wasm # Inspect the runtime version information -node --experimental-wasm-bigint src/inspect-wasm-runtime-version.js ./runtime.wasm +node src/inspect-wasm-runtime-version.js ./runtime.wasm ``` Checkout the proposed runtime from the proposer's fork of joystream repository, and build it. @@ -331,9 +331,9 @@ Specific test scenario should be written to test for any state migration code pe There are some scripts in `tests/network-tests/run-migration-tests.sh` that are executed by github workflow to perform such tests, but they should also be executed locally. -The tool is being updated for Ephesus network: https://github.com/Joystream/joystream/pull/4569 - ### Additional Resources Some tooling that would be useful to add to our node and runtime to improve testing capabilities: - https://docs.substrate.io/reference/how-to-guides/tools/use-try-runtime/ - https://docs.substrate.io/reference/command-line-tools/try-runtime/ + +This is coming in nara release https://github.com/Joystream/joystream/pull/4705 diff --git a/cli/package.json b/cli/package.json index dbd47aa854..8b2a966d62 100644 --- a/cli/package.json +++ b/cli/package.json @@ -171,6 +171,6 @@ "types": "lib/index.d.ts", "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" } } diff --git a/distributor-node/client/package.json b/distributor-node/client/package.json index befc190bfa..c7b7f3963a 100644 --- a/distributor-node/client/package.json +++ b/distributor-node/client/package.json @@ -15,7 +15,7 @@ }, "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" }, "homepage": "https://github.com/Joystream/joystream", "keywords": [ diff --git a/distributor-node/package.json b/distributor-node/package.json index bbe42b908d..341893faa9 100644 --- a/distributor-node/package.json +++ b/distributor-node/package.json @@ -88,7 +88,7 @@ }, "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" }, "files": [ "/bin", diff --git a/package.json b/package.json index 97e97fd342..e85c1894f3 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,6 @@ }, "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" } } diff --git a/storage-node/client/package.json b/storage-node/client/package.json index bc9591e82b..cbfadee48b 100644 --- a/storage-node/client/package.json +++ b/storage-node/client/package.json @@ -15,7 +15,7 @@ }, "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" }, "homepage": "https://github.com/Joystream/joystream", "keywords": [ diff --git a/storage-node/package.json b/storage-node/package.json index 051ab94e98..637fe240f8 100644 --- a/storage-node/package.json +++ b/storage-node/package.json @@ -104,7 +104,7 @@ }, "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" }, "files": [ "/bin", diff --git a/types/package.json b/types/package.json index 046c6296bb..9b7a9f2428 100644 --- a/types/package.json +++ b/types/package.json @@ -74,6 +74,6 @@ "homepage": "https://github.com/Joystream/joystream", "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" } } diff --git a/utils/api-scripts/src/inspect-wasm-runtime-version.js b/utils/api-scripts/src/inspect-wasm-runtime-version.js index 8151889ba6..6a54bb8318 100755 --- a/utils/api-scripts/src/inspect-wasm-runtime-version.js +++ b/utils/api-scripts/src/inspect-wasm-runtime-version.js @@ -1,6 +1,6 @@ -#!/usr/bin/env node --experimental-wasm-bigint +#!/usr/bin/env node -// Run script with: node --experimental-wasm-bigint src/inspect-wasm-runtime-version.js ./runtime.wasm +// Run script with: node src/inspect-wasm-runtime-version.js ./runtime.wasm const fs = require('fs') const { decompress } = require('@mongodb-js/zstd') const { getRuntimeVersionFromWasm } = require('./helpers/runtimeVersion') diff --git a/utils/migration-scripts/package.json b/utils/migration-scripts/package.json index 106158bedf..6824de9090 100644 --- a/utils/migration-scripts/package.json +++ b/utils/migration-scripts/package.json @@ -53,7 +53,7 @@ }, "volta": { "node": "18.6.0", - "yarn": "1.22.15" + "yarn": "1.22.19" }, "files": [ "/bin", From 8903101b897b0f73a3a39db54480da5a94655a9a Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Fri, 7 Jul 2023 00:45:19 +0300 Subject: [PATCH 04/13] don't force new nodejs vesion, only through volta,and CI actions --- cli/package.json | 2 +- distributor-node/client/package.json | 2 +- distributor-node/package.json | 2 +- package.json | 2 +- storage-node/client/package.json | 2 +- storage-node/package.json | 2 +- utils/migration-scripts/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cli/package.json b/cli/package.json index 8b2a966d62..d15d95eb85 100644 --- a/cli/package.json +++ b/cli/package.json @@ -81,7 +81,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=18.6.0", + "node": ">=14.6.1", "yarn": "^1.22.0" }, "publishConfig": { diff --git a/distributor-node/client/package.json b/distributor-node/client/package.json index c7b7f3963a..57a4ed76da 100644 --- a/distributor-node/client/package.json +++ b/distributor-node/client/package.json @@ -11,7 +11,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=18.6.0" + "node": ">=14.6.1" }, "volta": { "node": "18.6.0", diff --git a/distributor-node/package.json b/distributor-node/package.json index 341893faa9..8dc4f53e8e 100644 --- a/distributor-node/package.json +++ b/distributor-node/package.json @@ -84,7 +84,7 @@ "widdershins": "^4.0.1" }, "engines": { - "node": ">=18.6.0" + "node": ">=14.6.1" }, "volta": { "node": "18.6.0", diff --git a/package.json b/package.json index e85c1894f3..b54d277457 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ } }, "engines": { - "node": ">=18.6.0", + "node": ">=14.6.1", "yarn": "^1.22.15" }, "volta": { diff --git a/storage-node/client/package.json b/storage-node/client/package.json index cbfadee48b..d26d128688 100644 --- a/storage-node/client/package.json +++ b/storage-node/client/package.json @@ -11,7 +11,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=18.6.0" + "node": ">=14.6.1" }, "volta": { "node": "18.6.0", diff --git a/storage-node/package.json b/storage-node/package.json index 637fe240f8..41ebf2d10b 100644 --- a/storage-node/package.json +++ b/storage-node/package.json @@ -100,7 +100,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=18.6.0" + "node": ">=14.6.1" }, "volta": { "node": "18.6.0", diff --git a/utils/migration-scripts/package.json b/utils/migration-scripts/package.json index 6824de9090..8897a26229 100644 --- a/utils/migration-scripts/package.json +++ b/utils/migration-scripts/package.json @@ -48,7 +48,7 @@ "typescript": "^3.3" }, "engines": { - "node": ">=18.6.0", + "node": ">=14.6.1", "yarn": "^1.22.0" }, "volta": { From 2c83f6a874f29e703311da148df0d2cfcf2d8ffb Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Fri, 7 Jul 2023 18:06:05 +0300 Subject: [PATCH 05/13] docker-compose-no-bind-volumes use node18 --- docker-compose-no-bind-volumes.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose-no-bind-volumes.yml b/docker-compose-no-bind-volumes.yml index 580f024fc6..7b2bbc28d0 100644 --- a/docker-compose-no-bind-volumes.yml +++ b/docker-compose-no-bind-volumes.yml @@ -172,7 +172,7 @@ services: PGPORT: ${ORION_DB_PORT} graphql-server: - image: node:14 + image: node:18 container_name: graphql-server restart: unless-stopped env_file: @@ -197,7 +197,7 @@ services: command: ['yarn', 'workspace', 'query-node-root', 'query-node:start:prod'] processor: - image: node:14 + image: node:18 container_name: processor restart: unless-stopped env_file: From a47936037725f984eee869e9bff9a021a3bed207 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Wed, 12 Jul 2023 01:43:11 +0300 Subject: [PATCH 06/13] ansible playbook install tools node v18 --- devops/ansible/roles/common/tasks/install-tools.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devops/ansible/roles/common/tasks/install-tools.yml b/devops/ansible/roles/common/tasks/install-tools.yml index dc3d9b2e86..7d03479ac3 100644 --- a/devops/ansible/roles/common/tasks/install-tools.yml +++ b/devops/ansible/roles/common/tasks/install-tools.yml @@ -107,7 +107,7 @@ shell: cmd: | bash -ic " - volta install node@14 && volta install yarn + volta install node@18 && volta install yarn " args: executable: /bin/bash From 76b995076e035f2f3b7a38fa1fe7b135e1dc8a03 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Thu, 20 Jul 2023 16:55:36 +0300 Subject: [PATCH 07/13] fix remaining engine versions to not break things --- README.md | 2 +- package.json | 2 +- setup.sh | 2 +- utils/migration-scripts/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 36fce0ee50..97cb538489 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ functionality to support the [various roles](https://joystream.gitbook.io/testne The following tools are required for building, testing and contributing to this repo: - [Rust](https://www.rust-lang.org/tools/install) toolchain - _required_ -- [nodejs](https://nodejs.org/) >= v18.6 - _required_ +- [nodejs](https://nodejs.org/) >= v14.x.x - _required_ - [yarn classic](https://classic.yarnpkg.com/en/docs/install) package manager v1.22.x- _required_ - [docker](https://www.docker.com/get-started) and docker-compose v.1.29 or higher - _required_ - [ansible](https://www.ansible.com/) - _optional_ diff --git a/package.json b/package.json index 234798e2fc..3654d93e59 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ } }, "engines": { - "node": ">=14.6.1", + "node": ">=14.0.0", "yarn": "^1.22.15" }, "volta": { diff --git a/setup.sh b/setup.sh index 71be02d3b7..d8f51d068d 100755 --- a/setup.sh +++ b/setup.sh @@ -57,7 +57,7 @@ curl https://get.volta.sh | bash # source env variables added by Volta source ~/.bash_profile || source ~/.profile || source ~/.bashrc || : -volta install node@14 +volta install node@18 volta install yarn volta install npx diff --git a/utils/migration-scripts/package.json b/utils/migration-scripts/package.json index 8897a26229..94b1257eb5 100644 --- a/utils/migration-scripts/package.json +++ b/utils/migration-scripts/package.json @@ -48,7 +48,7 @@ "typescript": "^3.3" }, "engines": { - "node": ">=14.6.1", + "node": ">=14.0.0", "yarn": "^1.22.0" }, "volta": { From 38faadfa95abc5cb8a6775ec56d2992b782ed53c Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Thu, 20 Jul 2023 17:56:34 +0300 Subject: [PATCH 08/13] updated README to suggest workaround if dev machine doesn't support node18 --- README.md | 30 ++++++++++++++++++++++++++---- setup.sh | 14 ++++++++------ 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 97cb538489..2da31f756c 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ functionality to support the [various roles](https://joystream.gitbook.io/testne ## Development +For best results use GNU/Linux with minimum GLIBC_2.28 for nodejs v18+, eg. Ubuntu 22.04 or newer. + The following tools are required for building, testing and contributing to this repo: - [Rust](https://www.rust-lang.org/tools/install) toolchain - _required_ @@ -19,19 +21,39 @@ The following tools are required for building, testing and contributing to this If you use VSCode as your code editor we recommend using the workspace [settings](devops/vscode/settings.json) for recommend eslint plugin to function properly. -After cloning the repo run the following initialization scripts: +After cloning the repo run the following to get started: +### Install development tools ```sh -# Install development tools ./setup.sh +``` + +### If you prefer your own node version manager +Install development tools without Volta version manager. + +```sh +./setup.sh --no-volta +``` + +### For older operating systems which don't support node 18 +Modify the root `package.json` and change volta section to use node version 16.20.1 instead of 18.6.0 +```json +"volta": { + "node": "16.20.1", + "yarn": "1.22.19" +} +``` -# build local npm packages +### Run local development network + +```sh +# Build local npm packages yarn build:packages # Build joystream/node docker testing image RUNTIME_PROFILE=TESTING yarn build:node:docker -# start a local development network +# Start a local development network RUNTIME_PROFILE=TESTING yarn start ``` diff --git a/setup.sh b/setup.sh index d8f51d068d..b4047aeb26 100755 --- a/setup.sh +++ b/setup.sh @@ -52,13 +52,15 @@ rustup component add rustfmt # cargo install --force subkey --git https://github.com/paritytech/substrate --version ^2.0.2 --locked # Volta nodejs, npm, yarn tools manager -curl https://get.volta.sh | bash +if ! [[ $1 == "--no-volta" ]]; then + curl https://get.volta.sh | bash -# source env variables added by Volta -source ~/.bash_profile || source ~/.profile || source ~/.bashrc || : + # source env variables added by Volta + source ~/.bash_profile || source ~/.profile || source ~/.bashrc || : -volta install node@18 -volta install yarn -volta install npx + volta install node + volta install yarn + volta install npx +fi echo "You may need to open a new terminal/shell session to make newly installed tools available." From 0d3c3ed081e3acbcaee7872fff0dcdc8cdcb1014 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Thu, 20 Jul 2023 19:52:30 +0300 Subject: [PATCH 09/13] minimum required node engine 14.18.0 --- README.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2da31f756c..5df3de24c6 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ For best results use GNU/Linux with minimum GLIBC_2.28 for nodejs v18+, eg. Ubun The following tools are required for building, testing and contributing to this repo: - [Rust](https://www.rust-lang.org/tools/install) toolchain - _required_ -- [nodejs](https://nodejs.org/) >= v14.x.x - _required_ +- [nodejs](https://nodejs.org/) >= v14.18.x - _required_ - [yarn classic](https://classic.yarnpkg.com/en/docs/install) package manager v1.22.x- _required_ - [docker](https://www.docker.com/get-started) and docker-compose v.1.29 or higher - _required_ - [ansible](https://www.ansible.com/) - _optional_ diff --git a/package.json b/package.json index 3654d93e59..ff58cca36e 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ } }, "engines": { - "node": ">=14.0.0", + "node": ">=14.18.0", "yarn": "^1.22.15" }, "volta": { From 4a985bebe3cfa1ea6c160385f0c51e75404c3c0c Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Thu, 20 Jul 2023 20:24:48 +0300 Subject: [PATCH 10/13] all package engine configs set to node >=14.18.0 --- cli/package.json | 2 +- distributor-node/client/package.json | 2 +- distributor-node/package.json | 2 +- joystreamjs/package.json | 2 +- storage-node/client/package.json | 2 +- storage-node/package.json | 2 +- types/package.json | 2 +- utils/migration-scripts/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/package.json b/cli/package.json index d15d95eb85..f1495d4a8d 100644 --- a/cli/package.json +++ b/cli/package.json @@ -81,7 +81,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.6.1", + "node": ">=14.18.0", "yarn": "^1.22.0" }, "publishConfig": { diff --git a/distributor-node/client/package.json b/distributor-node/client/package.json index 57a4ed76da..5330fa4f0b 100644 --- a/distributor-node/client/package.json +++ b/distributor-node/client/package.json @@ -11,7 +11,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.6.1" + "node": ">=14.18.0" }, "volta": { "node": "18.6.0", diff --git a/distributor-node/package.json b/distributor-node/package.json index bd73ca0a77..582302252f 100644 --- a/distributor-node/package.json +++ b/distributor-node/package.json @@ -85,7 +85,7 @@ "widdershins": "^4.0.1" }, "engines": { - "node": ">=14.6.1" + "node": ">=14.18.0" }, "volta": { "node": "18.6.0", diff --git a/joystreamjs/package.json b/joystreamjs/package.json index 90015f5a7d..45d0307cb0 100644 --- a/joystreamjs/package.json +++ b/joystreamjs/package.json @@ -66,7 +66,7 @@ } }, "engines": { - "node": ">=14.0.0", + "node": ">=14.18.0", "yarn": "^1.22.15" } } diff --git a/storage-node/client/package.json b/storage-node/client/package.json index d26d128688..8affb83b45 100644 --- a/storage-node/client/package.json +++ b/storage-node/client/package.json @@ -11,7 +11,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.6.1" + "node": ">=14.18.0" }, "volta": { "node": "18.6.0", diff --git a/storage-node/package.json b/storage-node/package.json index 15fa48f9eb..ce01d83bf9 100644 --- a/storage-node/package.json +++ b/storage-node/package.json @@ -101,7 +101,7 @@ "typescript": "^4.4.3" }, "engines": { - "node": ">=14.6.1" + "node": ">=14.18.0" }, "volta": { "node": "18.6.0", diff --git a/types/package.json b/types/package.json index 9b7a9f2428..7abecd79ee 100644 --- a/types/package.json +++ b/types/package.json @@ -51,7 +51,7 @@ "madge": "^3.9.2" }, "engines": { - "node": ">=14.0.0", + "node": ">=14.18.0", "yarn": "^1.22.0" }, "publishConfig": { diff --git a/utils/migration-scripts/package.json b/utils/migration-scripts/package.json index 94b1257eb5..076393f927 100644 --- a/utils/migration-scripts/package.json +++ b/utils/migration-scripts/package.json @@ -48,7 +48,7 @@ "typescript": "^3.3" }, "engines": { - "node": ">=14.0.0", + "node": ">=14.18.0", "yarn": "^1.22.0" }, "volta": { From c324a60b097acc8decc18f50b7f5d7d656d7c2c9 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Thu, 20 Jul 2023 23:21:14 +0300 Subject: [PATCH 11/13] add monorepo changelog --- CHANGELOG.md | 24 ++++++++++++++++++++++++ README.md | 7 +++++-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..3314d0fe16 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +# Joystream Monorepo ChangeLog + +This is a top-level view of changes in the repo, linking to detailed changelogs of individual packages changed. +If no packages or cargo crates are changed then the changes are usually "devops" realted. + +### 2023-7-20 - Node.js update + +This is developer tools update release. + +#### Moving to node v18.6.0 from v14 +This is a potentially breaking change for your setup, since it requires a minimum GLIBC_2.28 on gnu/linux systems. If you use Ubuntu then you should be at least on the `20.04` release. + +To check your glibc version use this command: `ldd --version` + +If your version is older than v2.28 you should really consider updating your OS it is probably quite dated and vulnerable to security bugs. + +The minimum required node engine for all monorepo packages is updated to v14.18.0 + +No npm packages have not been published with new engine version yet, so you are not impacted if your application depedns on them, until the next package version release. To be ready do one of: + +1. Update to latest version of nodejs if possible, or +1. If you have to stick with v14 update to the latest v14 release + +If you are using volta and your OS distro is fairly new you will not need to do anything, volta will automatically fetch and use required version. For workarounds see the install development tools section in the [README.md](./README.md) \ No newline at end of file diff --git a/README.md b/README.md index 5df3de24c6..ae949d1d9c 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,15 @@ functionality to support the [various roles](https://joystream.gitbook.io/testne ## Development -For best results use GNU/Linux with minimum GLIBC_2.28 for nodejs v18+, eg. Ubuntu 22.04 or newer. +For best results use GNU/Linux with minimum glibc version 2.28 for nodejs v18 to work. +So Ubuntu 20.04 or newer. + +You can check your version of glibc with `ldd --version` The following tools are required for building, testing and contributing to this repo: - [Rust](https://www.rust-lang.org/tools/install) toolchain - _required_ -- [nodejs](https://nodejs.org/) >= v14.18.x - _required_ +- [nodejs](https://nodejs.org/) >= v14.18.x - _required_ (However volta will try to use v18.6) - [yarn classic](https://classic.yarnpkg.com/en/docs/install) package manager v1.22.x- _required_ - [docker](https://www.docker.com/get-started) and docker-compose v.1.29 or higher - _required_ - [ansible](https://www.ansible.com/) - _optional_ From 5b4270ac90518b7a43851bdb48d5c160bc2d5db3 Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Sat, 22 Jul 2023 09:05:06 +0400 Subject: [PATCH 12/13] Update CHANGELOG.md Co-authored-by: Zeeshan Akram <37098720+zeeshanakram3@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3314d0fe16..2864622821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Joystream Monorepo ChangeLog This is a top-level view of changes in the repo, linking to detailed changelogs of individual packages changed. -If no packages or cargo crates are changed then the changes are usually "devops" realted. +If no packages or cargo crates are changed then the changes are usually "devops" related. ### 2023-7-20 - Node.js update From ec3b89d1a54700d30bad6cc3a25eca87c560f9de Mon Sep 17 00:00:00 2001 From: Mokhtar Naamani Date: Sat, 22 Jul 2023 09:05:23 +0400 Subject: [PATCH 13/13] Update CHANGELOG.md Co-authored-by: Zeeshan Akram <37098720+zeeshanakram3@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2864622821..91175412cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ If your version is older than v2.28 you should really consider updating your OS The minimum required node engine for all monorepo packages is updated to v14.18.0 -No npm packages have not been published with new engine version yet, so you are not impacted if your application depedns on them, until the next package version release. To be ready do one of: +No npm packages have not been published with new engine version yet, so you are not impacted if your application depends on them, until the next package version release. To be ready do one of: 1. Update to latest version of nodejs if possible, or 1. If you have to stick with v14 update to the latest v14 release