From 874340dce8393f218f0ce637e8d8bf2e00f941ea Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 3 Aug 2023 18:48:13 +0000 Subject: [PATCH 01/13] docs: fix node release schedule link Co-authored-by: Jeffrey Rennie Source-Link: https://github.com/googleapis/synthtool/commit/1a2431537d603e95b4b32317fb494542f75a2165 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.cfg | 2 +- .kokoro/continuous/node14/common.cfg | 24 ++++++++++++++++++++++ .kokoro/continuous/node14/lint.cfg | 4 ++++ .kokoro/continuous/node14/samples-test.cfg | 12 +++++++++++ .kokoro/continuous/node14/system-test.cfg | 12 +++++++++++ .kokoro/continuous/node14/test.cfg | 0 .kokoro/presubmit/node14/common.cfg | 24 ++++++++++++++++++++++ .kokoro/presubmit/node14/samples-test.cfg | 12 +++++++++++ .kokoro/presubmit/node14/system-test.cfg | 12 +++++++++++ .kokoro/presubmit/node14/test.cfg | 0 .kokoro/release/docs.cfg | 2 +- .kokoro/release/publish.cfg | 2 +- .kokoro/samples-test.sh | 2 +- .kokoro/system-test.sh | 2 +- .kokoro/test.bat | 2 +- .kokoro/test.sh | 2 +- README.md | 2 +- 18 files changed, 110 insertions(+), 10 deletions(-) create mode 100644 .kokoro/continuous/node14/common.cfg create mode 100644 .kokoro/continuous/node14/lint.cfg create mode 100644 .kokoro/continuous/node14/samples-test.cfg create mode 100644 .kokoro/continuous/node14/system-test.cfg create mode 100644 .kokoro/continuous/node14/test.cfg create mode 100644 .kokoro/presubmit/node14/common.cfg create mode 100644 .kokoro/presubmit/node14/samples-test.cfg create mode 100644 .kokoro/presubmit/node14/system-test.cfg create mode 100644 .kokoro/presubmit/node14/test.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 21ad18bd..a3d003c6 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest - digest: sha256:0527a86c10b67742c409dc726ba9a31ec4e69b0006e3d7a49b0e6686c59cdaa9 -# created: 2023-05-24T20:32:43.844586914Z + digest: sha256:e08f9a3757808cdaf7a377e962308c65c4d7eff12db206d4fae702dd50d43430 +# created: 2023-08-03T18:46:14.719706948Z diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg index e4b4075a..3db21693 100644 --- a/.kokoro/common.cfg +++ b/.kokoro/common.cfg @@ -16,7 +16,7 @@ build_file: "cloud-profiler-nodejs/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { key: "TRAMPOLINE_BUILD_FILE" diff --git a/.kokoro/continuous/node14/common.cfg b/.kokoro/continuous/node14/common.cfg new file mode 100644 index 00000000..3db21693 --- /dev/null +++ b/.kokoro/continuous/node14/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "cloud-profiler-nodejs/.kokoro/trampoline_v2.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-profiler-nodejs/.kokoro/test.sh" +} diff --git a/.kokoro/continuous/node14/lint.cfg b/.kokoro/continuous/node14/lint.cfg new file mode 100644 index 00000000..2c5b2bb0 --- /dev/null +++ b/.kokoro/continuous/node14/lint.cfg @@ -0,0 +1,4 @@ +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-profiler-nodejs/.kokoro/lint.sh" +} diff --git a/.kokoro/continuous/node14/samples-test.cfg b/.kokoro/continuous/node14/samples-test.cfg new file mode 100644 index 00000000..8daa53b6 --- /dev/null +++ b/.kokoro/continuous/node14/samples-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-profiler-nodejs/.kokoro/samples-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/continuous/node14/system-test.cfg b/.kokoro/continuous/node14/system-test.cfg new file mode 100644 index 00000000..ca5342b3 --- /dev/null +++ b/.kokoro/continuous/node14/system-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-profiler-nodejs/.kokoro/system-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/continuous/node14/test.cfg b/.kokoro/continuous/node14/test.cfg new file mode 100644 index 00000000..e69de29b diff --git a/.kokoro/presubmit/node14/common.cfg b/.kokoro/presubmit/node14/common.cfg new file mode 100644 index 00000000..3db21693 --- /dev/null +++ b/.kokoro/presubmit/node14/common.cfg @@ -0,0 +1,24 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "cloud-profiler-nodejs/.kokoro/trampoline_v2.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" +} +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-profiler-nodejs/.kokoro/test.sh" +} diff --git a/.kokoro/presubmit/node14/samples-test.cfg b/.kokoro/presubmit/node14/samples-test.cfg new file mode 100644 index 00000000..8daa53b6 --- /dev/null +++ b/.kokoro/presubmit/node14/samples-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-profiler-nodejs/.kokoro/samples-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/presubmit/node14/system-test.cfg b/.kokoro/presubmit/node14/system-test.cfg new file mode 100644 index 00000000..ca5342b3 --- /dev/null +++ b/.kokoro/presubmit/node14/system-test.cfg @@ -0,0 +1,12 @@ +# Download resources for system tests (service account key, etc.) +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/cloud-profiler-nodejs/.kokoro/system-test.sh" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "long-door-651-kokoro-system-test-service-account" +} \ No newline at end of file diff --git a/.kokoro/presubmit/node14/test.cfg b/.kokoro/presubmit/node14/test.cfg new file mode 100644 index 00000000..e69de29b diff --git a/.kokoro/release/docs.cfg b/.kokoro/release/docs.cfg index 87d6e519..a0da41df 100644 --- a/.kokoro/release/docs.cfg +++ b/.kokoro/release/docs.cfg @@ -11,7 +11,7 @@ before_action { # doc publications use a Python image. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } # Download trampoline resources. diff --git a/.kokoro/release/publish.cfg b/.kokoro/release/publish.cfg index d6121543..a269edef 100644 --- a/.kokoro/release/publish.cfg +++ b/.kokoro/release/publish.cfg @@ -30,7 +30,7 @@ build_file: "cloud-profiler-nodejs/.kokoro/trampoline_v2.sh" # Configure the docker image for kokoro-trampoline. env_vars: { key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" + value: "gcr.io/cloud-devrel-kokoro-resources/node:14-user" } env_vars: { diff --git a/.kokoro/samples-test.sh b/.kokoro/samples-test.sh index 806c0082..8c5d108c 100755 --- a/.kokoro/samples-test.sh +++ b/.kokoro/samples-test.sh @@ -56,7 +56,7 @@ fi # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/.kokoro/system-test.sh b/.kokoro/system-test.sh index 0201e9df..0b3043d2 100755 --- a/.kokoro/system-test.sh +++ b/.kokoro/system-test.sh @@ -49,7 +49,7 @@ npm run system-test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/.kokoro/test.bat b/.kokoro/test.bat index ae59e59b..0bb12405 100644 --- a/.kokoro/test.bat +++ b/.kokoro/test.bat @@ -21,7 +21,7 @@ cd .. @rem we upgrade Node.js in the image: SET PATH=%PATH%;/cygdrive/c/Program Files/nodejs/npm -call nvm use v12.14.1 +call nvm use v14.17.3 call which node call npm install || goto :error diff --git a/.kokoro/test.sh b/.kokoro/test.sh index a5c7ac04..862d478d 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -39,7 +39,7 @@ npm test # codecov combines coverage across integration and unit tests. Include # the logic below for any environment you wish to collect coverage for: -COVERAGE_NODE=12 +COVERAGE_NODE=14 if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then NYC_BIN=./node_modules/nyc/bin/nyc.js if [ -f "$NYC_BIN" ]; then diff --git a/README.md b/README.md index 59ad8ca5..e907b4a0 100644 --- a/README.md +++ b/README.md @@ -349,7 +349,7 @@ also contains samples. ## Supported Node.js Versions -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js. If you are using an end-of-life version of Node.js, we recommend that you update From 1f63dd09cfcd9132c641919520759f62135d2f7c Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 10 Aug 2023 12:54:00 -0700 Subject: [PATCH 02/13] update deps --- .kokoro/continuous/node12/common.cfg | 24 ---------------------- .kokoro/continuous/node12/lint.cfg | 4 ---- .kokoro/continuous/node12/samples-test.cfg | 12 ----------- .kokoro/continuous/node12/system-test.cfg | 12 ----------- .kokoro/continuous/node12/test.cfg | 0 .kokoro/presubmit/node12/common.cfg | 24 ---------------------- .kokoro/presubmit/node12/samples-test.cfg | 12 ----------- .kokoro/presubmit/node12/system-test.cfg | 12 ----------- .kokoro/presubmit/node12/test.cfg | 0 package.json | 16 +++++++-------- samples/package.json | 4 ++-- 11 files changed, 10 insertions(+), 110 deletions(-) delete mode 100644 .kokoro/continuous/node12/common.cfg delete mode 100644 .kokoro/continuous/node12/lint.cfg delete mode 100644 .kokoro/continuous/node12/samples-test.cfg delete mode 100644 .kokoro/continuous/node12/system-test.cfg delete mode 100644 .kokoro/continuous/node12/test.cfg delete mode 100644 .kokoro/presubmit/node12/common.cfg delete mode 100644 .kokoro/presubmit/node12/samples-test.cfg delete mode 100644 .kokoro/presubmit/node12/system-test.cfg delete mode 100644 .kokoro/presubmit/node12/test.cfg diff --git a/.kokoro/continuous/node12/common.cfg b/.kokoro/continuous/node12/common.cfg deleted file mode 100644 index e4b4075a..00000000 --- a/.kokoro/continuous/node12/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "cloud-profiler-nodejs/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/test.sh" -} diff --git a/.kokoro/continuous/node12/lint.cfg b/.kokoro/continuous/node12/lint.cfg deleted file mode 100644 index 2c5b2bb0..00000000 --- a/.kokoro/continuous/node12/lint.cfg +++ /dev/null @@ -1,4 +0,0 @@ -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/lint.sh" -} diff --git a/.kokoro/continuous/node12/samples-test.cfg b/.kokoro/continuous/node12/samples-test.cfg deleted file mode 100644 index 8daa53b6..00000000 --- a/.kokoro/continuous/node12/samples-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/samples-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/continuous/node12/system-test.cfg b/.kokoro/continuous/node12/system-test.cfg deleted file mode 100644 index ca5342b3..00000000 --- a/.kokoro/continuous/node12/system-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/system-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/continuous/node12/test.cfg b/.kokoro/continuous/node12/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/.kokoro/presubmit/node12/common.cfg b/.kokoro/presubmit/node12/common.cfg deleted file mode 100644 index e4b4075a..00000000 --- a/.kokoro/presubmit/node12/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "cloud-profiler-nodejs/.kokoro/trampoline_v2.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:12-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/test.sh" -} diff --git a/.kokoro/presubmit/node12/samples-test.cfg b/.kokoro/presubmit/node12/samples-test.cfg deleted file mode 100644 index 8daa53b6..00000000 --- a/.kokoro/presubmit/node12/samples-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/samples-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/presubmit/node12/system-test.cfg b/.kokoro/presubmit/node12/system-test.cfg deleted file mode 100644 index ca5342b3..00000000 --- a/.kokoro/presubmit/node12/system-test.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Download resources for system tests (service account key, etc.) -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/system-test.sh" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "long-door-651-kokoro-system-test-service-account" -} \ No newline at end of file diff --git a/.kokoro/presubmit/node12/test.cfg b/.kokoro/presubmit/node12/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/package.json b/package.json index ee5ea556..cf02aaec 100644 --- a/package.json +++ b/package.json @@ -27,33 +27,33 @@ }, "license": "Apache-2.0", "dependencies": { - "@google-cloud/common": "^4.0.0", + "@google-cloud/common": "^5.0.0", "@google-cloud/logging-min": "^10.0.0", "@types/console-log-level": "^1.4.0", "@types/semver": "^7.0.0", "console-log-level": "^1.4.0", "delay": "^5.0.0", "extend": "^3.0.2", - "gcp-metadata": "^4.0.0", + "gcp-metadata": "^6.0.0", "parse-duration": "^1.0.0", "pprof": "3.2.1", "pretty-ms": "^7.0.0", "protobufjs": "~7.2.4", "semver": "^7.0.0", - "teeny-request": "^8.0.0" + "teeny-request": "^9.0.0" }, "devDependencies": { "@types/extend": "^3.0.0", "@types/long": "^4.0.0", "@types/mocha": "^9.0.0", "@types/nock": "^10.0.0", - "@types/node": "^18.0.0", + "@types/node": "^20.4.9", "@types/pretty-ms": "^4.0.0", "@types/sinon": "^10.0.0", "@types/tmp": "0.2.3", - "c8": "^8.0.0", + "c8": "^8.0.1", "codecov": "^3.0.0", - "gts": "^3.1.0", + "gts": "^5.0.0", "js-green-licenses": "^4.0.0", "jsdoc": "^4.0.0", "jsdoc-fresh": "^2.0.0", @@ -64,7 +64,7 @@ "sinon": "^15.0.0", "source-map": "^0.7.0", "tmp": "0.2.1", - "typescript": "^4.7.2" + "typescript": "^5.1.6" }, "files": [ "build/src", @@ -77,6 +77,6 @@ ] }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" } } diff --git a/samples/package.json b/samples/package.json index 801d2723..e64d3cc2 100644 --- a/samples/package.json +++ b/samples/package.json @@ -8,7 +8,7 @@ "test": "echo 'no test yet'" }, "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "repository": { "type": "git", @@ -22,4 +22,4 @@ "files": [ "*.js" ] -} +} \ No newline at end of file From f275a26fbd6fd9447b42da8090f960492ec8eac1 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 10 Aug 2023 12:58:24 -0700 Subject: [PATCH 03/13] test node 14+ --- .github/sync-repo-settings.yaml | 2 +- .github/workflows/ci.yaml | 2 +- .github/workflows/ci2.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 0be16649..accde8ce 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -34,7 +34,7 @@ branchProtectionRules: - "cla/google" - "docs" - "lint" - - "test (12)" - "test (14)" - "test (16)" + - "test (18)" - "system-test" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 457c72c3..3902369d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [12, 14, 16] + node: [14, 16, 18] steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 diff --git a/.github/workflows/ci2.yaml b/.github/workflows/ci2.yaml index cbe7730d..3ea1729b 100644 --- a/.github/workflows/ci2.yaml +++ b/.github/workflows/ci2.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 12 + node-version: 14 - run: npm install - run: npm run system-test - name: coverage From ccfeb4d1fc476ef66bc752086dded1a7198bff21 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 10 Aug 2023 13:01:38 -0700 Subject: [PATCH 04/13] run lint --- src/profiler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/profiler.ts b/src/profiler.ts index 1931d443..4cbb1f20 100644 --- a/src/profiler.ts +++ b/src/profiler.ts @@ -197,7 +197,10 @@ async function profileBytes(p: perftools.profiles.IProfile): Promise { * Error constructed from HTTP server response which indicates backoff. */ export class BackoffResponseError extends Error { - constructor(message: string | undefined, readonly backoffMillis: number) { + constructor( + message: string | undefined, + readonly backoffMillis: number + ) { super(message); } } From ad0c866d682b255ff5a01ee49f3f60decb45a337 Mon Sep 17 00:00:00 2001 From: Sofia Leon Date: Thu, 10 Aug 2023 14:53:09 -0700 Subject: [PATCH 05/13] upgrade system test to node 12 --- .kokoro/continuous/node13/common.cfg | 24 ------------------------ .kokoro/continuous/node13/test.cfg | 0 system-test/busybench/package.json | 2 +- system-test/integration_test.go | 12 ++++++------ 4 files changed, 7 insertions(+), 31 deletions(-) delete mode 100644 .kokoro/continuous/node13/common.cfg delete mode 100644 .kokoro/continuous/node13/test.cfg diff --git a/.kokoro/continuous/node13/common.cfg b/.kokoro/continuous/node13/common.cfg deleted file mode 100644 index 884185a7..00000000 --- a/.kokoro/continuous/node13/common.cfg +++ /dev/null @@ -1,24 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "cloud-profiler-nodejs/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:13-user" -} -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/cloud-profiler-nodejs/.kokoro/test.sh" -} diff --git a/.kokoro/continuous/node13/test.cfg b/.kokoro/continuous/node13/test.cfg deleted file mode 100644 index e69de29b..00000000 diff --git a/system-test/busybench/package.json b/system-test/busybench/package.json index 8c456ec1..08931958 100644 --- a/system-test/busybench/package.json +++ b/system-test/busybench/package.json @@ -8,7 +8,7 @@ "build/src" ], "engines": { - "node": ">=12.0.0" + "node": ">=14.0.0" }, "license": "Apache-2.0", "keywords": [], diff --git a/system-test/integration_test.go b/system-test/integration_test.go index 7cfa9fef..7f723da6 100644 --- a/system-test/integration_test.go +++ b/system-test/integration_test.go @@ -265,12 +265,12 @@ func TestAgentIntegration(t *testing.T) { InstanceConfig: proftest.InstanceConfig{ ProjectID: projectID, Zone: zone, - Name: fmt.Sprintf("profiler-test-node12-%s", runID), + Name: fmt.Sprintf("profiler-test-node14-%s", runID), MachineType: "n1-standard-1", }, - name: fmt.Sprintf("profiler-test-node12-%s-gce", runID), + name: fmt.Sprintf("profiler-test-node14-%s-gce", runID), wantProfiles: wantProfiles, - nodeVersion: "12", + nodeVersion: "14", timeout: gceTestTimeout, benchDuration: gceBenchDuration, }, @@ -295,16 +295,16 @@ func TestAgentIntegration(t *testing.T) { InstanceConfig: proftest.InstanceConfig{ ProjectID: projectID, Zone: zone, - Name: fmt.Sprintf("profiler-backoff-test-node12-%s", runID), + Name: fmt.Sprintf("profiler-backoff-test-node14-%s", runID), // Running many copies of the benchmark requires more // memory than is available on an n1-standard-1. Use a // machine type with more memory for backoff test. MachineType: "n1-highmem-2", }, - name: fmt.Sprintf("profiler-backoff-test-node12-%s", runID), + name: fmt.Sprintf("profiler-backoff-test-node14-%s", runID), backoffTest: true, - nodeVersion: "12", + nodeVersion: "14", timeout: backoffTestTimeout, benchDuration: backoffBenchDuration, }) From 3a2bb864d5f449e506bd9917315842183a82e183 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 16:19:18 +0000 Subject: [PATCH 06/13] UNDO ME: turn on test.v flag --- system-test/integration_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-test/integration_test.sh b/system-test/integration_test.sh index 7dba8fec..98394abd 100755 --- a/system-test/integration_test.sh +++ b/system-test/integration_test.sh @@ -49,5 +49,5 @@ retry go test -c -tags=integration . if [ "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" = "" ]; then ./e2e.test -commit="$COMMIT" -branch="$BRANCH" -repo="$REPO" -run_backoff_test=true else - ./e2e.test -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" + ./e2e.test -test.v -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" fi From acde4424ec5c28310c2f550828142db639816b76 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 16:21:15 +0000 Subject: [PATCH 07/13] Revert "UNDO ME: turn on test.v flag" This reverts commit 3a2bb864d5f449e506bd9917315842183a82e183. --- system-test/integration_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-test/integration_test.sh b/system-test/integration_test.sh index 98394abd..7dba8fec 100755 --- a/system-test/integration_test.sh +++ b/system-test/integration_test.sh @@ -49,5 +49,5 @@ retry go test -c -tags=integration . if [ "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" = "" ]; then ./e2e.test -commit="$COMMIT" -branch="$BRANCH" -repo="$REPO" -run_backoff_test=true else - ./e2e.test -test.v -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" + ./e2e.test -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" fi From baebda6f54cabeedcc349379298cae9eeffde060 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 16:22:09 +0000 Subject: [PATCH 08/13] update integration_test.go nodejs versions to 14, 16, and 18 --- system-test/integration_test.go | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/system-test/integration_test.go b/system-test/integration_test.go index 7f723da6..f0777ff7 100644 --- a/system-test/integration_test.go +++ b/system-test/integration_test.go @@ -278,12 +278,25 @@ func TestAgentIntegration(t *testing.T) { InstanceConfig: proftest.InstanceConfig{ ProjectID: projectID, Zone: zone, - Name: fmt.Sprintf("profiler-test-node14-%s", runID), + Name: fmt.Sprint4("profiler-test-node16-%s", runID), MachineType: "n1-standard-1", }, - name: fmt.Sprintf("profiler-test-node14-%s-gce", runID), + name: fmt.Sprintf("profiler-test-node16-%s-gce", runID), wantProfiles: wantProfiles, - nodeVersion: "14", + nodeVersion: "16", + timeout: gceTestTimeout, + benchDuration: gceBenchDuration, + }, + { + InstanceConfig: proftest.InstanceConfig{ + ProjectID: projectID, + Zone: zone, + Name: fmt.Sprint4("profiler-test-node18-%s", runID), + MachineType: "n1-standard-1", + }, + name: fmt.Sprintf("profiler-test-node18-%s-gce", runID), + wantProfiles: wantProfiles, + nodeVersion: "18", timeout: gceTestTimeout, benchDuration: gceBenchDuration, }, From 5005d7a31c5b511e6d70381f718e4848766ee235 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 16:23:06 +0000 Subject: [PATCH 09/13] fix typo --- system-test/integration_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-test/integration_test.go b/system-test/integration_test.go index f0777ff7..8e1caba2 100644 --- a/system-test/integration_test.go +++ b/system-test/integration_test.go @@ -278,7 +278,7 @@ func TestAgentIntegration(t *testing.T) { InstanceConfig: proftest.InstanceConfig{ ProjectID: projectID, Zone: zone, - Name: fmt.Sprint4("profiler-test-node16-%s", runID), + Name: fmt.Sprintf("profiler-test-node16-%s", runID), MachineType: "n1-standard-1", }, name: fmt.Sprintf("profiler-test-node16-%s-gce", runID), @@ -291,7 +291,7 @@ func TestAgentIntegration(t *testing.T) { InstanceConfig: proftest.InstanceConfig{ ProjectID: projectID, Zone: zone, - Name: fmt.Sprint4("profiler-test-node18-%s", runID), + Name: fmt.Sprintf("profiler-test-node18-%s", runID), MachineType: "n1-standard-1", }, name: fmt.Sprintf("profiler-test-node18-%s-gce", runID), From f0b5cd196eaceaceb5f4321ce28d3de68a96b565 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 19:09:53 +0000 Subject: [PATCH 10/13] install needed deps --- system-test/integration_test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system-test/integration_test.sh b/system-test/integration_test.sh index 7dba8fec..a392fae4 100755 --- a/system-test/integration_test.sh +++ b/system-test/integration_test.sh @@ -14,6 +14,10 @@ set -eo pipefail # Display commands being run. set -x +# Install apt based deps +apt update +apt install -y build-essential + cd $(dirname $0)/.. git config --global --add safe.directory /tmpfs/src/github/cloud-profiler-nodejs @@ -49,5 +53,5 @@ retry go test -c -tags=integration . if [ "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" = "" ]; then ./e2e.test -commit="$COMMIT" -branch="$BRANCH" -repo="$REPO" -run_backoff_test=true else - ./e2e.test -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" + ./e2e.test -test.v -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" fi From 2c60c14e36a76c59740c05f7411c79aadbe3422c Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 19:28:06 +0000 Subject: [PATCH 11/13] Install make explicitly --- system-test/integration_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-test/integration_test.sh b/system-test/integration_test.sh index a392fae4..c676d319 100755 --- a/system-test/integration_test.sh +++ b/system-test/integration_test.sh @@ -15,8 +15,8 @@ set -eo pipefail set -x # Install apt based deps -apt update -apt install -y build-essential +apt-get update +apt-get install -y make cd $(dirname $0)/.. From e5c08e12e32645d7ab6d31fd6758ca65dc637782 Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 19:46:29 +0000 Subject: [PATCH 12/13] actually, it needs to be installed in the gce vm --- system-test/integration_test.go | 2 +- system-test/integration_test.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/system-test/integration_test.go b/system-test/integration_test.go index 8e1caba2..946a300f 100644 --- a/system-test/integration_test.go +++ b/system-test/integration_test.go @@ -70,7 +70,7 @@ npm_install() { # Install git retry apt-get update >/dev/null -retry apt-get -y -q install git >/dev/null +retry apt-get -y -q install git build-essential >/dev/null # Install desired version of Node.js retry curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash >/dev/null diff --git a/system-test/integration_test.sh b/system-test/integration_test.sh index c676d319..98394abd 100755 --- a/system-test/integration_test.sh +++ b/system-test/integration_test.sh @@ -14,10 +14,6 @@ set -eo pipefail # Display commands being run. set -x -# Install apt based deps -apt-get update -apt-get install -y make - cd $(dirname $0)/.. git config --global --add safe.directory /tmpfs/src/github/cloud-profiler-nodejs From 9f6bf0f4ed8856c1ded4b50a95029cf772e5ad9f Mon Sep 17 00:00:00 2001 From: Aaron Abbott Date: Fri, 11 Aug 2023 20:36:37 +0000 Subject: [PATCH 13/13] Remove -test.v flag --- system-test/integration_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system-test/integration_test.sh b/system-test/integration_test.sh index 98394abd..7dba8fec 100755 --- a/system-test/integration_test.sh +++ b/system-test/integration_test.sh @@ -49,5 +49,5 @@ retry go test -c -tags=integration . if [ "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" = "" ]; then ./e2e.test -commit="$COMMIT" -branch="$BRANCH" -repo="$REPO" -run_backoff_test=true else - ./e2e.test -test.v -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" + ./e2e.test -commit="$COMMIT" -pr="$KOKORO_GITHUB_PULL_REQUEST_NUMBER" fi