From 8bc43fc77a9b6c473977ad98506f4a0ef240b550 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 19 Dec 2019 16:19:01 -0800 Subject: [PATCH 1/8] Native: Add log for malformed incoming metadata --- packages/grpc-native-core/src/metadata.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/grpc-native-core/src/metadata.js b/packages/grpc-native-core/src/metadata.js index ee442953f..8aef8df20 100644 --- a/packages/grpc-native-core/src/metadata.js +++ b/packages/grpc-native-core/src/metadata.js @@ -22,6 +22,9 @@ var clone = require('lodash.clone'); var grpc = require('./grpc_extension'); +const common = require('./common'); +const logVerbosity = require('./constants').logVerbosity; + const IDEMPOTENT_REQUEST_FLAG = 0x10; const WAIT_FOR_READY_FLAG = 0x20; const CACHEABLE_REQUEST_FLAG = 0x40; @@ -231,6 +234,12 @@ Metadata._fromCoreRepresentation = function(metadata) { if (metadata) { Object.keys(metadata.metadata).forEach(key => { const value = metadata.metadata[key]; + if (!grpc.metadataKeyIsLegal(key)) { + common.log(logVerbosity.ERROR, + "Warning: possibly corrupted metadata key received: " + + key + ": " + value + + ". Please report this at https://github.com/grpc/grpc-node/issues/1173."); + } newMetadata._internal_repr[key] = clone(value); }); } From f3d09cca80a59845d2114729f4036573d39a489e Mon Sep 17 00:00:00 2001 From: Gintautas Miselis Date: Mon, 20 Apr 2020 13:29:35 +0300 Subject: [PATCH 2/8] Don't use bundledDependencies --- packages/grpc-native-core/package.json | 3 --- packages/grpc-tools/package.json | 1 - 2 files changed, 4 deletions(-) diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index 0ae8cb423..fad9de05d 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -25,9 +25,6 @@ "install": "node-pre-gyp install --fallback-to-build --library=static_library", "prepack": "git submodule update --init --recursive && npm install" }, - "bundledDependencies": [ - "node-pre-gyp" - ], "dependencies": { "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", diff --git a/packages/grpc-tools/package.json b/packages/grpc-tools/package.json index 8f4947f3e..148c103ab 100644 --- a/packages/grpc-tools/package.json +++ b/packages/grpc-tools/package.json @@ -23,7 +23,6 @@ "install": "node-pre-gyp install", "prepublishOnly": "git submodule update --init --recursive && node copy_well_known_protos.js" }, - "bundledDependencies": ["node-pre-gyp"], "dependencies": { "node-pre-gyp": "^0.12.0" }, From 3437a687718f7d27db786002bc47b142ddaf2ea8 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Thu, 21 May 2020 11:05:38 -0700 Subject: [PATCH 3/8] Build for newer versions of Node and Electron --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25f85a05f..578f6b92b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ jobs: name: All Simple Native Builds strategy: matrix: - node: ['4', '5', '6', '7', '8', '9', '10', '11', '12', '13'] + node: ['4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14'] arch: [ia32, x64] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{matrix.os}} @@ -46,7 +46,7 @@ jobs: name: All Electron Builds strategy: matrix: - electron: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '2.0', '3.0', '3.1', '4.1', '4.2', '5.0', '6.0', '7.0'] + electron: ['1.0', '1.1', '1.2', '1.3', '1.4', '1.5', '1.6', '1.7', '1.8', '2.0', '3.0', '3.1', '4.1', '4.2', '5.0', '6.0', '6.1', '7.0', '7.1', '7.2', '7.3', '8.0', '8.1', '8.2', '8.3', '9.0'] arch: [ia32, x64] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{matrix.os}} @@ -80,7 +80,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['4', '5', '6', '7', '8', '9', '10', '11', '12', '13'] + node: ['4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14'] env: ARCH: x64 VERSION: ${{matrix.node}}.0.0 @@ -101,7 +101,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['4', '5', '6', '7', '8', '9', '10', '11', '12', '13'] + node: ['4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14'] arch: [arm, arm64, s390x] env: ARCH: ${{matrix.arch}} From 887c624dab8b43a8f537842918dc54403627fdec Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Thu, 21 May 2020 11:05:59 -0700 Subject: [PATCH 4/8] Bump grpc to 1.24.3 --- packages/grpc-native-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index fad9de05d..eab841970 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "1.24.2", + "version": "1.24.3", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "https://grpc.io/", From 67e54ccf9a866c53dfa5f5e375bae46fe73f13ca Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 1 Jun 2020 09:20:53 -0700 Subject: [PATCH 5/8] Update dependency on node-pre-gyp --- packages/grpc-native-core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grpc-native-core/package.json b/packages/grpc-native-core/package.json index eab841970..309124daf 100644 --- a/packages/grpc-native-core/package.json +++ b/packages/grpc-native-core/package.json @@ -30,7 +30,7 @@ "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", "nan": "^2.13.2", - "node-pre-gyp": "^0.14.0", + "node-pre-gyp": "^0.15.0", "protobufjs": "^5.0.3" }, "devDependencies": { From acffaf27eed4a5d95a4c1223f8b67ae3b249ab36 Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 1 Jun 2020 09:25:30 -0700 Subject: [PATCH 6/8] Add pre-deprecation warning to README --- packages/grpc-native-core/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/grpc-native-core/README.md b/packages/grpc-native-core/README.md index f9b6bc1ae..02034c335 100644 --- a/packages/grpc-native-core/README.md +++ b/packages/grpc-native-core/README.md @@ -1,6 +1,8 @@ [![npm](https://img.shields.io/npm/v/grpc.svg)](https://www.npmjs.com/package/grpc) # Node.js gRPC Library +**This library is now only receiving bug fixes and runtime compatibility updates. In April 2021 it will be deprecated and will no longer receive any updates.** + ## PREREQUISITES - `node`: This requires `node` to be installed, version `4.0` or above. If you instead have the `nodejs` executable on Debian, you should install the [`nodejs-legacy`](https://packages.debian.org/sid/nodejs-legacy) package. From 8f11f521854eb15aa54307ec3a2545146f65bb1b Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 1 Jun 2020 09:59:53 -0700 Subject: [PATCH 7/8] Use Node 14 to do all builds --- .github/workflows/build.yml | 4 ++-- tools/release/alpine_artifact/Dockerfile | 2 +- tools/release/cross/Dockerfile | 2 +- tools/release/native/Dockerfile | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 578f6b92b..8aa1374c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,7 @@ jobs: submodules: recursive - uses: actions/setup-node@v1.1.0 with: - node-version: 12 + node-version: 14 - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.0.0 if: ${{matrix.os == 'windows-latest'}} @@ -61,7 +61,7 @@ jobs: submodules: recursive - uses: actions/setup-node@v1.1.0 with: - node-version: 12 + node-version: 14 - name: Setup MSBuild uses: microsoft/setup-msbuild@v1.0.0 if: ${{matrix.os == 'windows-latest'}} diff --git a/tools/release/alpine_artifact/Dockerfile b/tools/release/alpine_artifact/Dockerfile index 728ccd02d..c4b50b92f 100644 --- a/tools/release/alpine_artifact/Dockerfile +++ b/tools/release/alpine_artifact/Dockerfile @@ -1,2 +1,2 @@ -FROM node:10-alpine +FROM node:14-alpine RUN apk add --no-cache python curl bash build-base diff --git a/tools/release/cross/Dockerfile b/tools/release/cross/Dockerfile index 9f3e6e975..0cef4347b 100644 --- a/tools/release/cross/Dockerfile +++ b/tools/release/cross/Dockerfile @@ -10,4 +10,4 @@ ENV NVM_DIR /usr/local/nvm RUN curl curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash -RUN /bin/bash -l -c "nvm install 12" \ No newline at end of file +RUN /bin/bash -l -c "nvm install 14" \ No newline at end of file diff --git a/tools/release/native/Dockerfile b/tools/release/native/Dockerfile index a7ece97ad..14a2e9a2d 100644 --- a/tools/release/native/Dockerfile +++ b/tools/release/native/Dockerfile @@ -13,4 +13,4 @@ ENV NVM_DIR /usr/local/nvm RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash -RUN /bin/bash -l -c "nvm install 12" +RUN /bin/bash -l -c "nvm install 14" From 0c6c2e3817ddc99ce6388da919490043941fd5db Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Mon, 1 Jun 2020 11:24:37 -0700 Subject: [PATCH 8/8] Use a newer version of setup-node --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8aa1374c6..9b151c3f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - uses: actions/setup-node@v1.1.0 + - uses: actions/setup-node@v1.4.2 with: node-version: 14 - name: Setup MSBuild @@ -59,7 +59,7 @@ jobs: - uses: actions/checkout@v2 with: submodules: recursive - - uses: actions/setup-node@v1.1.0 + - uses: actions/setup-node@v1.4.2 with: node-version: 14 - name: Setup MSBuild