From 13ea1580f342c2a7d49574d640bed6f47a0a882b Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 20 Oct 2023 08:24:49 -0700 Subject: [PATCH 1/9] update to latest esm module for streaming redirects in teraslice --- .../teraslice/lib/cluster/services/api.js | 23 ++-- packages/teraslice/package.json | 1 + yarn.lock | 105 +++++++++++++++++- 3 files changed, 118 insertions(+), 11 deletions(-) diff --git a/packages/teraslice/lib/cluster/services/api.js b/packages/teraslice/lib/cluster/services/api.js index 9c14760133c..41d5f9752e3 100644 --- a/packages/teraslice/lib/cluster/services/api.js +++ b/packages/teraslice/lib/cluster/services/api.js @@ -2,9 +2,7 @@ const { Router } = require('express'); const bodyParser = require('body-parser'); -const stream = require('stream'); -const { promisify } = require('util'); -const got = require('got'); +const { pipeline: streamPipeline } = require('node:stream/promises'); const { RecoveryCleanupType } = require('@terascope/job-components'); const { parseErrorInfo, parseList, logError, TSError, startsWith @@ -20,7 +18,15 @@ const { } = require('../../utils/api_utils'); const terasliceVersion = require('../../../package.json').version; -const pStreamPipeline = promisify(stream.pipeline); + +let gotESMModule; + +async function getGotESM() { + if (gotESMModule) return gotESMModule; + const module = await import('gotESM'); // eslint-disable-line + gotESMModule = module.default; + return module.default; +} module.exports = function apiService(context, { assetsUrl, app }) { const clusterConfig = context.sysconfig.teraslice; @@ -488,23 +494,24 @@ module.exports = function apiService(context, { assetsUrl, app }) { } async function _redirect(req, res) { + const module = await getGotESM() const options = { prefixUrl: assetsUrl, headers: req.headers, searchParams: req.query, throwHttpErrors: false, - timeout: clusterConfig.api_response_timeout, + timeout: { request: clusterConfig.api_response_timeout }, decompress: false, - retry: 0 + retry: { limit: 0 } }; const uri = req.url.replace(/^\//, ''); const method = req.method.toLowerCase(); try { - await pStreamPipeline( + await streamPipeline( req, - got.stream[method](uri, options), + module.stream[method](uri, options), res, ); } catch (err) { diff --git a/packages/teraslice/package.json b/packages/teraslice/package.json index bdbd2b0d29e..12f3205684b 100644 --- a/packages/teraslice/package.json +++ b/packages/teraslice/package.json @@ -56,6 +56,7 @@ "fs-extra": "^11.1.1", "gc-stats": "^1.4.0", "got": "^11.8.3", + "gotESM": "npm:got@^13.0.0", "ip": "^1.1.8", "kubernetes-client": "^9.0.0", "lodash": "^4.17.21", diff --git a/yarn.lock b/yarn.lock index 4933a242dac..2b966165886 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1659,6 +1659,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== +"@sindresorhus/is@^5.2.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668" + integrity sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g== + "@sinonjs/commons@^1.6.0", "@sinonjs/commons@^1.7.0", "@sinonjs/commons@^1.8.1": version "1.8.6" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.6.tgz#80c516a4dc264c2a69115e7578d62581ff455ed9" @@ -2213,6 +2218,13 @@ dependencies: defer-to-connect "^2.0.0" +"@szmarczak/http-timer@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-5.0.1.tgz#c7c1bf1141cdd4751b0399c8fc7b8b664cd5be3a" + integrity sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw== + dependencies: + defer-to-connect "^2.0.1" + "@terascope/fetch-github-release@^0.8.7": version "0.8.7" resolved "https://registry.yarnpkg.com/@terascope/fetch-github-release/-/fetch-github-release-0.8.7.tgz#fd8aba265c06704d51a6ab70fd2c656c80f04156" @@ -2648,6 +2660,11 @@ resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== +"@types/http-cache-semantics@^4.0.2": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#a3ff232bf7d5c55f38e4e45693eda2ebb545794d" + integrity sha512-V46MYLFp08Wf2mmaBhvgjStM3tPa+2GAdy/iqoX+noX1//zje2x4XmrIU0cAwyClATsTmahbtoQ2EwP7I5WSiA== + "@types/inquirer@^8": version "8.2.6" resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.2.6.tgz#abd41a5fb689c7f1acb12933d787d4262a02a0ab" @@ -4089,6 +4106,24 @@ cacheable-lookup@^5.0.3: resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" integrity sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA== +cacheable-lookup@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-7.0.0.tgz#3476a8215d046e5a3202a9209dd13fec1f933a27" + integrity sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w== + +cacheable-request@^10.2.8: + version "10.2.14" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-10.2.14.tgz#eb915b665fda41b79652782df3f553449c406b9d" + integrity sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ== + dependencies: + "@types/http-cache-semantics" "^4.0.2" + get-stream "^6.0.1" + http-cache-semantics "^4.1.1" + keyv "^4.5.3" + mimic-response "^4.0.0" + normalize-url "^8.0.0" + responselike "^3.0.0" + cacheable-request@^2.1.1: version "2.1.4" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-2.1.4.tgz#0d808801b6342ad33c91df9d0b44dc09b91e5c3d" @@ -4973,7 +5008,7 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== -defer-to-connect@^2.0.0: +defer-to-connect@^2.0.0, defer-to-connect@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg== @@ -6170,6 +6205,11 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== +form-data-encoder@^2.1.2: + version "2.1.4" + resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.4.tgz#261ea35d2a70d48d30ec7a9603130fa5515e9cd5" + integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw== + form-data@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -6460,7 +6500,7 @@ get-stream@^5.1.0: dependencies: pump "^3.0.0" -get-stream@^6.0.0: +get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== @@ -6726,6 +6766,23 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" +"gotESM@npm:got@^13.0.0": + version "13.0.0" + resolved "https://registry.yarnpkg.com/got/-/got-13.0.0.tgz#a2402862cef27a5d0d1b07c0fb25d12b58175422" + integrity sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA== + dependencies: + "@sindresorhus/is" "^5.2.0" + "@szmarczak/http-timer" "^5.0.1" + cacheable-lookup "^7.0.0" + cacheable-request "^10.2.8" + decompress-response "^6.0.0" + form-data-encoder "^2.1.2" + get-stream "^6.0.1" + http2-wrapper "^2.1.10" + lowercase-keys "^3.0.0" + p-cancelable "^3.0.0" + responselike "^3.0.0" + graceful-fs@^4.1.10, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.6, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -6972,6 +7029,14 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" +http2-wrapper@^2.1.10: + version "2.2.0" + resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-2.2.0.tgz#b80ad199d216b7d3680195077bd7b9060fa9d7f3" + integrity sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ== + dependencies: + quick-lru "^5.1.1" + resolve-alpn "^1.2.0" + https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" @@ -8353,6 +8418,13 @@ keyv@^4.0.0: dependencies: json-buffer "3.0.1" +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.2, kind-of@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -8615,6 +8687,11 @@ lowercase-keys@^2.0.0: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== +lowercase-keys@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2" + integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -8896,6 +8973,11 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== +mimic-response@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-4.0.0.tgz#35468b19e7c75d10f5165ea25e75a5ceea7cf70f" + integrity sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg== + "minimatch@2 || 3", minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -9449,6 +9531,11 @@ normalize-url@^6.0.1: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== +normalize-url@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-8.0.0.tgz#593dbd284f743e8dcf6a5ddf8fadff149c82701a" + integrity sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw== + npm-bundled@^1.0.1, npm-bundled@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" @@ -9909,6 +9996,11 @@ p-cancelable@^2.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.1.1.tgz#aab7fbd416582fa32a3db49859c122487c5ed2cf" integrity sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg== +p-cancelable@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-3.0.0.tgz#63826694b54d61ca1c20ebcb6d3ecf5e14cd8050" + integrity sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw== + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -10890,7 +10982,7 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -resolve-alpn@^1.0.0: +resolve-alpn@^1.0.0, resolve-alpn@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/resolve-alpn/-/resolve-alpn-1.2.1.tgz#b7adbdac3546aaaec20b45e7d8265927072726f9" integrity sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g== @@ -10956,6 +11048,13 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" +responselike@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-3.0.0.tgz#20decb6c298aff0dbee1c355ca95461d42823626" + integrity sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg== + dependencies: + lowercase-keys "^3.0.0" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" From e02003646fd7e4c4739dd735d3b4e2a648fbc591 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 20 Oct 2023 08:28:58 -0700 Subject: [PATCH 2/9] remove node 14 from build and test as we migrate away from it --- .github/workflows/publish-tag.yml | 2 +- .github/workflows/test.yml | 19 ++++++++----------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish-tag.yml b/.github/workflows/publish-tag.yml index 234a7eb1781..ad452c470b2 100644 --- a/.github/workflows/publish-tag.yml +++ b/.github/workflows/publish-tag.yml @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.21.3, 16.19.1, 18.16.0] + node-version: [16.19.1, 18.16.0] steps: - name: Check out code uses: actions/checkout@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 27e0eced78c..82abc4d29d5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 14.21.3 + node-version: 18.16.0 cache: 'yarn' - name: Install and build packages @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.21.3, 16.19.1, 18.16.0] + node-version: [16.19.1, 18.16.0] steps: - name: Check out code uses: actions/checkout@v3 @@ -57,7 +57,7 @@ jobs: # opensearch is finiky, keep testing others if it fails fail-fast: false matrix: - node-version: [14.21.3, 16.19.1, 18.16.0] + node-version: [16.19.1, 18.16.0] search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] steps: - name: Check out code @@ -91,7 +91,7 @@ jobs: # opensearch is finiky, keep testing others if it fails fail-fast: false matrix: - node-version: [14.21.3, 16.19.1, 18.16.0] + node-version: [16.19.1, 18.16.0] search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] steps: - name: Check out code @@ -129,7 +129,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 14.21.3 + node-version: 18.16.0 cache: 'yarn' # we login to docker to avoid docker pull limit rates @@ -154,7 +154,7 @@ jobs: # opensearch is finiky, keep testing others if it fails fail-fast: false matrix: - node-version: [14.21.3, 16.19.1, 18.16.0] + node-version: [16.19.1, 18.16.0] search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] steps: - name: Check out code @@ -193,7 +193,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 14.21.3 + node-version: 18.16.0 cache: 'yarn' # we login to docker to avoid docker pull limit rates @@ -218,10 +218,7 @@ jobs: # opensearch is finiky, keep testing others if it fails fail-fast: false matrix: - # temporarily remove node18 from the e2e tests since they fail, see: - # https://github.com/terascope/teraslice/issues/3434 - # node-version: [14.21.3, 16.19.1, 18.16.0] - node-version: [14.21.3, 16.19.1] + node-version: [16.19.1, 18.16.0] search-version: [elasticsearch6, elasticsearch7, opensearch1, opensearch2] steps: - name: Check out code From 4eaed7a7c795b86cfd634a65001e34f4bbdf481b Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 20 Oct 2023 08:30:27 -0700 Subject: [PATCH 3/9] release: (minor) teraslice@0.87.0 --- package.json | 2 +- packages/teraslice/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 37d203b094c..9267c9e10c3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "teraslice-workspace", "displayName": "Teraslice", - "version": "0.86.2", + "version": "0.87.0", "private": true, "homepage": "https://github.com/terascope/teraslice", "bugs": { diff --git a/packages/teraslice/package.json b/packages/teraslice/package.json index 12f3205684b..6344d654d26 100644 --- a/packages/teraslice/package.json +++ b/packages/teraslice/package.json @@ -1,7 +1,7 @@ { "name": "teraslice", "displayName": "Teraslice", - "version": "0.86.2", + "version": "0.87.0", "description": "Distributed computing platform for processing JSON data", "homepage": "https://github.com/terascope/teraslice#readme", "bugs": { From c697e614ffd6c64d0f5921ce68d6d563f9543bb6 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 20 Oct 2023 08:35:44 -0700 Subject: [PATCH 4/9] change node engine version to drop supoprt for node 14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9267c9e10c3..a3cb7e0a674 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "registry": "https://registry.npmjs.org/" }, "engines": { - "node": ">=14.17.0", + "node": ">=16.19.0", "yarn": ">=1.22.19" }, "version": 1 From 70445f9a00bbf68f9a539b7939808778d2df8a60 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 20 Oct 2023 10:48:36 -0700 Subject: [PATCH 5/9] update eslint to use latest parser --- packages/eslint-config/index.js | 2 +- packages/teraslice/lib/cluster/services/api.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index 7bf9cecb094..5f95233afb3 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -5,7 +5,7 @@ const { rules, overrides } = require('./lib'); module.exports = { extends: ['airbnb-base'], parserOptions: { - ecmaVersion: 2019, + ecmaVersion: 'latest', sourceType: 'script', }, env: { diff --git a/packages/teraslice/lib/cluster/services/api.js b/packages/teraslice/lib/cluster/services/api.js index 41d5f9752e3..d94b1af1de2 100644 --- a/packages/teraslice/lib/cluster/services/api.js +++ b/packages/teraslice/lib/cluster/services/api.js @@ -18,7 +18,6 @@ const { } = require('../../utils/api_utils'); const terasliceVersion = require('../../../package.json').version; - let gotESMModule; async function getGotESM() { @@ -494,7 +493,7 @@ module.exports = function apiService(context, { assetsUrl, app }) { } async function _redirect(req, res) { - const module = await getGotESM() + const module = await getGotESM(); const options = { prefixUrl: assetsUrl, headers: req.headers, From 233e3de34d27f46bd06f8707ae4f264fc296c948 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 20 Oct 2023 10:48:59 -0700 Subject: [PATCH 6/9] bump: (minor) @terascope/eslint-config@0.8.0 --- packages/eslint-config/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 2e298aa8bc6..d6a7f48fa98 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/eslint-config", "displayName": "Terascope ESLint Config", - "version": "0.7.1", + "version": "0.8.0", "description": "A shared eslint config based on eslint-config-airbnb", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/eslint-config#readme", "bugs": { From babbc1ed57ec916da192e763f82b6be760c502b1 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Fri, 20 Oct 2023 11:31:15 -0700 Subject: [PATCH 7/9] fix test --- packages/eslint-config/test/index-spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-config/test/index-spec.js b/packages/eslint-config/test/index-spec.js index 344dfbd5af8..1bff91e7307 100644 --- a/packages/eslint-config/test/index-spec.js +++ b/packages/eslint-config/test/index-spec.js @@ -12,7 +12,7 @@ describe('ESLint Config Index', () => { it('should export js parserOptions by default', () => { expect(Index).toHaveProperty('parserOptions'); expect(Index.parserOptions).toMatchObject({ - ecmaVersion: 2019, + ecmaVersion: 'latest', sourceType: 'script', },); }); From 0774c44ec07076e3fff769762936b8f0c99d5770 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 23 Oct 2023 12:57:04 -0700 Subject: [PATCH 8/9] change default node version --- Dockerfile | 2 +- packages/scripts/src/helpers/config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a7ddfb5b162..78ead80ec7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # NODE_VERSION is set by default in the config.ts, the following value will only # be used if you build images by default with docker build -ARG NODE_VERSION=14.21.3 +ARG NODE_VERSION=18.16.0 FROM terascope/node-base:${NODE_VERSION} ENV NODE_ENV production diff --git a/packages/scripts/src/helpers/config.ts b/packages/scripts/src/helpers/config.ts index e6c880989c2..889cce8bc74 100644 --- a/packages/scripts/src/helpers/config.ts +++ b/packages/scripts/src/helpers/config.ts @@ -157,4 +157,4 @@ export const SEARCH_TEST_HOST = testHost; // This should match a node version from the base-docker-image repo: // https://github.com/terascope/base-docker-image // This overrides the value in the Dockerfile -export const NODE_VERSION = process.env.NODE_VERSION || '14.21.3'; +export const NODE_VERSION = process.env.NODE_VERSION || '18.16.0'; From a6935020e232f613ebbc5e51af0091137b7822e2 Mon Sep 17 00:00:00 2001 From: Jared Noble Date: Mon, 23 Oct 2023 12:57:19 -0700 Subject: [PATCH 9/9] bump: (minor) @terascope/scripts@0.60.0 --- packages/scripts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 129e53b5335..cf4b187082f 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,7 +1,7 @@ { "name": "@terascope/scripts", "displayName": "Scripts", - "version": "0.59.0", + "version": "0.60.0", "description": "A collection of terascope monorepo scripts", "homepage": "https://github.com/terascope/teraslice/tree/master/packages/scripts#readme", "bugs": {