diff --git a/src/autoscaler-common/logger.js b/src/autoscaler-common/logger.js index 6b8d2e5a..8a097082 100644 --- a/src/autoscaler-common/logger.js +++ b/src/autoscaler-common/logger.js @@ -18,6 +18,21 @@ const bunyan = require('bunyan'); const {LoggingBunyan} = require('@google-cloud/logging-bunyan'); +/** + * Return a bunyan level based on environment variables (or lack thereof). + * + * @return {bunyan.LogLevel} + */ +function getLogLevel() { + if (process.env.LOG_LEVEL) { + return bunyan.levelFromName[process.env.LOG_LEVEL.toLowerCase()]; + } else if (process.env.NODE_ENV?.toLowerCase() === 'test') { + return bunyan.FATAL; + } else { + return bunyan.DEBUG; + } +} + // Create logging client. const loggingBunyan = new LoggingBunyan({ redirectToStdout: true, @@ -29,7 +44,7 @@ const loggingBunyan = new LoggingBunyan({ const logger = bunyan.createLogger({ name: 'cloud-spanner-autoscaler', streams: [ - loggingBunyan.stream('trace'), + loggingBunyan.stream(getLogLevel()), ], }); diff --git a/src/package-lock.json b/src/package-lock.json index 0266b71d..8f1b4e69 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -1309,22 +1309,22 @@ } }, "node_modules/@google-cloud/pubsub": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-4.1.0.tgz", - "integrity": "sha512-8+TLZsK2qK56vL3K21fsYexPdI9zrJAE/Xmyj4MIEFpi91r5sUrvsSSL2wBXzvEP0k4kMrCrKU5kGIGp9JecQg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-4.3.2.tgz", + "integrity": "sha512-R7UJcrwwVHjH7MeYqO40lp5yY/xTC80adSQgLDxF6BhQh3AUb+/ijR6ayxIoHJoa3gDRzCux46Xepo6SEMc56g==", "dependencies": { "@google-cloud/paginator": "^5.0.0", "@google-cloud/precise-date": "^4.0.0", "@google-cloud/projectify": "^4.0.0", "@google-cloud/promisify": "^4.0.0", "@opentelemetry/api": "^1.6.0", - "@opentelemetry/semantic-conventions": "~1.18.0", + "@opentelemetry/semantic-conventions": "~1.21.0", "@types/duplexify": "^3.6.0", "@types/long": "^4.0.0", "arrify": "^2.0.0", "extend": "^3.0.2", - "google-auth-library": "^9.0.0", - "google-gax": "^4.0.4", + "google-auth-library": "^9.3.0", + "google-gax": "^4.3.1", "heap-js": "^2.2.0", "is-stream-ended": "^0.1.4", "lodash.snakecase": "^4.1.1", @@ -1351,9 +1351,9 @@ } }, "node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js": { - "version": "1.9.12", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.12.tgz", - "integrity": "sha512-Um5MBuge32TS3lAKX02PGCnFM4xPT996yLgZNb5H03pn6NyJ4Iwn5YcPq6Jj9yxGRk7WOgaZFtVRH5iTdYBeUg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.1.tgz", + "integrity": "sha512-55ONqFytZExfOIjF1RjXPcVmT/jJqFzbbDqxK9jmRV4nxiYWtL9hENSW1Jfx0SdZfrvoqd44YJ/GJTqfRrawSQ==", "dependencies": { "@grpc/proto-loader": "^0.7.8", "@types/node": ">=12.12.47" @@ -1374,9 +1374,9 @@ } }, "node_modules/@google-cloud/pubsub/node_modules/gaxios": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.1.1.tgz", - "integrity": "sha512-bw8smrX+XlAoo9o1JAksBwX+hi/RG15J+NTSxmNPIclKC3ZVK6C2afwY8OSdRvOK0+ZLecUJYtj2MmjOt3Dm0w==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.3.0.tgz", + "integrity": "sha512-p+ggrQw3fBwH2F5N/PAI4k/G/y1art5OxKpb2J2chwNNHM4hHuAOtivjPuirMF4KNKwTTUal/lPfL2+7h2mEcg==", "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", @@ -1400,9 +1400,9 @@ } }, "node_modules/@google-cloud/pubsub/node_modules/google-auth-library": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.4.1.tgz", - "integrity": "sha512-Chs7cuzDuav8W/BXOoRgSXw4u0zxYtuqAHETDR5Q6dG1RwNwz7NUKjsDDHAsBV3KkiiJBtJqjbzy1XU1L41w1g==", + "version": "9.6.3", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.6.3.tgz", + "integrity": "sha512-4CacM29MLC2eT9Cey5GDVK4Q8t+MMp8+OEdOaqD9MG6b0dOyLORaaeJMPQ7EESVgm/+z5EKYyFLxgzBJlJgyHQ==", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", @@ -1416,30 +1416,31 @@ } }, "node_modules/@google-cloud/pubsub/node_modules/google-gax": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.0.5.tgz", - "integrity": "sha512-yLoYtp4zE+8OQA74oBEbNkbzI6c95W01JSL7RqC8XERKpRvj3ytZp1dgnbA6G9aRsc8pZB25xWYBcCmrbYOEhA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.3.1.tgz", + "integrity": "sha512-qpSfslpwqToIgQ+Tf3MjWIDjYK4UFIZ0uz6nLtttlW9N1NQA4PhGf9tlGo6KDYJ4rgL2w4CjXVd0z5yeNpN/Iw==", "dependencies": { - "@grpc/grpc-js": "~1.9.6", + "@grpc/grpc-js": "~1.10.0", "@grpc/proto-loader": "^0.7.0", "@types/long": "^4.0.0", "abort-controller": "^3.0.0", "duplexify": "^4.0.0", - "google-auth-library": "^9.0.0", + "google-auth-library": "^9.3.0", "node-fetch": "^2.6.1", "object-hash": "^3.0.0", "proto3-json-serializer": "^2.0.0", - "protobufjs": "7.2.5", - "retry-request": "^7.0.0" + "protobufjs": "7.2.6", + "retry-request": "^7.0.0", + "uuid": "^9.0.1" }, "engines": { "node": ">=14" } }, "node_modules/@google-cloud/pubsub/node_modules/gtoken": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.0.1.tgz", - "integrity": "sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" @@ -1449,9 +1450,9 @@ } }, "node_modules/@google-cloud/pubsub/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -1461,20 +1462,20 @@ } }, "node_modules/@google-cloud/pubsub/node_modules/proto3-json-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-2.0.0.tgz", - "integrity": "sha512-FB/YaNrpiPkyQNSNPilpn8qn0KdEfkgmJ9JP93PQyF/U4bAiXY5BiUdDhiDO4S48uSQ6AesklgVlrKiqZPzegw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-2.0.1.tgz", + "integrity": "sha512-8awBvjO+FwkMd6gNoGFZyqkHZXCFd54CIYTb6De7dPaufGJ2XNW+QUNqbMr8MaAocMdb+KpsD4rxEOaTBDCffA==", "dependencies": { - "protobufjs": "^7.0.0" + "protobufjs": "^7.2.5" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@google-cloud/pubsub/node_modules/protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -1495,12 +1496,11 @@ } }, "node_modules/@google-cloud/pubsub/node_modules/retry-request": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-7.0.1.tgz", - "integrity": "sha512-ZI6vJp9rfB71mrZpw+n9p/B6HCsd7QJlSEQftZ+xfJzr3cQ9EPGKw1FF0BnViJ0fYREX6FhymBD2CARpmsFciQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-7.0.2.tgz", + "integrity": "sha512-dUOvLMJ0/JJYEn8NrpOaGNE7X3vpI5XlZS/u0ANjqtcZVKnIxP7IgCFwrKTxENw29emmwug53awKtaMm4i9g5w==", "dependencies": { "@types/request": "^2.48.8", - "debug": "^4.1.1", "extend": "^3.0.2", "teeny-request": "^9.0.0" }, @@ -1889,9 +1889,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.18.1.tgz", - "integrity": "sha512-+NLGHr6VZwcgE/2lw8zDIufOCGnzsA5CbQIMleXZTrgkBd0TanCX+MiDYJ1TOS4KL/Tqk0nFRxawnaYr6pkZkA==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.21.0.tgz", + "integrity": "sha512-lkC8kZYntxVKr7b8xmjCVUgE0a8xgDakPyDo9uSWavXPyYqLgYYGdEd2j8NxihRyb6UwpX3G/hFUF4/9q2V+/g==", "engines": { "node": ">=14" } @@ -2426,9 +2426,9 @@ } }, "node_modules/axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -5175,12 +5175,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha-suppress-logs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/mocha-suppress-logs/-/mocha-suppress-logs-0.4.1.tgz", - "integrity": "sha512-llHPy1sEEOSoQ04TzixavZjBy2g65Tu64GYaEl3m7JxL5T1XmUhkpifcJSfRxKlCWWFVZ+cLIq4WHmVRBwQpyQ==", - "dev": true - }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -7586,15 +7580,14 @@ "dependencies": { "@google-cloud/functions-framework": "^3.3.0", "@google-cloud/monitoring": "^4.0.0", - "@google-cloud/pubsub": "^4.1.0", + "@google-cloud/pubsub": "^4.3.2", "@google-cloud/spanner": "^6.16.0", "autoscaler-common": "file:../../autoscaler-common", - "axios": "^1.6.5", + "axios": "^1.6.7", "express": "^4.18.2" }, "devDependencies": { "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.4.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3", @@ -7606,7 +7599,7 @@ "dependencies": { "@google-cloud/firestore": "^6.8.0", "@google-cloud/functions-framework": "^3.3.0", - "@google-cloud/pubsub": "^4.1.0", + "@google-cloud/pubsub": "^4.3.2", "@google-cloud/spanner": "^6.16.0", "autoscaler-common": "file:../../autoscaler-common", "express": "^4.18.2", @@ -7615,7 +7608,6 @@ "devDependencies": { "@sinonjs/referee": "^10.0.1", "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.4.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3", diff --git a/src/poller/package-lock.json b/src/poller/package-lock.json index dddc8661..f7a88d68 100644 --- a/src/poller/package-lock.json +++ b/src/poller/package-lock.json @@ -689,22 +689,22 @@ } }, "node_modules/@google-cloud/pubsub": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-4.1.0.tgz", - "integrity": "sha512-8+TLZsK2qK56vL3K21fsYexPdI9zrJAE/Xmyj4MIEFpi91r5sUrvsSSL2wBXzvEP0k4kMrCrKU5kGIGp9JecQg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-4.3.2.tgz", + "integrity": "sha512-R7UJcrwwVHjH7MeYqO40lp5yY/xTC80adSQgLDxF6BhQh3AUb+/ijR6ayxIoHJoa3gDRzCux46Xepo6SEMc56g==", "dependencies": { "@google-cloud/paginator": "^5.0.0", "@google-cloud/precise-date": "^4.0.0", "@google-cloud/projectify": "^4.0.0", "@google-cloud/promisify": "^4.0.0", "@opentelemetry/api": "^1.6.0", - "@opentelemetry/semantic-conventions": "~1.18.0", + "@opentelemetry/semantic-conventions": "~1.21.0", "@types/duplexify": "^3.6.0", "@types/long": "^4.0.0", "arrify": "^2.0.0", "extend": "^3.0.2", - "google-auth-library": "^9.0.0", - "google-gax": "^4.0.4", + "google-auth-library": "^9.3.0", + "google-gax": "^4.3.1", "heap-js": "^2.2.0", "is-stream-ended": "^0.1.4", "lodash.snakecase": "^4.1.1", @@ -715,9 +715,9 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.9.12", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.12.tgz", - "integrity": "sha512-Um5MBuge32TS3lAKX02PGCnFM4xPT996yLgZNb5H03pn6NyJ4Iwn5YcPq6Jj9yxGRk7WOgaZFtVRH5iTdYBeUg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.1.tgz", + "integrity": "sha512-55ONqFytZExfOIjF1RjXPcVmT/jJqFzbbDqxK9jmRV4nxiYWtL9hENSW1Jfx0SdZfrvoqd44YJ/GJTqfRrawSQ==", "dependencies": { "@grpc/proto-loader": "^0.7.8", "@types/node": ">=12.12.47" @@ -1001,9 +1001,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.18.1.tgz", - "integrity": "sha512-+NLGHr6VZwcgE/2lw8zDIufOCGnzsA5CbQIMleXZTrgkBd0TanCX+MiDYJ1TOS4KL/Tqk0nFRxawnaYr6pkZkA==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.21.0.tgz", + "integrity": "sha512-lkC8kZYntxVKr7b8xmjCVUgE0a8xgDakPyDo9uSWavXPyYqLgYYGdEd2j8NxihRyb6UwpX3G/hFUF4/9q2V+/g==", "engines": { "node": ">=14" } @@ -1517,9 +1517,9 @@ } }, "node_modules/axios": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz", - "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==", + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz", + "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==", "dependencies": { "follow-redirects": "^1.15.4", "form-data": "^4.0.0", @@ -3001,14 +3001,14 @@ } }, "node_modules/google-auth-library": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.2.0.tgz", - "integrity": "sha512-1oV3p0JhNEhVbj26eF3FAJcv9MXXQt4S0wcvKZaDbl4oHq5V3UJoSbsGZGQNcjoCdhW4kDSwOs11wLlHog3fgQ==", + "version": "9.6.3", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.6.3.tgz", + "integrity": "sha512-4CacM29MLC2eT9Cey5GDVK4Q8t+MMp8+OEdOaqD9MG6b0dOyLORaaeJMPQ7EESVgm/+z5EKYyFLxgzBJlJgyHQ==", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^6.0.0", - "gcp-metadata": "^6.0.0", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", "gtoken": "^7.0.0", "jws": "^4.0.0" }, @@ -3017,26 +3017,39 @@ } }, "node_modules/google-gax": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.0.5.tgz", - "integrity": "sha512-yLoYtp4zE+8OQA74oBEbNkbzI6c95W01JSL7RqC8XERKpRvj3ytZp1dgnbA6G9aRsc8pZB25xWYBcCmrbYOEhA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.3.1.tgz", + "integrity": "sha512-qpSfslpwqToIgQ+Tf3MjWIDjYK4UFIZ0uz6nLtttlW9N1NQA4PhGf9tlGo6KDYJ4rgL2w4CjXVd0z5yeNpN/Iw==", "dependencies": { - "@grpc/grpc-js": "~1.9.6", + "@grpc/grpc-js": "~1.10.0", "@grpc/proto-loader": "^0.7.0", "@types/long": "^4.0.0", "abort-controller": "^3.0.0", "duplexify": "^4.0.0", - "google-auth-library": "^9.0.0", + "google-auth-library": "^9.3.0", "node-fetch": "^2.6.1", "object-hash": "^3.0.0", "proto3-json-serializer": "^2.0.0", - "protobufjs": "7.2.5", - "retry-request": "^7.0.0" + "protobufjs": "7.2.6", + "retry-request": "^7.0.0", + "uuid": "^9.0.1" }, "engines": { "node": ">=14" } }, + "node_modules/google-gax/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/google-p12-pem": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz", @@ -4092,12 +4105,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha-suppress-logs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/mocha-suppress-logs/-/mocha-suppress-logs-0.4.1.tgz", - "integrity": "sha512-llHPy1sEEOSoQ04TzixavZjBy2g65Tu64GYaEl3m7JxL5T1XmUhkpifcJSfRxKlCWWFVZ+cLIq4WHmVRBwQpyQ==", - "dev": true - }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -4944,9 +4951,9 @@ } }, "node_modules/protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -6380,15 +6387,14 @@ "dependencies": { "@google-cloud/functions-framework": "^3.3.0", "@google-cloud/monitoring": "^4.0.0", - "@google-cloud/pubsub": "^4.1.0", + "@google-cloud/pubsub": "^4.3.2", "@google-cloud/spanner": "^6.16.0", "autoscaler-common": "file:../../autoscaler-common", - "axios": "^1.6.5", + "axios": "^1.6.7", "express": "^4.18.2" }, "devDependencies": { "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.4.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3", diff --git a/src/poller/poller-core/package-lock.json b/src/poller/poller-core/package-lock.json index 08792942..06f016ab 100644 --- a/src/poller/poller-core/package-lock.json +++ b/src/poller/poller-core/package-lock.json @@ -17,7 +17,6 @@ }, "devDependencies": { "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.5.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3", @@ -2411,15 +2410,6 @@ "node": ">=12" } }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/cloudevents": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/cloudevents/-/cloudevents-7.0.2.tgz", @@ -4766,15 +4756,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha-suppress-logs": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mocha-suppress-logs/-/mocha-suppress-logs-0.5.1.tgz", - "integrity": "sha512-f4BhMiCABgCt3tlXiOcRydWreNCkfvgXgNL2ZclfXPdLNcY7jfyNy3Oi5wwPuxx++UyuNiIx3F7orvckAfrKzw==", - "dev": true, - "dependencies": { - "clone": "^2.1.2" - } - }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", diff --git a/src/poller/poller-core/package.json b/src/poller/poller-core/package.json index 88e9d9d3..53aea304 100644 --- a/src/poller/poller-core/package.json +++ b/src/poller/poller-core/package.json @@ -15,12 +15,10 @@ "scripts": { "start": "functions-framework --target=checkSpannerScaleMetricsHTTP", "debug": "node --inspect node_modules/.bin/functions-framework --target=checkSpannerScaleMetricsHTTP", - "test": "nyc --reporter=text mocha --recursive --require mocha-suppress-logs", - "test2": "nyc --reporter=text mocha --recursive" + "test": "NODE_ENV=test nyc --reporter=text mocha --recursive" }, "devDependencies": { "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.5.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3", diff --git a/src/scaler/package-lock.json b/src/scaler/package-lock.json index f55290ae..ad2dd221 100644 --- a/src/scaler/package-lock.json +++ b/src/scaler/package-lock.json @@ -974,22 +974,22 @@ } }, "node_modules/@google-cloud/pubsub": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-4.1.0.tgz", - "integrity": "sha512-8+TLZsK2qK56vL3K21fsYexPdI9zrJAE/Xmyj4MIEFpi91r5sUrvsSSL2wBXzvEP0k4kMrCrKU5kGIGp9JecQg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@google-cloud/pubsub/-/pubsub-4.3.2.tgz", + "integrity": "sha512-R7UJcrwwVHjH7MeYqO40lp5yY/xTC80adSQgLDxF6BhQh3AUb+/ijR6ayxIoHJoa3gDRzCux46Xepo6SEMc56g==", "dependencies": { "@google-cloud/paginator": "^5.0.0", "@google-cloud/precise-date": "^4.0.0", "@google-cloud/projectify": "^4.0.0", "@google-cloud/promisify": "^4.0.0", "@opentelemetry/api": "^1.6.0", - "@opentelemetry/semantic-conventions": "~1.18.0", + "@opentelemetry/semantic-conventions": "~1.21.0", "@types/duplexify": "^3.6.0", "@types/long": "^4.0.0", "arrify": "^2.0.0", "extend": "^3.0.2", - "google-auth-library": "^9.0.0", - "google-gax": "^4.0.4", + "google-auth-library": "^9.3.0", + "google-gax": "^4.3.1", "heap-js": "^2.2.0", "is-stream-ended": "^0.1.4", "lodash.snakecase": "^4.1.1", @@ -1265,9 +1265,9 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.9.12", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.12.tgz", - "integrity": "sha512-Um5MBuge32TS3lAKX02PGCnFM4xPT996yLgZNb5H03pn6NyJ4Iwn5YcPq6Jj9yxGRk7WOgaZFtVRH5iTdYBeUg==", + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.1.tgz", + "integrity": "sha512-55ONqFytZExfOIjF1RjXPcVmT/jJqFzbbDqxK9jmRV4nxiYWtL9hENSW1Jfx0SdZfrvoqd44YJ/GJTqfRrawSQ==", "dependencies": { "@grpc/proto-loader": "^0.7.8", "@types/node": ">=12.12.47" @@ -1521,9 +1521,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.18.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.18.1.tgz", - "integrity": "sha512-+NLGHr6VZwcgE/2lw8zDIufOCGnzsA5CbQIMleXZTrgkBd0TanCX+MiDYJ1TOS4KL/Tqk0nFRxawnaYr6pkZkA==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.21.0.tgz", + "integrity": "sha512-lkC8kZYntxVKr7b8xmjCVUgE0a8xgDakPyDo9uSWavXPyYqLgYYGdEd2j8NxihRyb6UwpX3G/hFUF4/9q2V+/g==", "engines": { "node": ">=14" } @@ -3547,9 +3547,9 @@ "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" }, "node_modules/gaxios": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.1.1.tgz", - "integrity": "sha512-bw8smrX+XlAoo9o1JAksBwX+hi/RG15J+NTSxmNPIclKC3ZVK6C2afwY8OSdRvOK0+ZLecUJYtj2MmjOt3Dm0w==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.3.0.tgz", + "integrity": "sha512-p+ggrQw3fBwH2F5N/PAI4k/G/y1art5OxKpb2J2chwNNHM4hHuAOtivjPuirMF4KNKwTTUal/lPfL2+7h2mEcg==", "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", @@ -3673,14 +3673,14 @@ } }, "node_modules/google-auth-library": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.2.0.tgz", - "integrity": "sha512-1oV3p0JhNEhVbj26eF3FAJcv9MXXQt4S0wcvKZaDbl4oHq5V3UJoSbsGZGQNcjoCdhW4kDSwOs11wLlHog3fgQ==", + "version": "9.6.3", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.6.3.tgz", + "integrity": "sha512-4CacM29MLC2eT9Cey5GDVK4Q8t+MMp8+OEdOaqD9MG6b0dOyLORaaeJMPQ7EESVgm/+z5EKYyFLxgzBJlJgyHQ==", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^6.0.0", - "gcp-metadata": "^6.0.0", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", "gtoken": "^7.0.0", "jws": "^4.0.0" }, @@ -3689,54 +3689,33 @@ } }, "node_modules/google-gax": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.0.5.tgz", - "integrity": "sha512-yLoYtp4zE+8OQA74oBEbNkbzI6c95W01JSL7RqC8XERKpRvj3ytZp1dgnbA6G9aRsc8pZB25xWYBcCmrbYOEhA==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/google-gax/-/google-gax-4.3.1.tgz", + "integrity": "sha512-qpSfslpwqToIgQ+Tf3MjWIDjYK4UFIZ0uz6nLtttlW9N1NQA4PhGf9tlGo6KDYJ4rgL2w4CjXVd0z5yeNpN/Iw==", "dependencies": { - "@grpc/grpc-js": "~1.9.6", + "@grpc/grpc-js": "~1.10.0", "@grpc/proto-loader": "^0.7.0", "@types/long": "^4.0.0", "abort-controller": "^3.0.0", "duplexify": "^4.0.0", - "google-auth-library": "^9.0.0", + "google-auth-library": "^9.3.0", "node-fetch": "^2.6.1", "object-hash": "^3.0.0", "proto3-json-serializer": "^2.0.0", - "protobufjs": "7.2.5", - "retry-request": "^7.0.0" + "protobufjs": "7.2.6", + "retry-request": "^7.0.0", + "uuid": "^9.0.1" }, "engines": { "node": ">=14" } }, - "node_modules/google-gax/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/google-gax/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, "node_modules/google-gax/node_modules/retry-request": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-7.0.1.tgz", - "integrity": "sha512-ZI6vJp9rfB71mrZpw+n9p/B6HCsd7QJlSEQftZ+xfJzr3cQ9EPGKw1FF0BnViJ0fYREX6FhymBD2CARpmsFciQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/retry-request/-/retry-request-7.0.2.tgz", + "integrity": "sha512-dUOvLMJ0/JJYEn8NrpOaGNE7X3vpI5XlZS/u0ANjqtcZVKnIxP7IgCFwrKTxENw29emmwug53awKtaMm4i9g5w==", "dependencies": { "@types/request": "^2.48.8", - "debug": "^4.1.1", "extend": "^3.0.2", "teeny-request": "^9.0.0" }, @@ -3744,6 +3723,18 @@ "node": ">=14" } }, + "node_modules/google-gax/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/google-p12-pem": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/google-p12-pem/-/google-p12-pem-4.0.1.tgz", @@ -3792,9 +3783,9 @@ } }, "node_modules/gtoken": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.0.1.tgz", - "integrity": "sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" @@ -3963,9 +3954,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -5023,12 +5014,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha-suppress-logs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/mocha-suppress-logs/-/mocha-suppress-logs-0.4.1.tgz", - "integrity": "sha512-llHPy1sEEOSoQ04TzixavZjBy2g65Tu64GYaEl3m7JxL5T1XmUhkpifcJSfRxKlCWWFVZ+cLIq4WHmVRBwQpyQ==", - "dev": true - }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -5780,20 +5765,20 @@ } }, "node_modules/proto3-json-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-2.0.0.tgz", - "integrity": "sha512-FB/YaNrpiPkyQNSNPilpn8qn0KdEfkgmJ9JP93PQyF/U4bAiXY5BiUdDhiDO4S48uSQ6AesklgVlrKiqZPzegw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/proto3-json-serializer/-/proto3-json-serializer-2.0.1.tgz", + "integrity": "sha512-8awBvjO+FwkMd6gNoGFZyqkHZXCFd54CIYTb6De7dPaufGJ2XNW+QUNqbMr8MaAocMdb+KpsD4rxEOaTBDCffA==", "dependencies": { - "protobufjs": "^7.0.0" + "protobufjs": "^7.2.5" }, "engines": { "node": ">=14.0.0" } }, "node_modules/protobufjs": { - "version": "7.2.5", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz", - "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz", + "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -7321,7 +7306,7 @@ "dependencies": { "@google-cloud/firestore": "^6.8.0", "@google-cloud/functions-framework": "^3.3.0", - "@google-cloud/pubsub": "^4.1.0", + "@google-cloud/pubsub": "^4.3.2", "@google-cloud/spanner": "^6.16.0", "autoscaler-common": "file:../../autoscaler-common", "express": "^4.18.2", @@ -7330,7 +7315,6 @@ "devDependencies": { "@sinonjs/referee": "^10.0.1", "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.4.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3", diff --git a/src/scaler/scaler-core/package-lock.json b/src/scaler/scaler-core/package-lock.json index 17d317a6..09d8b628 100644 --- a/src/scaler/scaler-core/package-lock.json +++ b/src/scaler/scaler-core/package-lock.json @@ -18,7 +18,6 @@ "devDependencies": { "@sinonjs/referee": "^10.0.1", "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.5.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3", @@ -2269,15 +2268,6 @@ "node": ">=12" } }, - "node_modules/clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/cloudevents": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/cloudevents/-/cloudevents-7.0.1.tgz", @@ -4686,15 +4676,6 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha-suppress-logs": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mocha-suppress-logs/-/mocha-suppress-logs-0.5.1.tgz", - "integrity": "sha512-f4BhMiCABgCt3tlXiOcRydWreNCkfvgXgNL2ZclfXPdLNcY7jfyNy3Oi5wwPuxx++UyuNiIx3F7orvckAfrKzw==", - "dev": true, - "dependencies": { - "clone": "^2.1.2" - } - }, "node_modules/mocha/node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", diff --git a/src/scaler/scaler-core/package.json b/src/scaler/scaler-core/package.json index eff1bcb9..86d14db8 100644 --- a/src/scaler/scaler-core/package.json +++ b/src/scaler/scaler-core/package.json @@ -15,13 +15,11 @@ "scripts": { "start": "functions-framework --target=scaleSpannerInstanceHTTP --port=8081", "debug": "node --inspect node_modules/.bin/functions-framework --target=scaleSpannerInstanceHTTP --port=8081", - "test": "nyc --reporter=text mocha --recursive --require mocha-suppress-logs", - "test2": "nyc --reporter=text mocha --recursive" + "test": "NODE_ENV=test nyc --reporter=text mocha --recursive" }, "devDependencies": { "@sinonjs/referee": "^10.0.1", "mocha": "^10.2.0", - "mocha-suppress-logs": "^0.5.1", "nyc": "^15.1.0", "rewire": "^7.0.0", "should": "^13.2.3",