From f7615d28cd664d58b6e7d0fa7e88af96123dd05e Mon Sep 17 00:00:00 2001 From: Bryan English Date: Thu, 9 May 2024 23:09:58 -0400 Subject: [PATCH 01/80] check for outdated integrations --- package.json | 1 + .../src/playwright.js | 3 +- scripts/helpers/versioning.js | 78 +++++++++++++++++++ scripts/install_plugin_modules.js | 60 ++------------ scripts/outdated.js | 58 ++++++++++++++ 5 files changed, 145 insertions(+), 55 deletions(-) create mode 100644 scripts/helpers/versioning.js create mode 100644 scripts/outdated.js diff --git a/package.json b/package.json index 821ed481d9a..d14ba956334 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "bench:e2e:ci-visibility": "node benchmark/e2e-ci/benchmark-run.js", "type:doc": "cd docs && yarn && yarn build", "type:test": "cd docs && yarn && yarn test", + "outdated-integrations": "node scripts/outdated.js", "lint": "node scripts/check_licenses.js && eslint . && yarn audit --groups dependencies", "lint-fix": "node scripts/check_licenses.js && eslint . --fix && yarn audit --groups dependencies", "services": "node ./scripts/install_plugin_modules && node packages/dd-trace/test/setup/services", diff --git a/packages/datadog-instrumentations/src/playwright.js b/packages/datadog-instrumentations/src/playwright.js index e8332d65c8d..1dee90e07ce 100644 --- a/packages/datadog-instrumentations/src/playwright.js +++ b/packages/datadog-instrumentations/src/playwright.js @@ -502,7 +502,8 @@ addHook({ addHook({ name: '@playwright/test', file: 'lib/runner/runner.js', - versions: ['>=1.31.0 <1.38.0'] + versions: ['>=1.31.0 <1.38.0'], + pinned: true }, runnerHook) // From >=1.38.0 diff --git a/scripts/helpers/versioning.js b/scripts/helpers/versioning.js new file mode 100644 index 00000000000..b51eaafee8b --- /dev/null +++ b/scripts/helpers/versioning.js @@ -0,0 +1,78 @@ +const fs = require('fs') +const path = require('path') +const childProcess = require('child_process') +const proxyquire = require('proxyquire') + +const versionLists = {} +const names = [] + +const filter = process.env.hasOwnProperty('PLUGINS') && process.env.PLUGINS.split('|') + +fs.readdirSync(path.join(__dirname, '../../packages/datadog-instrumentations/src')) + .filter(file => file.endsWith('js')) + .forEach(file => { + file = file.replace('.js', '') + + if (!filter || filter.includes(file)) { + names.push(file) + } + }) + +async function getVersionList (name) { + if (versionLists[name]) { + return versionLists[name] + } + const list = await npmView(`${name} versions`) + versionLists[name] = list + return list +} + +function npmView (input) { + return new Promise((resolve, reject) => { + childProcess.exec(`npm view ${input} --json`, (err, stdout) => { + if (err) { + reject(err) + return + } + resolve(JSON.parse(stdout.toString('utf8'))) + }) + }) +} + +function loadInstFile (file, instrumentations) { + const instrument = { + addHook (instrumentation) { + instrumentations.push(instrumentation) + } + } + + const instPath = path.join(__dirname, `../../packages/datadog-instrumentations/src/${file}`) + + proxyquire.noPreserveCache()(instPath, { + './helpers/instrument': instrument, + '../helpers/instrument': instrument + }) +} + +function getInternals () { + return names.map(key => { + const instrumentations = [] + const name = key + + try { + loadInstFile(`${name}/server.js`, instrumentations) + loadInstFile(`${name}/client.js`, instrumentations) + } catch (e) { + loadInstFile(`${name}.js`, instrumentations) + } + + return instrumentations + }).reduce((prev, next) => prev.concat(next), []) +} + +module.exports = { + getVersionList, + npmView, + loadInstFile, + getInternals +} diff --git a/scripts/install_plugin_modules.js b/scripts/install_plugin_modules.js index 682e2d3c5ad..422ec70a4b0 100644 --- a/scripts/install_plugin_modules.js +++ b/scripts/install_plugin_modules.js @@ -5,10 +5,13 @@ const os = require('os') const path = require('path') const crypto = require('crypto') const semver = require('semver') -const proxyquire = require('proxyquire') const exec = require('./helpers/exec') -const childProcess = require('child_process') const externals = require('../packages/dd-trace/test/plugins/externals') +const { + getVersionList, + getInternals, + npmView +} = require('./helpers/versioning') const requirePackageJsonPath = require.resolve('../packages/dd-trace/src/require-package-json') @@ -16,7 +19,6 @@ const requirePackageJsonPath = require.resolve('../packages/dd-trace/src/require // Can remove couchbase after removing support for couchbase <= 3.2.0 const excludeList = os.arch() === 'arm64' ? ['aerospike', 'couchbase', 'grpc', 'oracledb'] : [] const workspaces = new Set() -const versionLists = {} const deps = {} const filter = process.env.hasOwnProperty('PLUGINS') && process.env.PLUGINS.split('|') @@ -46,21 +48,7 @@ async function run () { } async function assertVersions () { - const internals = names - .map(key => { - const instrumentations = [] - const name = key - - try { - loadInstFile(`${name}/server.js`, instrumentations) - loadInstFile(`${name}/client.js`, instrumentations) - } catch (e) { - loadInstFile(`${name}.js`, instrumentations) - } - - return instrumentations - }) - .reduce((prev, next) => prev.concat(next), []) + const internals = getInternals() for (const inst of internals) { await assertInstrumentation(inst, false) @@ -158,27 +146,6 @@ async function addDependencies (dependencies, name, versionRange) { } } -async function getVersionList (name) { - if (versionLists[name]) { - return versionLists[name] - } - const list = await npmView(`${name} versions`) - versionLists[name] = list - return list -} - -function npmView (input) { - return new Promise((resolve, reject) => { - childProcess.exec(`npm view ${input} --json`, (err, stdout) => { - if (err) { - reject(err) - return - } - resolve(JSON.parse(stdout.toString('utf8'))) - }) - }) -} - function assertIndex (name, version) { const index = `'use strict' @@ -234,18 +201,3 @@ function sha1 (str) { shasum.update(str) return shasum.digest('hex') } - -function loadInstFile (file, instrumentations) { - const instrument = { - addHook (instrumentation) { - instrumentations.push(instrumentation) - } - } - - const instPath = path.join(__dirname, `../packages/datadog-instrumentations/src/${file}`) - - proxyquire.noPreserveCache()(instPath, { - './helpers/instrument': instrument, - '../helpers/instrument': instrument - }) -} diff --git a/scripts/outdated.js b/scripts/outdated.js new file mode 100644 index 00000000000..b2d70297306 --- /dev/null +++ b/scripts/outdated.js @@ -0,0 +1,58 @@ +/* eslint-disable no-console */ + +const semver = require('semver') +const { + getInternals, + npmView +} = require('./helpers/versioning') + +function satisfiesAny (version, versions) { + for (const ver of versions) { + if (semver.satisfies(version, ver)) { + return true + } + } + return false +} + +async function run () { + const internals = consolidateInternals(getInternals()) + for (const inst in internals) { + const distTags = await npmView(inst + ' dist-tags') + const satisfied = satisfiesAny(distTags.latest, internals[inst]) + if (!satisfied) { + console.log( + `latest version of "${inst}" (${distTags.latest}) not supported in ranges: ${ + Array.from(internals[inst]).map(x => `"${x}"`).join(', ') + }` + ) + if (internals[inst].pinned) { + console.log(`^----- "${inst}" pinned intentionally`) + } else { + process.exitCode = 1 + } + } + } +} + +function consolidateInternals (internals) { + const consolidated = {} + for (const inst of internals) { + if (Array.isArray(inst.name)) continue + if (inst.name.startsWith('node:')) continue + if (!inst.versions) continue + if (!consolidated[inst.name] && inst.versions.length > 0) { + consolidated[inst.name] = new Set(inst.versions) + } else { + for (const ver of inst.versions) { + consolidated[inst.name].add(ver) + } + } + if (inst.pinned) { + consolidated[inst.name].pinned = true + } + } + return consolidated +} + +run() From 089cd42ee365bdb6fdb5db8e44a28d35dfeaf3af Mon Sep 17 00:00:00 2001 From: Bryan English Date: Fri, 10 May 2024 16:17:11 -0400 Subject: [PATCH 02/80] pin everything --- packages/datadog-instrumentations/src/generic-pool.js | 3 ++- packages/datadog-instrumentations/src/redis.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/datadog-instrumentations/src/generic-pool.js b/packages/datadog-instrumentations/src/generic-pool.js index 067a9c7f2b3..198b44a9c5a 100644 --- a/packages/datadog-instrumentations/src/generic-pool.js +++ b/packages/datadog-instrumentations/src/generic-pool.js @@ -33,7 +33,8 @@ function createWrapPool () { addHook({ name: 'generic-pool', - versions: ['^2.4'] + versions: ['^2.4'], + pinned: true }, genericPool => { shimmer.wrap(genericPool.Pool.prototype, 'acquire', createWrapAcquire()) return genericPool diff --git a/packages/datadog-instrumentations/src/redis.js b/packages/datadog-instrumentations/src/redis.js index 8da93ae08ab..06c8d90fa2f 100644 --- a/packages/datadog-instrumentations/src/redis.js +++ b/packages/datadog-instrumentations/src/redis.js @@ -115,7 +115,7 @@ addHook({ name: 'redis', versions: ['>=2.6 <4'] }, redis => { return redis }) -addHook({ name: 'redis', versions: ['>=0.12 <2.6'] }, redis => { +addHook({ name: 'redis', versions: ['>=0.12 <2.6'], pinned: true }, redis => { shimmer.wrap(redis.RedisClient.prototype, 'send_command', sendCommand => function (command, args, callback) { if (!startCh.hasSubscribers) { return sendCommand.apply(this, arguments) From 51dc82e89f21b01fa6609fcbd576ac4ccd4e3ae9 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Sat, 11 May 2024 00:16:10 -0400 Subject: [PATCH 03/80] switch to a big json list of package max versions --- .../src/generic-pool.js | 3 +- .../src/helpers/latests.json | 101 ++++++++++++++++++ .../src/helpers/register.js | 14 ++- .../src/playwright.js | 3 +- .../datadog-instrumentations/src/redis.js | 2 +- scripts/install_plugin_modules.js | 13 ++- scripts/outdated.js | 81 +++++++------- 7 files changed, 166 insertions(+), 51 deletions(-) create mode 100644 packages/datadog-instrumentations/src/helpers/latests.json diff --git a/packages/datadog-instrumentations/src/generic-pool.js b/packages/datadog-instrumentations/src/generic-pool.js index 198b44a9c5a..067a9c7f2b3 100644 --- a/packages/datadog-instrumentations/src/generic-pool.js +++ b/packages/datadog-instrumentations/src/generic-pool.js @@ -33,8 +33,7 @@ function createWrapPool () { addHook({ name: 'generic-pool', - versions: ['^2.4'], - pinned: true + versions: ['^2.4'] }, genericPool => { shimmer.wrap(genericPool.Pool.prototype, 'acquire', createWrapAcquire()) return genericPool diff --git a/packages/datadog-instrumentations/src/helpers/latests.json b/packages/datadog-instrumentations/src/helpers/latests.json new file mode 100644 index 00000000000..d773ba64f50 --- /dev/null +++ b/packages/datadog-instrumentations/src/helpers/latests.json @@ -0,0 +1,101 @@ +{ + "pinned": [ + "generic-pool", + "@playwright/test", + "redis" + ], + "latests": { + "aerospike": "5.12.0", + "amqp10": "3.6.0", + "amqplib": "0.10.4", + "apollo-server-core": "3.13.0", + "@apollo/server": "4.10.4", + "@apollo/gateway": "2.7.7", + "@smithy/smithy-client": "3.0.0", + "@aws-sdk/smithy-client": "3.374.0", + "aws-sdk": "2.1618.0", + "bluebird": "3.7.2", + "body-parser": "1.20.2", + "bunyan": "1.8.15", + "cassandra-driver": "4.7.2", + "connect": "3.7.0", + "cookie-parser": "1.4.6", + "cookie": "0.6.0", + "couchbase": "4.3.1", + "@cucumber/cucumber": "10.6.0", + "cypress": "13.9.0", + "@elastic/transport": "8.5.1", + "@elastic/elasticsearch": "8.13.1", + "elasticsearch": "16.7.3", + "express-mongo-sanitize": "2.2.0", + "express": "4.19.2", + "fastify": "4.27.0", + "find-my-way": "8.2.0", + "fs": "0.0.1-security", + "generic-pool": "3.9.0", + "@google-cloud/pubsub": "4.4.0", + "@graphql-tools/executor": "1.2.6", + "graphql": "16.8.1", + "@grpc/grpc-js": "1.10.7", + "@hapi/hapi": "21.3.9", + "hapi": "18.1.0", + "ioredis": "5.4.1", + "jest-environment-node": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "@jest/core": "29.7.0", + "@jest/test-sequencer": "29.7.0", + "@jest/reporters": "29.7.0", + "jest-circus": "29.7.0", + "@jest/transform": "29.7.0", + "jest-config": "29.7.0", + "jest-runtime": "29.7.0", + "jest-worker": "29.7.0", + "kafkajs": "2.2.4", + "knex": "3.1.0", + "koa": "2.15.3", + "@koa/router": "12.0.1", + "koa-router": "12.0.1", + "ldapjs": "3.0.7", + "limitd-client": "2.14.1", + "mariadb": "3.3.0", + "memcached": "2.2.2", + "microgateway-core": "3.3.3", + "mocha": "10.4.0", + "mocha-each": "2.0.1", + "moleculer": "0.14.33", + "mongodb-core": "3.2.7", + "mongodb": "6.6.1", + "mongoose": "8.3.4", + "mquery": "5.0.0", + "mysql": "2.18.1", + "mysql2": "3.9.7", + "next": "14.2.3", + "openai": "4.44.0", + "@opensearch-project/opensearch": "2.8.0", + "oracledb": "6.5.0", + "paperplane": "3.1.2", + "passport-http": "0.3.0", + "passport-local": "1.0.0", + "pg": "8.11.5", + "pino": "9.0.0", + "pino-pretty": "11.0.0", + "@playwright/test": "1.44.0", + "playwright": "1.44.0", + "promise-js": "0.0.7", + "promise": "8.3.0", + "q": "1.5.1", + "qs": "6.12.1", + "@node-redis/client": "1.0.6", + "@redis/client": "1.5.14", + "redis": "4.6.13", + "restify": "11.1.0", + "rhea": "3.0.2", + "router": "1.3.8", + "selenium-webdriver": "4.20.0", + "sequelize": "6.37.3", + "sharedb": "4.1.4", + "tedious": "18.2.0", + "when": "3.7.8", + "winston": "3.13.0" + } +} \ No newline at end of file diff --git a/packages/datadog-instrumentations/src/helpers/register.js b/packages/datadog-instrumentations/src/helpers/register.js index 2ef9d199f99..7d2bc78ba3b 100644 --- a/packages/datadog-instrumentations/src/helpers/register.js +++ b/packages/datadog-instrumentations/src/helpers/register.js @@ -16,6 +16,7 @@ const { const hooks = require('./hooks') const instrumentations = require('./instrumentations') +const latests = require('./latests.json') const names = Object.keys(hooks) const pathSepExpr = new RegExp(`\\${path.sep}`, 'g') const disabledInstrumentations = new Set( @@ -102,7 +103,7 @@ for (const packageName of names) { namesAndSuccesses[`${name}@${version}`] = false } - if (matchVersion(version, versions)) { + if (matchVersion(version, versions) && matchesLatestSupported(name, version)) { // Check if the hook already has a set moduleExport if (hook[HOOK_SYMBOL].has(moduleExports)) { namesAndSuccesses[`${name}@${version}`] = true @@ -146,6 +147,17 @@ for (const packageName of names) { }) } +function matchesLatestSupported (name, version) { + if (latest.pinned.includes(name)) { + // These ones are deliberately pinned to a specific version. That + // means we can skip this check, since it will already have been checked + // to be lower than latest. + return true + } + const latest = latests.latests[name] + return matchVersion(version, ['<=' + latest]) +} + function matchVersion (version, ranges) { return !version || (ranges && ranges.some(range => semver.satisfies(semver.coerce(version), range))) } diff --git a/packages/datadog-instrumentations/src/playwright.js b/packages/datadog-instrumentations/src/playwright.js index 1dee90e07ce..e8332d65c8d 100644 --- a/packages/datadog-instrumentations/src/playwright.js +++ b/packages/datadog-instrumentations/src/playwright.js @@ -502,8 +502,7 @@ addHook({ addHook({ name: '@playwright/test', file: 'lib/runner/runner.js', - versions: ['>=1.31.0 <1.38.0'], - pinned: true + versions: ['>=1.31.0 <1.38.0'] }, runnerHook) // From >=1.38.0 diff --git a/packages/datadog-instrumentations/src/redis.js b/packages/datadog-instrumentations/src/redis.js index 06c8d90fa2f..8da93ae08ab 100644 --- a/packages/datadog-instrumentations/src/redis.js +++ b/packages/datadog-instrumentations/src/redis.js @@ -115,7 +115,7 @@ addHook({ name: 'redis', versions: ['>=2.6 <4'] }, redis => { return redis }) -addHook({ name: 'redis', versions: ['>=0.12 <2.6'], pinned: true }, redis => { +addHook({ name: 'redis', versions: ['>=0.12 <2.6'] }, redis => { shimmer.wrap(redis.RedisClient.prototype, 'send_command', sendCommand => function (command, args, callback) { if (!startCh.hasSubscribers) { return sendCommand.apply(this, arguments) diff --git a/scripts/install_plugin_modules.js b/scripts/install_plugin_modules.js index 422ec70a4b0..4ddbf813bab 100644 --- a/scripts/install_plugin_modules.js +++ b/scripts/install_plugin_modules.js @@ -12,6 +12,7 @@ const { getInternals, npmView } = require('./helpers/versioning') +const latests = require('../packages/datadog-instrumentations/src/helpers/latests.json') const requirePackageJsonPath = require.resolve('../packages/dd-trace/src/require-package-json') @@ -133,7 +134,17 @@ async function assertPackage (name, version, dependency, external) { } async function addDependencies (dependencies, name, versionRange) { - const versionList = await getVersionList(name) + let versionList = await getVersionList(name) + if (!latests.pinned.includes(name)) { + const maxVersion = latests.latests[name] + versionList = versionList.map(version => { + if (version.startsWith('>=') && !version.includes('<')) { + return version + ' <=' + maxVersion + } else { + return version + } + }) + } const version = semver.maxSatisfying(versionList, versionRange) const pkgJson = await npmView(`${name}@${version}`) for (const dep of deps[name]) { diff --git a/scripts/outdated.js b/scripts/outdated.js index b2d70297306..c2b4b93d27e 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -1,58 +1,51 @@ -/* eslint-disable no-console */ - -const semver = require('semver') const { getInternals, npmView } = require('./helpers/versioning') +const path = require('path') +const fs = require('fs') -function satisfiesAny (version, versions) { - for (const ver of versions) { - if (semver.satisfies(version, ver)) { - return true - } - } - return false -} +const latestsPath = path.join( + __dirname, + '..', + 'packages', + 'datadog-instrumentations', + 'src', + 'helpers', + 'latests.json' +) +const latestsJson = require(latestsPath) +const internalsNames = Array.from(new Set(getInternals().map(n => n.name))) + .filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) -async function run () { - const internals = consolidateInternals(getInternals()) - for (const inst in internals) { - const distTags = await npmView(inst + ' dist-tags') - const satisfied = satisfiesAny(distTags.latest, internals[inst]) - if (!satisfied) { - console.log( - `latest version of "${inst}" (${distTags.latest}) not supported in ranges: ${ - Array.from(internals[inst]).map(x => `"${x}"`).join(', ') - }` - ) - if (internals[inst].pinned) { - console.log(`^----- "${inst}" pinned intentionally`) - } else { - process.exitCode = 1 - } - } +// TODO A lot of this can be optimized by using `npm outdated`. + +async function fix () { + const latests = {} + for (const name of internalsNames) { + const distTags = await npmView(name + ' dist-tags') + const latest = distTags.latest + latests[name] = latest } + latestsJson.latests = latests + fs.writeFileSync(latestsPath, JSON.stringify(latestsJson, null, 2)) } -function consolidateInternals (internals) { - const consolidated = {} - for (const inst of internals) { - if (Array.isArray(inst.name)) continue - if (inst.name.startsWith('node:')) continue - if (!inst.versions) continue - if (!consolidated[inst.name] && inst.versions.length > 0) { - consolidated[inst.name] = new Set(inst.versions) - } else { - for (const ver of inst.versions) { - consolidated[inst.name].add(ver) - } +async function check () { + for (const name of internalsNames) { + const latest = latestsJson.latests[name] + if (!latest) { + console.log(`No latest version found for "${name}"`) + process.exitCode = 1 } - if (inst.pinned) { - consolidated[inst.name].pinned = true + const distTags = await npmView(name + ' dist-tags') + const npmLatest = distTags.latest + if (npmLatest !== latest) { + console.log(`"latests.json: is not up to date for "${name}": expected "${npmLatest}", got "${latest}"`) + process.exitCode = 1 } } - return consolidated } -run() +if (process.argv.includes('fix')) fix() +else check() From 66ec02f6771d592fe69c96cce766395eee349976 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Sat, 11 May 2024 00:42:06 -0400 Subject: [PATCH 04/80] run outdated checker a bunch of times per day --- .github/workflows/outdated-integrations.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/outdated-integrations.yml diff --git a/.github/workflows/outdated-integrations.yml b/.github/workflows/outdated-integrations.yml new file mode 100644 index 00000000000..41173c23005 --- /dev/null +++ b/.github/workflows/outdated-integrations.yml @@ -0,0 +1,18 @@ +name: Outdated Integrations + +on: + pull_request: + push: + branches: [master] + schedule: + # Yes, this runs a _lot_. We don't want to be out of date for very long. + - cron: '37 12,16,22 * * *' + +jobs: + outdated-integrations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/node/setup + - run: yarn install + - run: yarn outdated-integrations From 09598894c032fec416274cc63c4ac6f2f9014ae7 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Sat, 11 May 2024 00:44:33 -0400 Subject: [PATCH 05/80] typo --- packages/datadog-instrumentations/src/helpers/register.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/datadog-instrumentations/src/helpers/register.js b/packages/datadog-instrumentations/src/helpers/register.js index 7d2bc78ba3b..a904011accf 100644 --- a/packages/datadog-instrumentations/src/helpers/register.js +++ b/packages/datadog-instrumentations/src/helpers/register.js @@ -148,7 +148,7 @@ for (const packageName of names) { } function matchesLatestSupported (name, version) { - if (latest.pinned.includes(name)) { + if (latests.pinned.includes(name)) { // These ones are deliberately pinned to a specific version. That // means we can skip this check, since it will already have been checked // to be lower than latest. From 4b19dca22e876edccf45d4c1f87cf7c668aff7dc Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 17 Sep 2024 11:13:05 -0400 Subject: [PATCH 06/80] fix: update latests.json --- .../src/helpers/latests.json | 88 +++++++++---------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/latests.json b/packages/datadog-instrumentations/src/helpers/latests.json index d773ba64f50..2598fb52d12 100644 --- a/packages/datadog-instrumentations/src/helpers/latests.json +++ b/packages/datadog-instrumentations/src/helpers/latests.json @@ -5,39 +5,39 @@ "redis" ], "latests": { - "aerospike": "5.12.0", + "aerospike": "5.12.1", "amqp10": "3.6.0", "amqplib": "0.10.4", "apollo-server-core": "3.13.0", - "@apollo/server": "4.10.4", - "@apollo/gateway": "2.7.7", - "@smithy/smithy-client": "3.0.0", + "@apollo/server": "4.11.0", + "@apollo/gateway": "2.9.0", + "@smithy/smithy-client": "3.3.2", "@aws-sdk/smithy-client": "3.374.0", - "aws-sdk": "2.1618.0", + "aws-sdk": "2.1691.0", "bluebird": "3.7.2", - "body-parser": "1.20.2", + "body-parser": "1.20.3", "bunyan": "1.8.15", "cassandra-driver": "4.7.2", "connect": "3.7.0", "cookie-parser": "1.4.6", "cookie": "0.6.0", - "couchbase": "4.3.1", - "@cucumber/cucumber": "10.6.0", - "cypress": "13.9.0", - "@elastic/transport": "8.5.1", - "@elastic/elasticsearch": "8.13.1", + "couchbase": "4.4.1", + "@cucumber/cucumber": "11.0.1", + "cypress": "13.14.2", + "@elastic/transport": "8.7.1", + "@elastic/elasticsearch": "8.15.0", "elasticsearch": "16.7.3", "express-mongo-sanitize": "2.2.0", - "express": "4.19.2", - "fastify": "4.27.0", - "find-my-way": "8.2.0", + "express": "4.21.0", + "fastify": "5.0.0", + "find-my-way": "9.0.1", "fs": "0.0.1-security", "generic-pool": "3.9.0", - "@google-cloud/pubsub": "4.4.0", - "@graphql-tools/executor": "1.2.6", - "graphql": "16.8.1", - "@grpc/grpc-js": "1.10.7", - "@hapi/hapi": "21.3.9", + "@google-cloud/pubsub": "4.7.2", + "@graphql-tools/executor": "1.3.1", + "graphql": "16.9.0", + "@grpc/grpc-js": "1.11.2", + "@hapi/hapi": "21.3.10", "hapi": "18.1.0", "ioredis": "5.4.1", "jest-environment-node": "29.7.0", @@ -53,49 +53,49 @@ "kafkajs": "2.2.4", "knex": "3.1.0", "koa": "2.15.3", - "@koa/router": "12.0.1", - "koa-router": "12.0.1", + "@koa/router": "13.0.1", + "koa-router": "13.0.1", "ldapjs": "3.0.7", "limitd-client": "2.14.1", - "mariadb": "3.3.0", + "mariadb": "3.3.1", "memcached": "2.2.2", - "microgateway-core": "3.3.3", - "mocha": "10.4.0", + "microgateway-core": "3.3.4", + "mocha": "10.7.3", "mocha-each": "2.0.1", - "moleculer": "0.14.33", + "moleculer": "0.14.34", "mongodb-core": "3.2.7", - "mongodb": "6.6.1", - "mongoose": "8.3.4", + "mongodb": "6.9.0", + "mongoose": "8.6.2", "mquery": "5.0.0", "mysql": "2.18.1", - "mysql2": "3.9.7", - "next": "14.2.3", - "openai": "4.44.0", - "@opensearch-project/opensearch": "2.8.0", - "oracledb": "6.5.0", + "mysql2": "3.11.3", + "next": "14.2.11", + "openai": "4.61.1", + "@opensearch-project/opensearch": "2.12.0", + "oracledb": "6.6.0", "paperplane": "3.1.2", "passport-http": "0.3.0", "passport-local": "1.0.0", - "pg": "8.11.5", - "pino": "9.0.0", - "pino-pretty": "11.0.0", - "@playwright/test": "1.44.0", - "playwright": "1.44.0", + "pg": "8.13.0", + "pino": "9.4.0", + "pino-pretty": "11.2.2", + "@playwright/test": "1.47.1", + "playwright": "1.47.1", "promise-js": "0.0.7", "promise": "8.3.0", "q": "1.5.1", - "qs": "6.12.1", + "qs": "6.13.0", "@node-redis/client": "1.0.6", - "@redis/client": "1.5.14", - "redis": "4.6.13", + "@redis/client": "1.6.0", + "redis": "4.7.0", "restify": "11.1.0", "rhea": "3.0.2", "router": "1.3.8", - "selenium-webdriver": "4.20.0", + "selenium-webdriver": "4.24.1", "sequelize": "6.37.3", - "sharedb": "4.1.4", - "tedious": "18.2.0", + "sharedb": "5.0.4", + "tedious": "18.6.1", "when": "3.7.8", - "winston": "3.13.0" + "winston": "3.14.2" } } \ No newline at end of file From f1324e2900bcc3909934e33f8de568c7ce426905 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 17 Sep 2024 12:49:06 -0400 Subject: [PATCH 07/80] adding creating a pr from outdated integrations --- .github/workflows/outdated-integrations.yml | 3 --- package.json | 2 +- scripts/outdated.js | 24 +++++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/outdated-integrations.yml b/.github/workflows/outdated-integrations.yml index 41173c23005..7a0512545f3 100644 --- a/.github/workflows/outdated-integrations.yml +++ b/.github/workflows/outdated-integrations.yml @@ -1,9 +1,6 @@ name: Outdated Integrations on: - pull_request: - push: - branches: [master] schedule: # Yes, this runs a _lot_. We don't want to be out of date for very long. - cron: '37 12,16,22 * * *' diff --git a/package.json b/package.json index d14ba956334..eb52c60ac14 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "bench:e2e:ci-visibility": "node benchmark/e2e-ci/benchmark-run.js", "type:doc": "cd docs && yarn && yarn build", "type:test": "cd docs && yarn && yarn test", - "outdated-integrations": "node scripts/outdated.js", + "outdated-integrations": "node scripts/outdated.js fix", "lint": "node scripts/check_licenses.js && eslint . && yarn audit --groups dependencies", "lint-fix": "node scripts/check_licenses.js && eslint . --fix && yarn audit --groups dependencies", "services": "node ./scripts/install_plugin_modules && node packages/dd-trace/test/setup/services", diff --git a/scripts/outdated.js b/scripts/outdated.js index c2b4b93d27e..0ea82a4ab3e 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -4,6 +4,7 @@ const { } = require('./helpers/versioning') const path = require('path') const fs = require('fs') +const { execSync } = require('child_process') const latestsPath = path.join( __dirname, @@ -20,6 +21,12 @@ const internalsNames = Array.from(new Set(getInternals().map(n => n.name))) // TODO A lot of this can be optimized by using `npm outdated`. +function makeAPR (branchName) { + const title = 'Fix: Update Outdated Versions' + const body = 'Checking for and updating outdated integration versions' + execSync(`gh pr create --title ${title} --body ${body} --base master --head ${branchName} `) +} + async function fix () { const latests = {} for (const name of internalsNames) { @@ -29,6 +36,23 @@ async function fix () { } latestsJson.latests = latests fs.writeFileSync(latestsPath, JSON.stringify(latestsJson, null, 2)) + + const result = execSync('git status').toString() + + if (result.includes(latestsPath)) { + const branchName = 'fix_outdated_integrations' + try { + execSync(`git checkout -b ${branchName}`) + execSync(`git add ${latestsPath}`) + execSync('git commit -m "fix: update integr latests.json"') + execSync(`git push origin ${branchName}`) + + makeAPR(branchName) + } catch (e) { + console.log('ERROR', e) + process.exitCode = 1 + } + } } async function check () { From 5c9750f2c01b55c11c2355d4416a0760c0f23212 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 17 Sep 2024 12:52:06 -0400 Subject: [PATCH 08/80] removing work to update modules --- scripts/install_plugin_modules.js | 73 +++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/scripts/install_plugin_modules.js b/scripts/install_plugin_modules.js index 4ddbf813bab..682e2d3c5ad 100644 --- a/scripts/install_plugin_modules.js +++ b/scripts/install_plugin_modules.js @@ -5,14 +5,10 @@ const os = require('os') const path = require('path') const crypto = require('crypto') const semver = require('semver') +const proxyquire = require('proxyquire') const exec = require('./helpers/exec') +const childProcess = require('child_process') const externals = require('../packages/dd-trace/test/plugins/externals') -const { - getVersionList, - getInternals, - npmView -} = require('./helpers/versioning') -const latests = require('../packages/datadog-instrumentations/src/helpers/latests.json') const requirePackageJsonPath = require.resolve('../packages/dd-trace/src/require-package-json') @@ -20,6 +16,7 @@ const requirePackageJsonPath = require.resolve('../packages/dd-trace/src/require // Can remove couchbase after removing support for couchbase <= 3.2.0 const excludeList = os.arch() === 'arm64' ? ['aerospike', 'couchbase', 'grpc', 'oracledb'] : [] const workspaces = new Set() +const versionLists = {} const deps = {} const filter = process.env.hasOwnProperty('PLUGINS') && process.env.PLUGINS.split('|') @@ -49,7 +46,21 @@ async function run () { } async function assertVersions () { - const internals = getInternals() + const internals = names + .map(key => { + const instrumentations = [] + const name = key + + try { + loadInstFile(`${name}/server.js`, instrumentations) + loadInstFile(`${name}/client.js`, instrumentations) + } catch (e) { + loadInstFile(`${name}.js`, instrumentations) + } + + return instrumentations + }) + .reduce((prev, next) => prev.concat(next), []) for (const inst of internals) { await assertInstrumentation(inst, false) @@ -134,17 +145,7 @@ async function assertPackage (name, version, dependency, external) { } async function addDependencies (dependencies, name, versionRange) { - let versionList = await getVersionList(name) - if (!latests.pinned.includes(name)) { - const maxVersion = latests.latests[name] - versionList = versionList.map(version => { - if (version.startsWith('>=') && !version.includes('<')) { - return version + ' <=' + maxVersion - } else { - return version - } - }) - } + const versionList = await getVersionList(name) const version = semver.maxSatisfying(versionList, versionRange) const pkgJson = await npmView(`${name}@${version}`) for (const dep of deps[name]) { @@ -157,6 +158,27 @@ async function addDependencies (dependencies, name, versionRange) { } } +async function getVersionList (name) { + if (versionLists[name]) { + return versionLists[name] + } + const list = await npmView(`${name} versions`) + versionLists[name] = list + return list +} + +function npmView (input) { + return new Promise((resolve, reject) => { + childProcess.exec(`npm view ${input} --json`, (err, stdout) => { + if (err) { + reject(err) + return + } + resolve(JSON.parse(stdout.toString('utf8'))) + }) + }) +} + function assertIndex (name, version) { const index = `'use strict' @@ -212,3 +234,18 @@ function sha1 (str) { shasum.update(str) return shasum.digest('hex') } + +function loadInstFile (file, instrumentations) { + const instrument = { + addHook (instrumentation) { + instrumentations.push(instrumentation) + } + } + + const instPath = path.join(__dirname, `../packages/datadog-instrumentations/src/${file}`) + + proxyquire.noPreserveCache()(instPath, { + './helpers/instrument': instrument, + '../helpers/instrument': instrument + }) +} From 790863350e5bd72eaeedb22566522965e539037c Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 09:55:32 -0400 Subject: [PATCH 09/80] adding ability to modify plugin yaml --- .github/workflows/plugins.yml | 152 +++++++++++++++++- .../src/helpers/latests.json | 21 +-- scripts/outdated.js | 19 +++ 3 files changed, 178 insertions(+), 14 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 405bc562f0e..ccca67d6dc7 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -58,7 +58,7 @@ jobs: range: ['5.2.0 - 5.7.0'] include: - node-version: 20 - range: '>=5.8.0' + range: ['5.12.1'] runs-on: ubuntu-latest services: aerospike: @@ -97,6 +97,9 @@ jobs: - uses: codecov/codecov-action@v3 amqp10: + strategy: + matrix: + range: ['3.6.0'] runs-on: ubuntu-latest services: qpid: @@ -115,6 +118,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream amqplib: + strategy: + matrix: + range: ['0.10.4' ] runs-on: ubuntu-latest services: rabbitmq: @@ -129,6 +135,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream apollo: + strategy: + matrix: + range: ['2.9.0'] runs-on: ubuntu-latest env: PLUGINS: apollo @@ -140,6 +149,7 @@ jobs: strategy: matrix: node-version: ['18', 'latest'] + range: ['2.1691.0'] runs-on: ubuntu-latest services: localstack: @@ -197,6 +207,9 @@ jobs: - uses: ./.github/actions/plugins/upstream bluebird: + strategy: + matrix: + range: ['3.7.2'] runs-on: ubuntu-latest env: PLUGINS: bluebird @@ -205,6 +218,9 @@ jobs: - uses: ./.github/actions/plugins/test bunyan: + strategy: + matrix: + range: ['1.8.15'] runs-on: ubuntu-latest env: PLUGINS: bunyan @@ -213,6 +229,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream cassandra: + strategy: + matrix: + range: ['>=3.0.0 <=4.7.2'] runs-on: ubuntu-latest services: cassandra: @@ -246,10 +265,10 @@ jobs: strategy: matrix: node-version: [16] - range: ['^2.6.12', '^3.0.7', '>=4.0.0 <4.2.0'] + range: ['^2.6.12', '^3.0.7', '4.4.1'] include: - node-version: 18 - range: '>=4.2.0' + range: '4.4.1' runs-on: ubuntu-latest services: couchbase: @@ -274,6 +293,9 @@ jobs: - uses: codecov/codecov-action@v3 connect: + strategy: + matrix: + range: ['3.7.0'] runs-on: ubuntu-latest env: PLUGINS: connect @@ -282,6 +304,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream cucumber: + strategy: + matrix: + range: ['11.0.1'] runs-on: ubuntu-latest env: PLUGINS: cucumber @@ -291,6 +316,9 @@ jobs: # TODO: fix performance issues and test more Node versions cypress: + strategy: + matrix: + range: ['13.14.2'] runs-on: ubuntu-latest env: PLUGINS: cypress @@ -324,6 +352,9 @@ jobs: - uses: codecov/codecov-action@v3 elasticsearch: + strategy: + matrix: + range: ['16.7.3'] runs-on: ubuntu-latest services: elasticsearch: @@ -347,6 +378,9 @@ jobs: - uses: codecov/codecov-action@v3 express: + strategy: + matrix: + range: ['4.21.0'] runs-on: ubuntu-latest env: PLUGINS: express|body-parser|cookie-parser @@ -355,6 +389,9 @@ jobs: - uses: ./.github/actions/plugins/test fastify: + strategy: + matrix: + range: ['4.28.1'] runs-on: ubuntu-latest env: PLUGINS: fastify @@ -371,6 +408,9 @@ jobs: - uses: ./.github/actions/plugins/test generic-pool: + strategy: + matrix: + range: ['3.9.0'] runs-on: ubuntu-latest env: PLUGINS: generic-pool @@ -379,6 +419,9 @@ jobs: - uses: ./.github/actions/plugins/test google-cloud-pubsub: + strategy: + matrix: + range: ['4.7.2'] runs-on: ubuntu-latest services: pubsub: @@ -393,6 +436,9 @@ jobs: - uses: ./.github/actions/plugins/test graphql: + strategy: + matrix: + range: ['16.9.0'] runs-on: ubuntu-latest env: PLUGINS: graphql @@ -401,6 +447,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream grpc: + strategy: + matrix: + range: ['1.11.2'] runs-on: ubuntu-latest env: PLUGINS: grpc @@ -409,6 +458,9 @@ jobs: - uses: ./.github/actions/plugins/test hapi: + strategy: + matrix: + range: ['18.1.0'] runs-on: ubuntu-latest env: PLUGINS: hapi @@ -457,6 +509,9 @@ jobs: # TODO: fix performance issues and test more Node versions jest: + strategy: + matrix: + range: ['29.7.0'] runs-on: ubuntu-latest env: PLUGINS: jest @@ -471,6 +526,9 @@ jobs: - uses: codecov/codecov-action@v3 kafkajs: + strategy: + matrix: + range: ['2.2.4'] runs-on: ubuntu-latest services: kafka: @@ -498,6 +556,9 @@ jobs: - uses: ./.github/actions/plugins/test knex: + strategy: + matrix: + range: ['3.1.0'] runs-on: ubuntu-latest env: PLUGINS: knex @@ -506,6 +567,9 @@ jobs: - uses: ./.github/actions/plugins/test koa: + strategy: + matrix: + range: ['2.15.3'] runs-on: ubuntu-latest env: PLUGINS: koa @@ -514,6 +578,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream limitd-client: + strategy: + matrix: + range: ['2.14.1'] runs-on: ubuntu-latest services: limitd: @@ -532,6 +599,9 @@ jobs: - uses: ./.github/actions/plugins/test memcached: + strategy: + matrix: + range: ['2.2.2'] runs-on: ubuntu-latest services: memcached: @@ -546,6 +616,9 @@ jobs: - uses: ./.github/actions/plugins/test microgateway-core: + strategy: + matrix: + range: ['3.3.4'] runs-on: ubuntu-latest env: PLUGINS: microgateway-core @@ -554,6 +627,9 @@ jobs: - uses: ./.github/actions/plugins/test mocha: + strategy: + matrix: + range: ['10.7.3'] runs-on: ubuntu-latest env: PLUGINS: mocha @@ -562,6 +638,9 @@ jobs: - uses: ./.github/actions/plugins/test moleculer: + strategy: + matrix: + range: ['0.14.34'] runs-on: ubuntu-latest env: PLUGINS: moleculer @@ -570,6 +649,9 @@ jobs: - uses: ./.github/actions/plugins/test mongodb: + strategy: + matrix: + range: ['6.9.0'] runs-on: ubuntu-latest services: mongodb: @@ -585,6 +667,9 @@ jobs: - uses: ./.github/actions/plugins/test mongodb-core: + strategy: + matrix: + range: ['3.2.7'] runs-on: ubuntu-latest services: mongodb: @@ -600,6 +685,9 @@ jobs: - uses: ./.github/actions/plugins/test mongoose: + strategy: + matrix: + range: ['8.6.2'] runs-on: ubuntu-latest services: mongodb: @@ -614,6 +702,9 @@ jobs: - uses: ./.github/actions/plugins/test mysql: + strategy: + matrix: + range: ['2.18.1'] runs-on: ubuntu-latest services: mysql: @@ -656,7 +747,7 @@ jobs: version: - 18 - latest - range: ['9.5.0', '11.1.4', '13.2.0', '14.2.6'] + range: ['14.2.6'] runs-on: ubuntu-latest env: PLUGINS: next @@ -672,6 +763,9 @@ jobs: - uses: codecov/codecov-action@v3 openai: + strategy: + matrix: + range: ['4.61.1'] runs-on: ubuntu-latest env: PLUGINS: openai @@ -680,6 +774,9 @@ jobs: - uses: ./.github/actions/plugins/test opensearch: + strategy: + matrix: + range: ['2.12.0'] runs-on: ubuntu-latest services: opensearch: @@ -699,6 +796,9 @@ jobs: # TODO: Install the Oracle client on the host and test Node >=16. # TODO: Figure out why nyc stopped working with EACCESS errors. oracledb: + strategy: + matrix: + range: ['6.6.0'] runs-on: ubuntu-latest container: bengl/node-12-with-oracle-client services: @@ -737,6 +837,9 @@ jobs: - uses: codecov/codecov-action@v2 paperplane: + strategy: + matrix: + range: ['3.1.2'] runs-on: ubuntu-latest env: PLUGINS: paperplane @@ -753,6 +856,9 @@ jobs: # TODO: re-enable upstream tests if it ever stops being flaky pino: + strategy: + matrix: + range: ['9.4.0'] runs-on: ubuntu-latest env: PLUGINS: pino @@ -771,6 +877,9 @@ jobs: - uses: codecov/codecov-action@v3 postgres: + strategy: + matrix: + range: ['8.13.0'] runs-on: ubuntu-latest services: postgres: @@ -788,6 +897,9 @@ jobs: - uses: ./.github/actions/plugins/test promise: + strategy: + matrix: + range: ['8.3.0'] runs-on: ubuntu-latest env: PLUGINS: promise @@ -796,6 +908,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream promise-js: + strategy: + matrix: + range: ['0.0.7'] runs-on: ubuntu-latest env: PLUGINS: promise-js @@ -804,6 +919,9 @@ jobs: - uses: ./.github/actions/plugins/test q: + strategy: + matrix: + range: ['1.5.1'] runs-on: ubuntu-latest env: PLUGINS: q @@ -812,6 +930,9 @@ jobs: - uses: ./.github/actions/plugins/test redis: + strategy: + matrix: + range: ['4.7.0'] runs-on: ubuntu-latest services: redis: @@ -826,6 +947,9 @@ jobs: - uses: ./.github/actions/plugins/test restify: + strategy: + matrix: + range: ['11.1.0'] runs-on: ubuntu-latest env: PLUGINS: restify @@ -852,6 +976,9 @@ jobs: - uses: ./.github/actions/plugins/test-and-upstream router: + strategy: + matrix: + range: ['1.3.8'] runs-on: ubuntu-latest env: PLUGINS: router @@ -860,6 +987,9 @@ jobs: - uses: ./.github/actions/plugins/test sharedb: + strategy: + matrix: + range: ['5.0.4'] runs-on: ubuntu-latest env: PLUGINS: sharedb @@ -875,6 +1005,9 @@ jobs: - uses: codecov/codecov-action@v3 tedious: + strategy: + matrix: + range: ['18.6.1'] runs-on: ubuntu-latest services: mssql: @@ -901,6 +1034,9 @@ jobs: - uses: codecov/codecov-action@v3 undici: + strategy: + matrix: + range: ['4.16.0', '5.28.4', '6.19.8'] runs-on: ubuntu-latest env: PLUGINS: undici @@ -909,6 +1045,9 @@ jobs: - uses: ./.github/actions/plugins/test when: + strategy: + matrix: + range: ['3.7.8'] runs-on: ubuntu-latest env: PLUGINS: when @@ -917,9 +1056,12 @@ jobs: - uses: ./.github/actions/plugins/test winston: + strategy: + matrix: + range: ['3.14.2'] runs-on: ubuntu-latest env: PLUGINS: winston steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/plugins/test + - uses: ./.github/actions/plugins/test \ No newline at end of file diff --git a/packages/datadog-instrumentations/src/helpers/latests.json b/packages/datadog-instrumentations/src/helpers/latests.json index 2598fb52d12..72a7975014e 100644 --- a/packages/datadog-instrumentations/src/helpers/latests.json +++ b/packages/datadog-instrumentations/src/helpers/latests.json @@ -10,7 +10,7 @@ "amqplib": "0.10.4", "apollo-server-core": "3.13.0", "@apollo/server": "4.11.0", - "@apollo/gateway": "2.9.0", + "@apollo/gateway": "2.9.1", "@smithy/smithy-client": "3.3.2", "@aws-sdk/smithy-client": "3.374.0", "aws-sdk": "2.1691.0", @@ -36,7 +36,7 @@ "@google-cloud/pubsub": "4.7.2", "@graphql-tools/executor": "1.3.1", "graphql": "16.9.0", - "@grpc/grpc-js": "1.11.2", + "@grpc/grpc-js": "1.11.3", "@hapi/hapi": "21.3.10", "hapi": "18.1.0", "ioredis": "5.4.1", @@ -53,24 +53,24 @@ "kafkajs": "2.2.4", "knex": "3.1.0", "koa": "2.15.3", - "@koa/router": "13.0.1", + "@koa/router": "13.1.0", "koa-router": "13.0.1", "ldapjs": "3.0.7", "limitd-client": "2.14.1", - "mariadb": "3.3.1", + "lodash": "4.17.21", + "mariadb": "3.3.2", "memcached": "2.2.2", "microgateway-core": "3.3.4", - "mocha": "10.7.3", - "mocha-each": "2.0.1", "moleculer": "0.14.34", "mongodb-core": "3.2.7", "mongodb": "6.9.0", - "mongoose": "8.6.2", + "mongoose": "8.6.3", "mquery": "5.0.0", "mysql": "2.18.1", "mysql2": "3.11.3", - "next": "14.2.11", - "openai": "4.61.1", + "next": "14.2.12", + "nyc": "17.0.0", + "openai": "4.62.1", "@opensearch-project/opensearch": "2.12.0", "oracledb": "6.6.0", "paperplane": "3.1.2", @@ -95,6 +95,9 @@ "sequelize": "6.37.3", "sharedb": "5.0.4", "tedious": "18.6.1", + "undici": "6.19.8", + "vitest": "2.1.1", + "@vitest/runner": "2.1.1", "when": "3.7.8", "winston": "3.14.2" } diff --git a/scripts/outdated.js b/scripts/outdated.js index 0ea82a4ab3e..007223c9e32 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -5,6 +5,7 @@ const { const path = require('path') const fs = require('fs') const { execSync } = require('child_process') +const yaml = require('js-yaml') const latestsPath = path.join( __dirname, @@ -15,6 +16,14 @@ const latestsPath = path.join( 'helpers', 'latests.json' ) + +const yamlPath = path.join( + __dirname, + '..', + '.github', + 'workflows', + 'plugins.yml' +) const latestsJson = require(latestsPath) const internalsNames = Array.from(new Set(getInternals().map(n => n.name))) .filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) @@ -27,7 +36,17 @@ function makeAPR (branchName) { execSync(`gh pr create --title ${title} --body ${body} --base master --head ${branchName} `) } +function updatePluginsYaml () { + const plugins = yaml.load(fs.readFileSync(yamlPath, 'utf-8')) + const jobs = plugins.jobs + + for (const job in jobs) { + if (jobs[job]?.strategy?.matrix?.range) { console.log('found range', job, jobs[job]?.strategy?.matrix?.range) } + } +} + async function fix () { + updatePluginsYaml() const latests = {} for (const name of internalsNames) { const distTags = await npmView(name + ' dist-tags') From d236fbb621c03bda7417ec24d5893d214929c69f Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:32:30 -0400 Subject: [PATCH 10/80] reworking ci --- .github/workflows/plugins.yml | 27 +++++++++++++------ .../src/helpers/latests.json | 7 +++++ .../src/helpers/matrices.json | 9 +++++++ packages/dd-trace/test/setup/mocha.js | 3 +++ scripts/install_plugin_modules.js | 3 +++ 5 files changed, 41 insertions(+), 8 deletions(-) create mode 100644 packages/datadog-instrumentations/src/helpers/matrices.json diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index ccca67d6dc7..521ee978da9 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -15,6 +15,14 @@ concurrency: jobs: + versions: + runs-on: ubuntu-latest + outputs: + matrices: ${{steps.plugins.outputs.matrices}} + steps: + - name: plugins + run: echo "json=$(cat packages/datadog-instrumentations/src/helpers/matrices.json)" >> $GITHUB_OUTPUT + aerospike-node-16: runs-on: ubuntu-latest services: @@ -263,12 +271,7 @@ jobs: couchbase: strategy: - matrix: - node-version: [16] - range: ['^2.6.12', '^3.0.7', '4.4.1'] - include: - - node-version: 18 - range: '4.4.1' + matrix: ${{fromJson(needs.versions.outputs.matrices.couchbase)}} runs-on: ubuntu-latest services: couchbase: @@ -747,11 +750,11 @@ jobs: version: - 18 - latest - range: ['14.2.6'] + range: ['14.2.5'] runs-on: ubuntu-latest env: PLUGINS: next - PACKAGE_VERSION_RANGE: ${{ matrix.range }} + PACKAGE_VERSION_RANGE: ['14.2.5'] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/testagent/start @@ -761,6 +764,7 @@ jobs: - if: always() uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 + // reads latest json and openai: strategy: @@ -856,12 +860,19 @@ jobs: # TODO: re-enable upstream tests if it ever stops being flaky pino: +<<<<<<< Updated upstream strategy: matrix: range: ['9.4.0'] +======= + # strategy: + # matrix: + # range: ['9.3.2'] +>>>>>>> Stashed changes runs-on: ubuntu-latest env: PLUGINS: pino + PACKAGE_VERSION_RANGE: ['2.0.0 <9.3.2'] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/testagent/start diff --git a/packages/datadog-instrumentations/src/helpers/latests.json b/packages/datadog-instrumentations/src/helpers/latests.json index 72a7975014e..31f6595bb36 100644 --- a/packages/datadog-instrumentations/src/helpers/latests.json +++ b/packages/datadog-instrumentations/src/helpers/latests.json @@ -100,5 +100,12 @@ "@vitest/runner": "2.1.1", "when": "3.7.8", "winston": "3.14.2" + }, + "matrices": { + "couchbase": { + "node-version": [16], + "range": [["2.6.12 ", "2.6.12"], ["3.0.7", "3.2.7"], ["4.0.0", "4.4.1"] ], + "include": [{"node-version" : 18}, ["4.4.1", "4.4.1"]] + } } } \ No newline at end of file diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json new file mode 100644 index 00000000000..e199b508c00 --- /dev/null +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -0,0 +1,9 @@ +{ + "matrices": { + "couchbase": { + "node-version": [16], + "range": [["2.6.12 ", "2.6.12"], ["3.0.7", "3.2.7"], ["4.0.0", "4.4.1"] ], + "include": [{"node-version" : 18}, ["4.4.1", "4.4.1"]] + } + } +} \ No newline at end of file diff --git a/packages/dd-trace/test/setup/mocha.js b/packages/dd-trace/test/setup/mocha.js index d3520c3fe1c..db5544e1d41 100644 --- a/packages/dd-trace/test/setup/mocha.js +++ b/packages/dd-trace/test/setup/mocha.js @@ -204,6 +204,8 @@ function withVersions (plugin, modules, range, cb) { instrumentations .filter(instrumentation => instrumentation.name === moduleName) .forEach(instrumentation => { + console.log('rabe', process.env.PACKAGE_VERSION_RANGE) + console.log('rabe', process.env.PLUGINS) const versions = process.env.PACKAGE_VERSION_RANGE ? [process.env.PACKAGE_VERSION_RANGE] : instrumentation.versions @@ -221,6 +223,7 @@ function withVersions (plugin, modules, range, cb) { testVersions.set(max, { range: version, test: version }) }) }) + console.log('TEST VERSIONS', testVersions) Array.from(testVersions) .filter(v => !range || semver.satisfies(v[0], range)) diff --git a/scripts/install_plugin_modules.js b/scripts/install_plugin_modules.js index 682e2d3c5ad..1b72ceb00a8 100644 --- a/scripts/install_plugin_modules.js +++ b/scripts/install_plugin_modules.js @@ -145,8 +145,10 @@ async function assertPackage (name, version, dependency, external) { } async function addDependencies (dependencies, name, versionRange) { + console.log('VERSION RANGE', versionRange) const versionList = await getVersionList(name) const version = semver.maxSatisfying(versionList, versionRange) + // console.log('VERSION', version) const pkgJson = await npmView(`${name}@${version}`) for (const dep of deps[name]) { for (const section of ['devDependencies', 'peerDependencies']) { @@ -164,6 +166,7 @@ async function getVersionList (name) { } const list = await npmView(`${name} versions`) versionLists[name] = list + console.log('LIST', list[309]) return list } From 1a03d8f9742c5c8465095e1fcc3a2644b50a1fa9 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:34:11 -0400 Subject: [PATCH 11/80] reworking ci --- .github/workflows/plugins.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 521ee978da9..e10b95a867a 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -764,7 +764,6 @@ jobs: - if: always() uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 - // reads latest json and openai: strategy: From 2cfc700d2e0732973e7465629bf769f19a875bc9 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:35:28 -0400 Subject: [PATCH 12/80] reworking ci --- .github/workflows/plugins.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index e10b95a867a..b9a34b87820 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -859,15 +859,9 @@ jobs: # TODO: re-enable upstream tests if it ever stops being flaky pino: -<<<<<<< Updated upstream strategy: matrix: range: ['9.4.0'] -======= - # strategy: - # matrix: - # range: ['9.3.2'] ->>>>>>> Stashed changes runs-on: ubuntu-latest env: PLUGINS: pino From 5285e1df85079ddb2e97318a198e0f5d4b17a599 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:37:42 -0400 Subject: [PATCH 13/80] reworking ci --- .github/workflows/plugins.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index b9a34b87820..a444c2d949f 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -754,7 +754,7 @@ jobs: runs-on: ubuntu-latest env: PLUGINS: next - PACKAGE_VERSION_RANGE: ['14.2.5'] + PACKAGE_VERSION_RANGE: ${{matrix.range}} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/testagent/start @@ -865,7 +865,6 @@ jobs: runs-on: ubuntu-latest env: PLUGINS: pino - PACKAGE_VERSION_RANGE: ['2.0.0 <9.3.2'] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/testagent/start From 32875e1f673f65d7cdeb739402ca1d29cc6025e9 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:41:04 -0400 Subject: [PATCH 14/80] reworking ci --- .github/workflows/plugins.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index a444c2d949f..74a694feebf 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -270,6 +270,7 @@ jobs: - uses: codecov/codecov-action@v2 couchbase: + needs: versions strategy: matrix: ${{fromJson(needs.versions.outputs.matrices.couchbase)}} runs-on: ubuntu-latest From 65982a812a748c752e57f6f6bd0b8be423f160c8 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:48:27 -0400 Subject: [PATCH 15/80] reworking ci --- .github/workflows/plugins.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 74a694feebf..ad4ec9fe944 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -20,6 +20,7 @@ jobs: outputs: matrices: ${{steps.plugins.outputs.matrices}} steps: + - uses: actions/checkout@v4 - name: plugins run: echo "json=$(cat packages/datadog-instrumentations/src/helpers/matrices.json)" >> $GITHUB_OUTPUT @@ -270,7 +271,8 @@ jobs: - uses: codecov/codecov-action@v2 couchbase: - needs: versions + needs: + - versions strategy: matrix: ${{fromJson(needs.versions.outputs.matrices.couchbase)}} runs-on: ubuntu-latest From 7fb60ab849bd74e117fdda16ff30aa8e2f7289b3 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:52:02 -0400 Subject: [PATCH 16/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index ad4ec9fe944..04f388d2a70 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: plugins - run: echo "json=$(cat packages/datadog-instrumentations/src/helpers/matrices.json)" >> $GITHUB_OUTPUT + run: echo "json=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ')" >> $GITHUB_OUTPUT aerospike-node-16: runs-on: ubuntu-latest From 2f30dd4f6cda36a59e4c6e9d8e0e706b60c1dbfb Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 13:56:22 -0400 Subject: [PATCH 17/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 04f388d2a70..bb8845c16ad 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -21,7 +21,7 @@ jobs: matrices: ${{steps.plugins.outputs.matrices}} steps: - uses: actions/checkout@v4 - - name: plugins + - id: plugins run: echo "json=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ')" >> $GITHUB_OUTPUT aerospike-node-16: From 68d8266d0fa904363e407e2bf2b29b7c070b376f Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:00:41 -0400 Subject: [PATCH 18/80] reworking ci --- packages/datadog-instrumentations/src/helpers/matrices.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index e199b508c00..263f595ee40 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -1,9 +1,7 @@ { - "matrices": { "couchbase": { "node-version": [16], "range": [["2.6.12 ", "2.6.12"], ["3.0.7", "3.2.7"], ["4.0.0", "4.4.1"] ], "include": [{"node-version" : 18}, ["4.4.1", "4.4.1"]] } - } } \ No newline at end of file From a6566516d0ce46faabe1e4c8a2d8ea9fae7077f5 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:07:10 -0400 Subject: [PATCH 19/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index bb8845c16ad..73b3cc496b5 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v4 - id: plugins - run: echo "json=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ')" >> $GITHUB_OUTPUT + run: echo "matrices=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ')" >> $GITHUB_OUTPUT aerospike-node-16: runs-on: ubuntu-latest From ab0b02fe8feb47b8db6d627266a79e24df5b0dce Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:11:09 -0400 Subject: [PATCH 20/80] reworking ci --- .github/workflows/plugins.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 73b3cc496b5..a4bd5ea2da2 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -13,7 +13,6 @@ concurrency: # TODO: upstream jobs - jobs: versions: runs-on: ubuntu-latest From 8e87d989b48899afa3bb4091552228d5f88e41b1 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:14:57 -0400 Subject: [PATCH 21/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index a4bd5ea2da2..d4619df2ecd 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -273,7 +273,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices.couchbase)}} + matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase}} runs-on: ubuntu-latest services: couchbase: From 3b8def32ef49e45a2a355ac2b9963e357d4400dc Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:17:32 -0400 Subject: [PATCH 22/80] reworking ci --- .github/workflows/plugins.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index d4619df2ecd..bee01c86f20 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -22,6 +22,7 @@ jobs: - uses: actions/checkout@v4 - id: plugins run: echo "matrices=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ')" >> $GITHUB_OUTPUT + - run: echo $GITHUB_OUTPUT aerospike-node-16: runs-on: ubuntu-latest From ef24842c2725f6f931c963991d270ca5d09d2d0b Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:24:39 -0400 Subject: [PATCH 23/80] reworking ci --- .github/workflows/plugins.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index bee01c86f20..afca6007dfa 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -21,8 +21,10 @@ jobs: steps: - uses: actions/checkout@v4 - id: plugins - run: echo "matrices=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ')" >> $GITHUB_OUTPUT - - run: echo $GITHUB_OUTPUT + run: | + content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') + echo "matrices=$content" >> $GITHUB_OUTPUT + echo $content aerospike-node-16: runs-on: ubuntu-latest From 20ea671e526732f53d2dadd8fb6c2c3b2cc4dd46 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:27:42 -0400 Subject: [PATCH 24/80] reworking ci --- packages/datadog-instrumentations/src/helpers/matrices.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 263f595ee40..c8431264b52 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -2,6 +2,6 @@ "couchbase": { "node-version": [16], "range": [["2.6.12 ", "2.6.12"], ["3.0.7", "3.2.7"], ["4.0.0", "4.4.1"] ], - "include": [{"node-version" : 18}, ["4.4.1", "4.4.1"]] + "include": [{"node-version" : 18, "range":["4.4.1", "4.4.1"]}] } } \ No newline at end of file From a0cf2589d7fd9dea217a9af74f804f213fe52ab2 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 19 Sep 2024 14:34:48 -0400 Subject: [PATCH 25/80] reworking ci --- packages/datadog-instrumentations/src/helpers/matrices.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index c8431264b52..feb574fbd27 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -1,7 +1,7 @@ { "couchbase": { "node-version": [16], - "range": [["2.6.12 ", "2.6.12"], ["3.0.7", "3.2.7"], ["4.0.0", "4.4.1"] ], - "include": [{"node-version" : 18, "range":["4.4.1", "4.4.1"]}] + "range": ["2.6.12 - 2.6.12", "3.0.7 - 3.2.7", "4.0.0 - 4.4.1" ], + "include": [{"node-version": 18, "range": "4.4.1 - 4.4.1"}] } } \ No newline at end of file From b08b14389973f837424e13eb998dc17780b7a9dd Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 17:44:00 -0400 Subject: [PATCH 26/80] reworking updating script to create matrices for plugins --- .github/workflows/plugins.yml | 3 +- .../src/helpers/matrices.json | 712 +++++++++++++++++- packages/dd-trace/test/setup/mocha.js | 3 - scripts/install_plugin_modules.js | 3 - scripts/outdated.js | 85 ++- 5 files changed, 775 insertions(+), 31 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index afca6007dfa..d2e50f5579e 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -109,8 +109,7 @@ jobs: amqp10: strategy: - matrix: - range: ['3.6.0'] + matrix: ${{fromJson(needs.versions.outputs.matrices).amqp10}} runs-on: ubuntu-latest services: qpid: diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index feb574fbd27..5f8d2d28e0d 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -1,7 +1,713 @@ { + "pinned": [ + "generic-pool", + "@playwright/test", + "redis" + ], + "matrices": { "couchbase": { - "node-version": [16], - "range": ["2.6.12 - 2.6.12", "3.0.7 - 3.2.7", "4.0.0 - 4.4.1" ], - "include": [{"node-version": 18, "range": "4.4.1 - 4.4.1"}] + "min-version": "2.4.2", + "node-version": [ + 16 + ], + "range": [ + "2.4.2 - 2.6.12", + "3.0.0 - 3.2.7", + "4.0.0 - 4.4.1" + ], + "include": [ + { + "node-version": 18 + }, + [ + "4.4.1", + "4.4.1" + ] + ] + }, + "aerospike": { + "min-version": "4.0.0", + "range": [ + "4.0.0 - 4.0.5", + "5.0.0 - 5.12.1" + ] + }, + "amqp10": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.6.0" + ] + }, + "amqplib": { + "min-version": "0.5.0", + "range": [ + "0.5.0 - 0.10.4" + ] + }, + "@apollo/gateway": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.54.1", + "2.0.0 - 2.9.1" + ] + }, + "@aws-sdk/smithy-client": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.374.0" + ] + }, + "aws-sdk": { + "min-version": "2.1.35", + "range": [ + "2.1.35 - 2.1691.0" + ] + }, + "bluebird": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.11.0", + "3.0.0 - 3.7.2" + ] + }, + "body-parser": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.20.3" + ] + }, + "bunyan": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.8.15" + ] + }, + "cassandra-driver": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.6.0", + "4.0.0 - 4.7.2" + ] + }, + "connect": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.30.2", + "3.0.0 - 3.7.0" + ] + }, + "cookie-parser": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.4.6" + ] + }, + "cookie": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.6.0" + ] + }, + "@cucumber/cucumber": { + "min-version": "7.0.0", + "range": [ + "7.0.0 - 7.3.2", + "8.0.0 - 8.11.1", + "9.0.0 - 9.6.0", + "10.0.0 - 10.9.0", + "11.0.0 - 11.0.1" + ] + }, + "cypress": { + "min-version": "0.0.1", + "range": [ + "0.0.1 - 0.20.3", + "1.0.0 - 1.4.2", + "2.0.0 - 2.1.0", + "3.0.0 - 3.8.3", + "4.0.0 - 4.12.1", + "5.0.0 - 5.6.0", + "6.0.0 - 6.9.1", + "7.0.0 - 7.7.0", + "8.0.0 - 8.7.0", + "9.0.0 - 9.7.0", + "10.0.0 - 10.11.0", + "11.0.0 - 11.2.0", + "12.0.0 - 12.17.4", + "13.0.0 - 13.14.2" + ] + }, + "@elastic/elasticsearch": { + "min-version": "5.6.16", + "range": [ + "5.6.16 - 5.6.22", + "6.7.0 - 6.8.8", + "7.0.0 - 7.17.14", + "8.0.0 - 8.14.1" + ] + }, + "elasticsearch": { + "min-version": "0.2.0", + "range": [ + "0.2.0 - 0.3.9", + "1.0.0 - 1.5.14", + "2.0.0 - 2.4.3", + "3.0.0 - 3.1.4", + "4.0.0 - 4.1.0", + "5.0.0 - 5.0.0", + "6.0.0 - 6.1.0", + "8.0.1 - 8.2.0", + "9.0.0 - 9.0.2", + "10.0.0 - 10.1.3", + "11.0.0 - 11.0.1", + "12.0.0 - 12.1.3", + "13.0.0 - 13.3.1", + "14.0.0 - 14.2.2", + "15.0.0 - 15.5.0", + "16.0.0 - 16.7.3" + ] + }, + "express-mongo-sanitize": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.3.2", + "2.0.0 - 2.2.0" + ] + }, + "express": { + "min-version": "4.0.0", + "range": [ + "4.0.0 - 4.21.0" + ] + }, + "fastify": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.14.6", + "2.0.0 - 2.15.3", + "3.0.0 - 3.29.5", + "4.0.0 - 4.28.1", + "5.0.0 - 5.0.0" + ] + }, + "find-my-way": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.18.1", + "2.0.0 - 2.2.5", + "3.0.0 - 3.0.5", + "4.0.0 - 4.5.1", + "5.0.0 - 5.6.0", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.2.2", + "9.0.0 - 9.0.1" + ] + }, + "generic-pool": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.5.4", + "3.0.0 - 3.9.0" + ] + }, + "@google-cloud/pubsub": { + "min-version": "1.2.0", + "range": [ + "1.2.0 - 1.7.3", + "2.0.0 - 2.19.4", + "3.0.0 - 3.7.5", + "4.0.0 - 4.7.2" + ] + }, + "@graphql-tools/executor": { + "min-version": "0.0.14", + "range": [ + "0.0.14 - 0.0.20", + "1.0.0 - 1.3.1" + ] + }, + "graphql": { + "min-version": "0.10.0", + "range": [ + "0.10.0 - 0.13.2", + "14.0.0 - 14.7.0", + "15.0.0 - 15.9.0", + "16.0.0 - 16.9.0" + ] + }, + "@grpc/grpc-js": { + "min-version": "1.0.3", + "range": [ + "1.0.3 - 1.11.3" + ] + }, + "@hapi/hapi": { + "min-version": "17.9.0", + "range": [ + "17.9.0 - 17.9.0", + "18.2.0 - 18.4.1", + "19.0.0 - 19.2.0", + "20.0.0 - 20.3.0", + "21.0.0 - 21.3.10" + ] + }, + "hapi": { + "min-version": "16.0.0", + "range": [ + "16.0.0 - 16.8.4", + "17.0.0 - 17.8.5", + "18.0.0 - 18.1.0" + ] + }, + "ioredis": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.5.0", + "3.0.0 - 3.2.2", + "4.0.0 - 4.28.5", + "5.0.0 - 5.4.1" + ] + }, + "jest-environment-node": { + "min-version": "24.8.0", + "range": [ + "24.8.0 - 24.9.0", + "25.0.0 - 25.5.0", + "26.0.0 - 26.6.2", + "27.0.0 - 27.5.1", + "28.0.0 - 28.1.3", + "29.0.0 - 29.7.0" + ] + }, + "kafkajs": { + "min-version": "1.4.0", + "range": [ + "1.4.0 - 1.16.0", + "2.0.0 - 2.2.4" + ] + }, + "knex": { + "min-version": "0.8.0", + "range": [ + "0.8.0 - 0.95.15", + "1.0.0 - 1.0.7", + "2.0.0 - 2.5.1", + "3.0.0 - 3.1.0" + ] + }, + "koa": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.15.3" + ] + }, + "@koa/router": { + "min-version": "8.0.0", + "range": [ + "8.0.0 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.2", + "13.0.0 - 13.1.0" + ] + }, + "koa-router": { + "min-version": "7.0.0", + "range": [ + "7.0.0 - 7.4.0", + "8.0.6 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.1", + "13.0.1 - 13.0.1" + ] + }, + "ldapjs": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.8.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.3.3", + "3.0.0 - 3.0.7" + ] + }, + "limitd-client": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.13.1", + "2.0.0 - 2.14.1" + ] + }, + "lodash": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.10.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.10.1", + "4.0.0 - 4.17.21" + ] + }, + "mariadb": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.3.2" + ] + }, + "memcached": { + "min-version": "2.2.0", + "range": [ + "2.2.0 - 2.2.2" + ] + }, + "microgateway-core": { + "min-version": "2.1.0", + "range": [ + "2.1.0 - 2.5.17", + "3.0.0 - 3.3.4" + ] + }, + "moleculer": { + "min-version": "0.14.0", + "range": [ + "0.14.0 - 0.14.34" + ] + }, + "mongodb-core": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.1.20", + "3.0.0 - 3.2.7" + ] + }, + "mongodb": { + "min-version": "3.3.0", + "range": [ + "3.3.0 - 3.7.4", + "4.0.0 - 4.17.2", + "5.0.0 - 5.9.2", + "6.0.0 - 6.9.0" + ] + }, + "mongoose": { + "min-version": "4.6.4", + "range": [ + "4.6.4 - 4.13.21", + "5.0.0 - 5.13.22", + "6.0.0 - 6.13.2", + "7.0.0 - 7.8.1", + "8.0.0 - 8.6.3" + ] + }, + "mquery": { + "min-version": "0.0.1", + "range": [ + "0.0.1 - 0.9.0", + "1.0.0 - 1.11.0", + "2.0.0 - 2.3.3", + "3.0.0 - 3.2.5", + "4.0.0 - 4.0.3", + "5.0.0 - 5.0.0" + ] + }, + "mysql": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.18.1" + ] + }, + "mysql2": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.6.6", + "2.0.0 - 2.3.3", + "3.0.0 - 3.11.3" + ] + }, + "next": { + "min-version": "9.5.0", + "range": [ + "9.5.0 - 9.5.5", + "10.0.0 - 10.2.3", + "11.0.0 - 11.1.4", + "12.0.0 - 12.3.4", + "13.0.0 - 13.5.7", + "14.0.0 - 14.2.13" + ] + }, + "openai": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.3.0", + "4.0.0 - 4.63.0" + ] + }, + "@opensearch-project/opensearch": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.2.0", + "2.0.0 - 2.12.0" + ] + }, + "oracledb": { + "min-version": "5.0.0", + "range": [ + "5.0.0 - 5.5.0", + "6.0.0 - 6.6.0" + ] + }, + "paperplane": { + "min-version": "2.3.0", + "range": [ + "2.3.0 - 2.3.2", + "3.0.0 - 3.1.2" + ] + }, + "passport-http": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.3.0" + ] + }, + "passport-local": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.1.6", + "1.0.0 - 1.0.0" + ] + }, + "pg": { + "min-version": "4.0.0", + "range": [ + "4.0.0 - 4.5.7", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.2", + "7.0.0 - 7.18.2", + "8.0.0 - 8.13.0" + ] + }, + "pino": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.16.0", + "3.0.0 - 3.4.0", + "4.0.0 - 4.17.6", + "5.0.0 - 5.17.0", + "6.0.0 - 6.14.0", + "7.0.0 - 7.11.0", + "8.0.0 - 8.21.0", + "9.0.0 - 9.4.0" + ] + }, + "pino-pretty": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.0.1", + "2.0.0 - 2.6.1", + "3.0.0 - 3.6.1", + "4.0.0 - 4.8.0", + "5.0.0 - 5.1.3", + "6.0.0 - 6.0.0", + "7.0.0 - 7.6.1", + "8.0.0 - 8.1.0", + "9.0.0 - 9.4.1", + "10.0.0 - 10.3.1", + "11.0.0 - 11.2.2" + ] + }, + "@playwright/test": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.1111.0", + "1.12.0 - 1.47.2" + ] + }, + "playwright": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.18.0", + "1.0.0 - 1.47.2" + ] + }, + "promise-js": { + "min-version": "0.0.3", + "range": [ + "0.0.3 - 0.0.7" + ] + }, + "promise": { + "min-version": "7.0.0", + "range": [ + "7.0.0 - 7.3.1", + "8.0.0 - 8.3.0" + ] + }, + "q": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.5.1" + ] + }, + "qs": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.6.6", + "1.0.0 - 1.2.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.1.0", + "4.0.0 - 4.0.0", + "5.0.0 - 5.2.1", + "6.0.0 - 6.13.0" + ] + }, + "@node-redis/client": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.0.6" + ] + }, + "@redis/client": { + "min-version": "1.1.0", + "range": [ + "1.1.0 - 1.6.0" + ] + }, + "redis": { + "min-version": "0.12.0", + "range": [ + "0.12.0 - 0.12.1", + "1.0.0 - 1.0.0", + "2.0.0 - 2.8.0", + "3.0.0 - 3.1.2", + "4.0.0 - 4.7.0" + ] + }, + "restify": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.0.3", + "4.0.0 - 4.3.4", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.6.1", + "9.0.0 - 9.1.0", + "10.0.0 - 10.0.0", + "11.0.0 - 11.1.0" + ] + }, + "rhea": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.0.24", + "2.0.0 - 2.0.8", + "3.0.0 - 3.0.3" + ] + }, + "router": { + "min-version": "0.2.1", + "range": [ + "0.2.1 - 0.6.2", + "1.0.0 - 1.3.8" + ] + }, + "selenium-webdriver": { + "min-version": "2.29.0", + "range": [ + "2.29.0 - 2.53.3", + "3.0.0 - 3.6.0", + "4.0.0 - 4.25.0" + ] + }, + "sequelize": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.4.3", + "1.0.0 - 1.7.11", + "2.0.0 - 2.1.3", + "3.0.0 - 3.35.1", + "4.0.0 - 4.44.4", + "5.1.0 - 5.22.5", + "6.1.0 - 6.37.3" + ] + }, + "sharedb": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.9.2", + "2.0.0 - 2.2.6", + "3.0.0 - 3.3.2", + "4.0.0 - 4.1.5", + "5.0.0 - 5.0.4" + ] + }, + "tedious": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.15.0", + "2.0.0 - 2.7.1", + "3.0.0 - 3.0.1", + "4.0.0 - 4.2.0", + "5.0.0 - 5.0.3", + "6.0.0 - 6.7.1", + "7.0.0 - 7.0.0", + "8.0.0 - 8.3.1", + "9.0.0 - 9.2.3", + "10.0.0 - 10.0.0", + "11.0.0 - 11.8.0", + "12.0.0 - 12.3.0", + "13.0.0 - 13.2.0", + "14.0.0 - 14.7.0", + "15.0.0 - 15.1.3", + "16.0.0 - 16.7.1", + "17.0.0 - 17.0.0", + "18.0.0 - 18.6.2" + ] + }, + "undici": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.5.0", + "1.0.0 - 1.3.1", + "2.0.0 - 2.2.1", + "3.0.0 - 3.3.6", + "4.0.0 - 4.16.0", + "5.0.0 - 5.28.4", + "6.0.0 - 6.19.8" + ] + }, + "vitest": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.34.6", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "@vitest/runner": { + "min-version": "0.28.0", + "range": [ + "0.28.0 - 0.34.7", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "when": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.7.8" + ] + }, + "winston": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.1.2", + "2.0.0 - 2.4.7", + "3.0.0 - 3.14.2" + ] } + } } \ No newline at end of file diff --git a/packages/dd-trace/test/setup/mocha.js b/packages/dd-trace/test/setup/mocha.js index db5544e1d41..d3520c3fe1c 100644 --- a/packages/dd-trace/test/setup/mocha.js +++ b/packages/dd-trace/test/setup/mocha.js @@ -204,8 +204,6 @@ function withVersions (plugin, modules, range, cb) { instrumentations .filter(instrumentation => instrumentation.name === moduleName) .forEach(instrumentation => { - console.log('rabe', process.env.PACKAGE_VERSION_RANGE) - console.log('rabe', process.env.PLUGINS) const versions = process.env.PACKAGE_VERSION_RANGE ? [process.env.PACKAGE_VERSION_RANGE] : instrumentation.versions @@ -223,7 +221,6 @@ function withVersions (plugin, modules, range, cb) { testVersions.set(max, { range: version, test: version }) }) }) - console.log('TEST VERSIONS', testVersions) Array.from(testVersions) .filter(v => !range || semver.satisfies(v[0], range)) diff --git a/scripts/install_plugin_modules.js b/scripts/install_plugin_modules.js index 1b72ceb00a8..682e2d3c5ad 100644 --- a/scripts/install_plugin_modules.js +++ b/scripts/install_plugin_modules.js @@ -145,10 +145,8 @@ async function assertPackage (name, version, dependency, external) { } async function addDependencies (dependencies, name, versionRange) { - console.log('VERSION RANGE', versionRange) const versionList = await getVersionList(name) const version = semver.maxSatisfying(versionList, versionRange) - // console.log('VERSION', version) const pkgJson = await npmView(`${name}@${version}`) for (const dep of deps[name]) { for (const section of ['devDependencies', 'peerDependencies']) { @@ -166,7 +164,6 @@ async function getVersionList (name) { } const list = await npmView(`${name} versions`) versionLists[name] = list - console.log('LIST', list[309]) return list } diff --git a/scripts/outdated.js b/scripts/outdated.js index 007223c9e32..d4f5098512e 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -17,17 +17,23 @@ const latestsPath = path.join( 'latests.json' ) -const yamlPath = path.join( +const matricesPath = path.join( __dirname, '..', - '.github', - 'workflows', - 'plugins.yml' + 'packages', + 'datadog-instrumentations', + 'src', + 'helpers', + 'matrices.json' ) + const latestsJson = require(latestsPath) const internalsNames = Array.from(new Set(getInternals().map(n => n.name))) .filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) +const matricesJson = require(matricesPath) +const pluginsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matricesPath, 'utf-8')).matrices) + // TODO A lot of this can be optimized by using `npm outdated`. function makeAPR (branchName) { @@ -36,33 +42,72 @@ function makeAPR (branchName) { execSync(`gh pr create --title ${title} --body ${body} --base master --head ${branchName} `) } -function updatePluginsYaml () { - const plugins = yaml.load(fs.readFileSync(yamlPath, 'utf-8')) - const jobs = plugins.jobs +function maxVersion (range) { + if (typeof range === 'string') { + return range + } + return range.pop() +} + +function minVersion (range) { + if (typeof range === 'string') { + return range + } + return range.shift() +} + +function splitting (element) { + return +element.split('.')[0] +} + +async function ranges (name, minimum) { + const distTags = await npmView(`${name} dist-tags`) + const latestVersion = splitting(distTags?.latest) + + const splitMin = splitting(minimum) + + const ranges = [] + let versionRange + let maxRange + let minRange + + for (let major = splitMin; major <= latestVersion; major++) { + try { + versionRange = await npmView(`${name}@${major} version`) + maxRange = maxVersion(versionRange) + minRange = minVersion(versionRange) - for (const job in jobs) { - if (jobs[job]?.strategy?.matrix?.range) { console.log('found range', job, jobs[job]?.strategy?.matrix?.range) } + if (major === splitMin) { + ranges.push(`${minimum} - ${maxRange}`) + } else if (versionRange !== undefined) { + ranges.push(`${minRange} - ${maxRange}`) + } + } catch (e) { + console.log(`No version range found for "${name}" at version ${major}`) + } } + return ranges } async function fix () { - updatePluginsYaml() - const latests = {} - for (const name of internalsNames) { - const distTags = await npmView(name + ' dist-tags') - const latest = distTags.latest - latests[name] = latest + let latests + + for (const name of pluginsNames) { + latests = matricesJson.matrices[name] + const minVersion = latests['min-version'] + const versions = await ranges(name, minVersion) + + latests.range = versions } - latestsJson.latests = latests - fs.writeFileSync(latestsPath, JSON.stringify(latestsJson, null, 2)) + fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) const result = execSync('git status').toString() - if (result.includes(latestsPath)) { - const branchName = 'fix_outdated_integrations' + if (result.includes(matricesPath)) { + const branchName = 'update_outdated_integrations' try { execSync(`git checkout -b ${branchName}`) - execSync(`git add ${latestsPath}`) + execSync(`git add ${matricesPath}`) execSync('git commit -m "fix: update integr latests.json"') execSync(`git push origin ${branchName}`) From 6adc860a5faf852196c1ea474e6e21526bba72c3 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:15:45 -0400 Subject: [PATCH 27/80] reworking ci --- .github/workflows/plugins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index d2e50f5579e..f0f7c751739 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -109,7 +109,7 @@ jobs: amqp10: strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).amqp10}} + matrix: ${{fromJson(needs.versions.outputs).amqp10}} runs-on: ubuntu-latest services: qpid: @@ -275,7 +275,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase}} + matrix: ${{fromJson(needs.versions.outputs).couchbase}} runs-on: ubuntu-latest services: couchbase: From 4aaeb529073a03751b9583b0a106ffca6c36550d Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:20:16 -0400 Subject: [PATCH 28/80] reworking ci --- .github/workflows/plugins.yml | 2 +- packages/datadog-instrumentations/src/helpers/matrices.json | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index f0f7c751739..58042aad6a7 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -109,7 +109,7 @@ jobs: amqp10: strategy: - matrix: ${{fromJson(needs.versions.outputs).amqp10}} + matrix: ${{fromJson(needs.versions.outputs.matrices).amqp10}} runs-on: ubuntu-latest services: qpid: diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 5f8d2d28e0d..a084afae55f 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -1,9 +1,4 @@ { - "pinned": [ - "generic-pool", - "@playwright/test", - "redis" - ], "matrices": { "couchbase": { "min-version": "2.4.2", From 2c6c42a6b1bbcafdfaee529c5c114a146a37e6e3 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:28:30 -0400 Subject: [PATCH 29/80] reworking ci --- .github/workflows/plugins.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 58042aad6a7..ce4b1cb2510 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -25,6 +25,7 @@ jobs: content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') echo "matrices=$content" >> $GITHUB_OUTPUT echo $content + echo $matrices aerospike-node-16: runs-on: ubuntu-latest @@ -126,6 +127,8 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/plugins/test-and-upstream + - run: | + echo $strategy.matrix amqplib: strategy: From 19ee36edb574305304e8b09faf11207def5ad7e9 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:31:29 -0400 Subject: [PATCH 30/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index ce4b1cb2510..94ff5b2f9f3 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -25,7 +25,7 @@ jobs: content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') echo "matrices=$content" >> $GITHUB_OUTPUT echo $content - echo $matrices + echo $outputs.matrices aerospike-node-16: runs-on: ubuntu-latest From 062e8fe96f89bc23a329a139a88c74dd5df7d1bb Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:42:28 -0400 Subject: [PATCH 31/80] reworking ci --- .github/workflows/plugins.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 94ff5b2f9f3..a5fa9685f73 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -25,7 +25,7 @@ jobs: content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') echo "matrices=$content" >> $GITHUB_OUTPUT echo $content - echo $outputs.matrices + echo $outputs aerospike-node-16: runs-on: ubuntu-latest @@ -278,7 +278,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs).couchbase}} + matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase}} runs-on: ubuntu-latest services: couchbase: From ce6faa3832e5f1f40385bc46841e19b07cf04aa9 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:47:42 -0400 Subject: [PATCH 32/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index a5fa9685f73..9c1893144ac 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -278,7 +278,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase}} + matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase.range}} runs-on: ubuntu-latest services: couchbase: From dae192b09b7296ee8d355c6759aef7acd1c57e10 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:50:43 -0400 Subject: [PATCH 33/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 9c1893144ac..dd0099098af 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -110,7 +110,7 @@ jobs: amqp10: strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).amqp10}} + matrix: ${{fromJson(needs.versions.outputs.matrices).amqp10.range}} runs-on: ubuntu-latest services: qpid: From d07fd875fe0c110dff9990a84bbbd0739b923d66 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:57:40 -0400 Subject: [PATCH 34/80] reworking ci --- .../src/helpers/matrices.json | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index a084afae55f..b940e44b9d4 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -1,24 +1,9 @@ { "matrices": { "couchbase": { - "min-version": "2.4.2", - "node-version": [ - 16 - ], - "range": [ - "2.4.2 - 2.6.12", - "3.0.0 - 3.2.7", - "4.0.0 - 4.4.1" - ], - "include": [ - { - "node-version": 18 - }, - [ - "4.4.1", - "4.4.1" - ] - ] + "node-version": [16], + "range": ["2.4.2 - 2.6.12", "3.0.0 - 3.2.7", "4.0.0 - 4.4.1"], + "include": [{"node-version": 18}, ["4.4.1 - 4.4.1"]] }, "aerospike": { "min-version": "4.0.0", From 6307f87bd4f318b0e466f3c3715acc6fdb786f81 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Mon, 23 Sep 2024 18:59:46 -0400 Subject: [PATCH 35/80] reworking ci --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index dd0099098af..9e214f8baf7 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -278,7 +278,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase.range}} + matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase}} runs-on: ubuntu-latest services: couchbase: From e54a2b671577c5e3fcd28b25b71aa47af239852f Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 24 Sep 2024 10:08:21 -0400 Subject: [PATCH 36/80] reworking ci --- .github/workflows/plugins.yml | 2 +- packages/datadog-instrumentations/src/helpers/matrices.json | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 9e214f8baf7..a40fd8447cf 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -25,7 +25,7 @@ jobs: content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') echo "matrices=$content" >> $GITHUB_OUTPUT echo $content - echo $outputs + echo $matrices aerospike-node-16: runs-on: ubuntu-latest diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index b940e44b9d4..cac200a0208 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -13,10 +13,7 @@ ] }, "amqp10": { - "min-version": "3.0.0", - "range": [ - "3.0.0 - 3.6.0" - ] + "range": [ "3.0.0 - 3.6.0" ] }, "amqplib": { "min-version": "0.5.0", From 3ed826106660874d94db9d4b4e2947ab4a65a105 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 24 Sep 2024 10:18:46 -0400 Subject: [PATCH 37/80] reworking ci --- .github/workflows/plugins.yml | 1 + packages/datadog-instrumentations/src/helpers/matrices.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index a40fd8447cf..c0448eb926c 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -124,6 +124,7 @@ jobs: PLUGINS: amqp10 SERVICES: qpid DD_DATA_STREAMS_ENABLED: true + PACKAGE_VERSION_RANGE: ${{ matrix.range }} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/plugins/test-and-upstream diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index cac200a0208..5c1082a247e 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -3,7 +3,7 @@ "couchbase": { "node-version": [16], "range": ["2.4.2 - 2.6.12", "3.0.0 - 3.2.7", "4.0.0 - 4.4.1"], - "include": [{"node-version": 18}, ["4.4.1 - 4.4.1"]] + "include": [{"node-version": 18, "range":"4.4.1 - 4.4.1"}] }, "aerospike": { "min-version": "4.0.0", From 738dd5c3ae32985859d4b6c1a695c572076c52cf Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 24 Sep 2024 10:27:52 -0400 Subject: [PATCH 38/80] reworking ci --- .github/workflows/plugins.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index c0448eb926c..a40fd8447cf 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -124,7 +124,6 @@ jobs: PLUGINS: amqp10 SERVICES: qpid DD_DATA_STREAMS_ENABLED: true - PACKAGE_VERSION_RANGE: ${{ matrix.range }} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/plugins/test-and-upstream From 7d6cca6f73cc7dc72a39f5768ac1293f3c94c0fa Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 24 Sep 2024 10:35:45 -0400 Subject: [PATCH 39/80] reworking ci --- .github/workflows/plugins.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index a40fd8447cf..67f08b60fa1 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -25,7 +25,6 @@ jobs: content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') echo "matrices=$content" >> $GITHUB_OUTPUT echo $content - echo $matrices aerospike-node-16: runs-on: ubuntu-latest @@ -278,7 +277,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).couchbase}} + matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.couchbase}} runs-on: ubuntu-latest services: couchbase: From 3ec75cd4716d2be0d89e4e8c2729db438c46158d Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 24 Sep 2024 18:01:23 -0400 Subject: [PATCH 40/80] adding script to create matrix --- .github/workflows/plugins.yml | 19 +- .../src/helpers/matrices.json | 105 +-- .../src/helpers/versions.json | 701 ++++++++++++++++++ scripts/create_matrix.js | 83 +++ scripts/outdated.js | 118 ++- 5 files changed, 897 insertions(+), 129 deletions(-) create mode 100644 packages/datadog-instrumentations/src/helpers/versions.json create mode 100644 scripts/create_matrix.js diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 67f08b60fa1..eaab543ea7f 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -107,9 +107,11 @@ jobs: uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 - amqp10: + amqp10: # TODO: move rhea to its own job + needs: + - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).amqp10.range}} + matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.amqp10}} runs-on: ubuntu-latest services: qpid: @@ -123,6 +125,7 @@ jobs: PLUGINS: amqp10 SERVICES: qpid DD_DATA_STREAMS_ENABLED: true + PACKAGE_VERSION_RANGE: ${{ matrix.range }} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/plugins/test-and-upstream @@ -130,9 +133,10 @@ jobs: echo $strategy.matrix amqplib: + needs: + - versions strategy: - matrix: - range: ['0.10.4' ] + matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.amqplib}} runs-on: ubuntu-latest services: rabbitmq: @@ -142,17 +146,20 @@ jobs: env: PLUGINS: amqplib SERVICES: rabbitmq + PACKAGE_VERSION_RANGE: ${{ matrix.range }} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/plugins/test-and-upstream apollo: + needs: + - versions strategy: - matrix: - range: ['2.9.0'] + matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.apollo}} runs-on: ubuntu-latest env: PLUGINS: apollo + PACKAGE_VERSION_RANGE: ${{ matrix.range }} steps: - uses: actions/checkout@v4 - uses: ./.github/actions/plugins/test-and-upstream diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 5c1082a247e..c0b12098fe0 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -1,92 +1,96 @@ { "matrices": { "couchbase": { - "node-version": [16], - "range": ["2.4.2 - 2.6.12", "3.0.0 - 3.2.7", "4.0.0 - 4.4.1"], - "include": [{"node-version": 18, "range":"4.4.1 - 4.4.1"}] + "node-version": [ + "16" + ], + "range": [ + "2.4.2 - 2.6.12", + "3.0.7 - 3.2.7", + "4.0.0 - 4.4.2" + ], + "include": [ + { + "node-version": [ + "18" + ], + "range": [ + "4.4.1 - 4.4.2" + ] + } + ] }, "aerospike": { - "min-version": "4.0.0", "range": [ "4.0.0 - 4.0.5", "5.0.0 - 5.12.1" ] }, "amqp10": { - "range": [ "3.0.0 - 3.6.0" ] + "range": [ + "3.0.0 - 3.6.0" + ] }, "amqplib": { - "min-version": "0.5.0", "range": [ "0.5.0 - 0.10.4" ] }, "@apollo/gateway": { - "min-version": "0.1.0", "range": [ "0.1.0 - 0.54.1", "2.0.0 - 2.9.1" ] }, "@aws-sdk/smithy-client": { - "min-version": "3.0.0", "range": [ "3.0.0 - 3.374.0" ] }, "aws-sdk": { - "min-version": "2.1.35", "range": [ "2.1.35 - 2.1691.0" ] }, "bluebird": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.11.0", "3.0.0 - 3.7.2" ] }, "body-parser": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.20.3" ] }, "bunyan": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.8.15" ] }, "cassandra-driver": { - "min-version": "3.0.0", "range": [ "3.0.0 - 3.6.0", "4.0.0 - 4.7.2" ] }, "connect": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.30.2", "3.0.0 - 3.7.0" ] }, "cookie-parser": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.4.6" ] }, "cookie": { - "min-version": "0.0.0", "range": [ "0.0.0 - 0.6.0" ] }, "@cucumber/cucumber": { - "min-version": "7.0.0", "range": [ "7.0.0 - 7.3.2", "8.0.0 - 8.11.1", @@ -96,7 +100,6 @@ ] }, "cypress": { - "min-version": "0.0.1", "range": [ "0.0.1 - 0.20.3", "1.0.0 - 1.4.2", @@ -115,7 +118,6 @@ ] }, "@elastic/elasticsearch": { - "min-version": "5.6.16", "range": [ "5.6.16 - 5.6.22", "6.7.0 - 6.8.8", @@ -124,7 +126,6 @@ ] }, "elasticsearch": { - "min-version": "0.2.0", "range": [ "0.2.0 - 0.3.9", "1.0.0 - 1.5.14", @@ -145,20 +146,17 @@ ] }, "express-mongo-sanitize": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.3.2", "2.0.0 - 2.2.0" ] }, "express": { - "min-version": "4.0.0", "range": [ "4.0.0 - 4.21.0" ] }, "fastify": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.14.6", "2.0.0 - 2.15.3", @@ -168,7 +166,6 @@ ] }, "find-my-way": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.18.1", "2.0.0 - 2.2.5", @@ -182,14 +179,12 @@ ] }, "generic-pool": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.5.4", "3.0.0 - 3.9.0" ] }, "@google-cloud/pubsub": { - "min-version": "1.2.0", "range": [ "1.2.0 - 1.7.3", "2.0.0 - 2.19.4", @@ -198,14 +193,12 @@ ] }, "@graphql-tools/executor": { - "min-version": "0.0.14", "range": [ "0.0.14 - 0.0.20", "1.0.0 - 1.3.1" ] }, "graphql": { - "min-version": "0.10.0", "range": [ "0.10.0 - 0.13.2", "14.0.0 - 14.7.0", @@ -214,13 +207,11 @@ ] }, "@grpc/grpc-js": { - "min-version": "1.0.3", "range": [ "1.0.3 - 1.11.3" ] }, "@hapi/hapi": { - "min-version": "17.9.0", "range": [ "17.9.0 - 17.9.0", "18.2.0 - 18.4.1", @@ -230,7 +221,6 @@ ] }, "hapi": { - "min-version": "16.0.0", "range": [ "16.0.0 - 16.8.4", "17.0.0 - 17.8.5", @@ -238,7 +228,6 @@ ] }, "ioredis": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.5.0", "3.0.0 - 3.2.2", @@ -247,7 +236,6 @@ ] }, "jest-environment-node": { - "min-version": "24.8.0", "range": [ "24.8.0 - 24.9.0", "25.0.0 - 25.5.0", @@ -258,14 +246,12 @@ ] }, "kafkajs": { - "min-version": "1.4.0", "range": [ "1.4.0 - 1.16.0", "2.0.0 - 2.2.4" ] }, "knex": { - "min-version": "0.8.0", "range": [ "0.8.0 - 0.95.15", "1.0.0 - 1.0.7", @@ -274,13 +260,11 @@ ] }, "koa": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.15.3" ] }, "@koa/router": { - "min-version": "8.0.0", "range": [ "8.0.0 - 8.0.8", "9.0.1 - 9.4.0", @@ -291,7 +275,6 @@ ] }, "koa-router": { - "min-version": "7.0.0", "range": [ "7.0.0 - 7.4.0", "8.0.6 - 8.0.8", @@ -303,7 +286,6 @@ ] }, "ldapjs": { - "min-version": "0.1.0", "range": [ "0.1.0 - 0.8.0", "1.0.0 - 1.0.2", @@ -312,14 +294,12 @@ ] }, "limitd-client": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.13.1", "2.0.0 - 2.14.1" ] }, "lodash": { - "min-version": "0.1.0", "range": [ "0.1.0 - 0.10.0", "1.0.0 - 1.0.2", @@ -329,39 +309,33 @@ ] }, "mariadb": { - "min-version": "3.0.0", "range": [ "3.0.0 - 3.3.2" ] }, "memcached": { - "min-version": "2.2.0", "range": [ "2.2.0 - 2.2.2" ] }, "microgateway-core": { - "min-version": "2.1.0", "range": [ "2.1.0 - 2.5.17", "3.0.0 - 3.3.4" ] }, "moleculer": { - "min-version": "0.14.0", "range": [ "0.14.0 - 0.14.34" ] }, "mongodb-core": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.1.20", "3.0.0 - 3.2.7" ] }, "mongodb": { - "min-version": "3.3.0", "range": [ "3.3.0 - 3.7.4", "4.0.0 - 4.17.2", @@ -370,17 +344,15 @@ ] }, "mongoose": { - "min-version": "4.6.4", "range": [ "4.6.4 - 4.13.21", "5.0.0 - 5.13.22", - "6.0.0 - 6.13.2", + "6.0.0 - 6.13.3", "7.0.0 - 7.8.1", "8.0.0 - 8.6.3" ] }, "mquery": { - "min-version": "0.0.1", "range": [ "0.0.1 - 0.9.0", "1.0.0 - 1.11.0", @@ -391,13 +363,11 @@ ] }, "mysql": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.18.1" ] }, "mysql2": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.6.6", "2.0.0 - 2.3.3", @@ -405,7 +375,6 @@ ] }, "next": { - "min-version": "9.5.0", "range": [ "9.5.0 - 9.5.5", "10.0.0 - 10.2.3", @@ -416,48 +385,41 @@ ] }, "openai": { - "min-version": "3.0.0", "range": [ "3.0.0 - 3.3.0", "4.0.0 - 4.63.0" ] }, "@opensearch-project/opensearch": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.2.0", "2.0.0 - 2.12.0" ] }, "oracledb": { - "min-version": "5.0.0", "range": [ "5.0.0 - 5.5.0", "6.0.0 - 6.6.0" ] }, "paperplane": { - "min-version": "2.3.0", "range": [ "2.3.0 - 2.3.2", "3.0.0 - 3.1.2" ] }, "passport-http": { - "min-version": "0.1.0", "range": [ "0.1.0 - 0.3.0" ] }, "passport-local": { - "min-version": "0.1.0", "range": [ "0.1.0 - 0.1.6", "1.0.0 - 1.0.0" ] }, "pg": { - "min-version": "4.0.0", "range": [ "4.0.0 - 4.5.7", "5.0.0 - 5.2.1", @@ -467,7 +429,6 @@ ] }, "pino": { - "min-version": "2.0.0", "range": [ "2.0.0 - 2.16.0", "3.0.0 - 3.4.0", @@ -480,7 +441,6 @@ ] }, "pino-pretty": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.0.1", "2.0.0 - 2.6.1", @@ -496,40 +456,34 @@ ] }, "@playwright/test": { - "min-version": "0.0.0", "range": [ "0.0.0 - 0.1111.0", "1.12.0 - 1.47.2" ] }, "playwright": { - "min-version": "0.0.0", "range": [ "0.0.0 - 0.18.0", "1.0.0 - 1.47.2" ] }, "promise-js": { - "min-version": "0.0.3", "range": [ "0.0.3 - 0.0.7" ] }, "promise": { - "min-version": "7.0.0", "range": [ "7.0.0 - 7.3.1", "8.0.0 - 8.3.0" ] }, "q": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.5.1" ] }, "qs": { - "min-version": "0.0.0", "range": [ "0.0.0 - 0.6.6", "1.0.0 - 1.2.2", @@ -541,19 +495,16 @@ ] }, "@node-redis/client": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.0.6" ] }, "@redis/client": { - "min-version": "1.1.0", "range": [ "1.1.0 - 1.6.0" ] }, "redis": { - "min-version": "0.12.0", "range": [ "0.12.0 - 0.12.1", "1.0.0 - 1.0.0", @@ -563,7 +514,6 @@ ] }, "restify": { - "min-version": "3.0.0", "range": [ "3.0.0 - 3.0.3", "4.0.0 - 4.3.4", @@ -577,7 +527,6 @@ ] }, "rhea": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.0.24", "2.0.0 - 2.0.8", @@ -585,14 +534,12 @@ ] }, "router": { - "min-version": "0.2.1", "range": [ "0.2.1 - 0.6.2", "1.0.0 - 1.3.8" ] }, "selenium-webdriver": { - "min-version": "2.29.0", "range": [ "2.29.0 - 2.53.3", "3.0.0 - 3.6.0", @@ -600,7 +547,6 @@ ] }, "sequelize": { - "min-version": "0.0.0", "range": [ "0.0.0 - 0.4.3", "1.0.0 - 1.7.11", @@ -612,7 +558,6 @@ ] }, "sharedb": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.9.2", "2.0.0 - 2.2.6", @@ -622,7 +567,6 @@ ] }, "tedious": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.15.0", "2.0.0 - 2.7.1", @@ -645,7 +589,6 @@ ] }, "undici": { - "min-version": "0.1.0", "range": [ "0.1.0 - 0.5.0", "1.0.0 - 1.3.1", @@ -657,7 +600,6 @@ ] }, "vitest": { - "min-version": "0.0.0", "range": [ "0.0.0 - 0.34.6", "1.0.0 - 1.6.0", @@ -665,7 +607,6 @@ ] }, "@vitest/runner": { - "min-version": "0.28.0", "range": [ "0.28.0 - 0.34.7", "1.0.0 - 1.6.0", @@ -673,13 +614,11 @@ ] }, "when": { - "min-version": "3.0.0", "range": [ "3.0.0 - 3.7.8" ] }, "winston": { - "min-version": "1.0.0", "range": [ "1.0.0 - 1.1.2", "2.0.0 - 2.4.7", diff --git a/packages/datadog-instrumentations/src/helpers/versions.json b/packages/datadog-instrumentations/src/helpers/versions.json new file mode 100644 index 00000000000..552e4814db7 --- /dev/null +++ b/packages/datadog-instrumentations/src/helpers/versions.json @@ -0,0 +1,701 @@ +{ + "matrices": { + "couchbase": { + "min-version": "2.4.2", + "by-node-version": true, + "node-versions": { + "16": [ + "2.4.2 - 2.6.12", + "3.0.7 - 3.2.7", + "4.0.0 - 4.4.2" + ], + "18": [ + "4.4.1 - 4.4.2" + ] + } + }, + "aerospike": { + "min-version": "4.0.0", + "range": [ + "4.0.0 - 4.0.5", + "5.0.0 - 5.12.1" + ] + }, + "amqp10": { + "range": [ + "3.0.0 - 3.6.0" + ] + }, + "amqplib": { + "min-version": "0.5.0", + "range": [ + "0.5.0 - 0.10.4" + ] + }, + "@apollo/gateway": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.54.1", + "2.0.0 - 2.9.1" + ] + }, + "@aws-sdk/smithy-client": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.374.0" + ] + }, + "aws-sdk": { + "min-version": "2.1.35", + "range": [ + "2.1.35 - 2.1691.0" + ] + }, + "bluebird": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.11.0", + "3.0.0 - 3.7.2" + ] + }, + "body-parser": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.20.3" + ] + }, + "bunyan": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.8.15" + ] + }, + "cassandra-driver": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.6.0", + "4.0.0 - 4.7.2" + ] + }, + "connect": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.30.2", + "3.0.0 - 3.7.0" + ] + }, + "cookie-parser": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.4.6" + ] + }, + "cookie": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.6.0" + ] + }, + "@cucumber/cucumber": { + "min-version": "7.0.0", + "range": [ + "7.0.0 - 7.3.2", + "8.0.0 - 8.11.1", + "9.0.0 - 9.6.0", + "10.0.0 - 10.9.0", + "11.0.0 - 11.0.1" + ] + }, + "cypress": { + "min-version": "0.0.1", + "range": [ + "0.0.1 - 0.20.3", + "1.0.0 - 1.4.2", + "2.0.0 - 2.1.0", + "3.0.0 - 3.8.3", + "4.0.0 - 4.12.1", + "5.0.0 - 5.6.0", + "6.0.0 - 6.9.1", + "7.0.0 - 7.7.0", + "8.0.0 - 8.7.0", + "9.0.0 - 9.7.0", + "10.0.0 - 10.11.0", + "11.0.0 - 11.2.0", + "12.0.0 - 12.17.4", + "13.0.0 - 13.14.2" + ] + }, + "@elastic/elasticsearch": { + "min-version": "5.6.16", + "range": [ + "5.6.16 - 5.6.22", + "6.7.0 - 6.8.8", + "7.0.0 - 7.17.14", + "8.0.0 - 8.14.1" + ] + }, + "elasticsearch": { + "min-version": "0.2.0", + "range": [ + "0.2.0 - 0.3.9", + "1.0.0 - 1.5.14", + "2.0.0 - 2.4.3", + "3.0.0 - 3.1.4", + "4.0.0 - 4.1.0", + "5.0.0 - 5.0.0", + "6.0.0 - 6.1.0", + "8.0.1 - 8.2.0", + "9.0.0 - 9.0.2", + "10.0.0 - 10.1.3", + "11.0.0 - 11.0.1", + "12.0.0 - 12.1.3", + "13.0.0 - 13.3.1", + "14.0.0 - 14.2.2", + "15.0.0 - 15.5.0", + "16.0.0 - 16.7.3" + ] + }, + "express-mongo-sanitize": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.3.2", + "2.0.0 - 2.2.0" + ] + }, + "express": { + "min-version": "4.0.0", + "range": [ + "4.0.0 - 4.21.0" + ] + }, + "fastify": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.14.6", + "2.0.0 - 2.15.3", + "3.0.0 - 3.29.5", + "4.0.0 - 4.28.1", + "5.0.0 - 5.0.0" + ] + }, + "find-my-way": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.18.1", + "2.0.0 - 2.2.5", + "3.0.0 - 3.0.5", + "4.0.0 - 4.5.1", + "5.0.0 - 5.6.0", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.2.2", + "9.0.0 - 9.0.1" + ] + }, + "generic-pool": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.5.4", + "3.0.0 - 3.9.0" + ] + }, + "@google-cloud/pubsub": { + "min-version": "1.2.0", + "range": [ + "1.2.0 - 1.7.3", + "2.0.0 - 2.19.4", + "3.0.0 - 3.7.5", + "4.0.0 - 4.7.2" + ] + }, + "@graphql-tools/executor": { + "min-version": "0.0.14", + "range": [ + "0.0.14 - 0.0.20", + "1.0.0 - 1.3.1" + ] + }, + "graphql": { + "min-version": "0.10.0", + "range": [ + "0.10.0 - 0.13.2", + "14.0.0 - 14.7.0", + "15.0.0 - 15.9.0", + "16.0.0 - 16.9.0" + ] + }, + "@grpc/grpc-js": { + "min-version": "1.0.3", + "range": [ + "1.0.3 - 1.11.3" + ] + }, + "@hapi/hapi": { + "min-version": "17.9.0", + "range": [ + "17.9.0 - 17.9.0", + "18.2.0 - 18.4.1", + "19.0.0 - 19.2.0", + "20.0.0 - 20.3.0", + "21.0.0 - 21.3.10" + ] + }, + "hapi": { + "min-version": "16.0.0", + "range": [ + "16.0.0 - 16.8.4", + "17.0.0 - 17.8.5", + "18.0.0 - 18.1.0" + ] + }, + "ioredis": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.5.0", + "3.0.0 - 3.2.2", + "4.0.0 - 4.28.5", + "5.0.0 - 5.4.1" + ] + }, + "jest-environment-node": { + "min-version": "24.8.0", + "range": [ + "24.8.0 - 24.9.0", + "25.0.0 - 25.5.0", + "26.0.0 - 26.6.2", + "27.0.0 - 27.5.1", + "28.0.0 - 28.1.3", + "29.0.0 - 29.7.0" + ] + }, + "kafkajs": { + "min-version": "1.4.0", + "range": [ + "1.4.0 - 1.16.0", + "2.0.0 - 2.2.4" + ] + }, + "knex": { + "min-version": "0.8.0", + "range": [ + "0.8.0 - 0.95.15", + "1.0.0 - 1.0.7", + "2.0.0 - 2.5.1", + "3.0.0 - 3.1.0" + ] + }, + "koa": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.15.3" + ] + }, + "@koa/router": { + "min-version": "8.0.0", + "range": [ + "8.0.0 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.2", + "13.0.0 - 13.1.0" + ] + }, + "koa-router": { + "min-version": "7.0.0", + "range": [ + "7.0.0 - 7.4.0", + "8.0.6 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.1", + "13.0.1 - 13.0.1" + ] + }, + "ldapjs": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.8.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.3.3", + "3.0.0 - 3.0.7" + ] + }, + "limitd-client": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.13.1", + "2.0.0 - 2.14.1" + ] + }, + "lodash": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.10.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.10.1", + "4.0.0 - 4.17.21" + ] + }, + "mariadb": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.3.2" + ] + }, + "memcached": { + "min-version": "2.2.0", + "range": [ + "2.2.0 - 2.2.2" + ] + }, + "microgateway-core": { + "min-version": "2.1.0", + "range": [ + "2.1.0 - 2.5.17", + "3.0.0 - 3.3.4" + ] + }, + "moleculer": { + "min-version": "0.14.0", + "range": [ + "0.14.0 - 0.14.34" + ] + }, + "mongodb-core": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.1.20", + "3.0.0 - 3.2.7" + ] + }, + "mongodb": { + "min-version": "3.3.0", + "range": [ + "3.3.0 - 3.7.4", + "4.0.0 - 4.17.2", + "5.0.0 - 5.9.2", + "6.0.0 - 6.9.0" + ] + }, + "mongoose": { + "min-version": "4.6.4", + "range": [ + "4.6.4 - 4.13.21", + "5.0.0 - 5.13.22", + "6.0.0 - 6.13.3", + "7.0.0 - 7.8.1", + "8.0.0 - 8.6.3" + ] + }, + "mquery": { + "min-version": "0.0.1", + "range": [ + "0.0.1 - 0.9.0", + "1.0.0 - 1.11.0", + "2.0.0 - 2.3.3", + "3.0.0 - 3.2.5", + "4.0.0 - 4.0.3", + "5.0.0 - 5.0.0" + ] + }, + "mysql": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.18.1" + ] + }, + "mysql2": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.6.6", + "2.0.0 - 2.3.3", + "3.0.0 - 3.11.3" + ] + }, + "next": { + "min-version": "9.5.0", + "range": [ + "9.5.0 - 9.5.5", + "10.0.0 - 10.2.3", + "11.0.0 - 11.1.4", + "12.0.0 - 12.3.4", + "13.0.0 - 13.5.7", + "14.0.0 - 14.2.13" + ] + }, + "openai": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.3.0", + "4.0.0 - 4.63.0" + ] + }, + "@opensearch-project/opensearch": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.2.0", + "2.0.0 - 2.12.0" + ] + }, + "oracledb": { + "min-version": "5.0.0", + "range": [ + "5.0.0 - 5.5.0", + "6.0.0 - 6.6.0" + ] + }, + "paperplane": { + "min-version": "2.3.0", + "range": [ + "2.3.0 - 2.3.2", + "3.0.0 - 3.1.2" + ] + }, + "passport-http": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.3.0" + ] + }, + "passport-local": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.1.6", + "1.0.0 - 1.0.0" + ] + }, + "pg": { + "min-version": "4.0.0", + "range": [ + "4.0.0 - 4.5.7", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.2", + "7.0.0 - 7.18.2", + "8.0.0 - 8.13.0" + ] + }, + "pino": { + "min-version": "2.0.0", + "range": [ + "2.0.0 - 2.16.0", + "3.0.0 - 3.4.0", + "4.0.0 - 4.17.6", + "5.0.0 - 5.17.0", + "6.0.0 - 6.14.0", + "7.0.0 - 7.11.0", + "8.0.0 - 8.21.0", + "9.0.0 - 9.4.0" + ] + }, + "pino-pretty": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.0.1", + "2.0.0 - 2.6.1", + "3.0.0 - 3.6.1", + "4.0.0 - 4.8.0", + "5.0.0 - 5.1.3", + "6.0.0 - 6.0.0", + "7.0.0 - 7.6.1", + "8.0.0 - 8.1.0", + "9.0.0 - 9.4.1", + "10.0.0 - 10.3.1", + "11.0.0 - 11.2.2" + ] + }, + "@playwright/test": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.1111.0", + "1.12.0 - 1.47.2" + ] + }, + "playwright": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.18.0", + "1.0.0 - 1.47.2" + ] + }, + "promise-js": { + "min-version": "0.0.3", + "range": [ + "0.0.3 - 0.0.7" + ] + }, + "promise": { + "min-version": "7.0.0", + "range": [ + "7.0.0 - 7.3.1", + "8.0.0 - 8.3.0" + ] + }, + "q": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.5.1" + ] + }, + "qs": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.6.6", + "1.0.0 - 1.2.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.1.0", + "4.0.0 - 4.0.0", + "5.0.0 - 5.2.1", + "6.0.0 - 6.13.0" + ] + }, + "@node-redis/client": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.0.6" + ] + }, + "@redis/client": { + "min-version": "1.1.0", + "range": [ + "1.1.0 - 1.6.0" + ] + }, + "redis": { + "min-version": "0.12.0", + "range": [ + "0.12.0 - 0.12.1", + "1.0.0 - 1.0.0", + "2.0.0 - 2.8.0", + "3.0.0 - 3.1.2", + "4.0.0 - 4.7.0" + ] + }, + "restify": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.0.3", + "4.0.0 - 4.3.4", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.6.1", + "9.0.0 - 9.1.0", + "10.0.0 - 10.0.0", + "11.0.0 - 11.1.0" + ] + }, + "rhea": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.0.24", + "2.0.0 - 2.0.8", + "3.0.0 - 3.0.3" + ] + }, + "router": { + "min-version": "0.2.1", + "range": [ + "0.2.1 - 0.6.2", + "1.0.0 - 1.3.8" + ] + }, + "selenium-webdriver": { + "min-version": "2.29.0", + "range": [ + "2.29.0 - 2.53.3", + "3.0.0 - 3.6.0", + "4.0.0 - 4.25.0" + ] + }, + "sequelize": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.4.3", + "1.0.0 - 1.7.11", + "2.0.0 - 2.1.3", + "3.0.0 - 3.35.1", + "4.0.0 - 4.44.4", + "5.1.0 - 5.22.5", + "6.1.0 - 6.37.3" + ] + }, + "sharedb": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.9.2", + "2.0.0 - 2.2.6", + "3.0.0 - 3.3.2", + "4.0.0 - 4.1.5", + "5.0.0 - 5.0.4" + ] + }, + "tedious": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.15.0", + "2.0.0 - 2.7.1", + "3.0.0 - 3.0.1", + "4.0.0 - 4.2.0", + "5.0.0 - 5.0.3", + "6.0.0 - 6.7.1", + "7.0.0 - 7.0.0", + "8.0.0 - 8.3.1", + "9.0.0 - 9.2.3", + "10.0.0 - 10.0.0", + "11.0.0 - 11.8.0", + "12.0.0 - 12.3.0", + "13.0.0 - 13.2.0", + "14.0.0 - 14.7.0", + "15.0.0 - 15.1.3", + "16.0.0 - 16.7.1", + "17.0.0 - 17.0.0", + "18.0.0 - 18.6.2" + ] + }, + "undici": { + "min-version": "0.1.0", + "range": [ + "0.1.0 - 0.5.0", + "1.0.0 - 1.3.1", + "2.0.0 - 2.2.1", + "3.0.0 - 3.3.6", + "4.0.0 - 4.16.0", + "5.0.0 - 5.28.4", + "6.0.0 - 6.19.8" + ] + }, + "vitest": { + "min-version": "0.0.0", + "range": [ + "0.0.0 - 0.34.6", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "@vitest/runner": { + "min-version": "0.28.0", + "range": [ + "0.28.0 - 0.34.7", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "when": { + "min-version": "3.0.0", + "range": [ + "3.0.0 - 3.7.8" + ] + }, + "winston": { + "min-version": "1.0.0", + "range": [ + "1.0.0 - 1.1.2", + "2.0.0 - 2.4.7", + "3.0.0 - 3.14.2" + ] + } + } +} \ No newline at end of file diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js new file mode 100644 index 00000000000..e696c2f3373 --- /dev/null +++ b/scripts/create_matrix.js @@ -0,0 +1,83 @@ +const { npmView } = require('./helpers/versioning') +const path = require('path') +const fs = require('fs') +const { execSync } = require('child_process') +const yaml = require('js-yaml') + +const matricesPath = path.join( + __dirname, + '..', + 'packages', + 'datadog-instrumentations', + 'src', + 'helpers', + 'matrices.json' +) +const versionsPath = path.join( + __dirname, + '..', + 'packages', + 'datadog-instrumentations', + 'src', + 'helpers', + 'versions.json' +) + +const matricesJson = require(matricesPath) + +const pluginsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matricesPath, 'utf-8')).matrices) + +// console.log('json', pluginsNames) + +const versionsJson = require(versionsPath) +const versionsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(versionsPath, 'utf-8')).matrices) + +function generateMatrix (name) { + let versionsPlugin + let matrix + + for (const name of versionsNames) { + // object is by plugin name + // it has the properties of min-version the minimum version we support + // and it has node-versions tracking version support by node version where applicable + // the first node version will be nested as node-version and range, subsequent node version + // ranges will need to be nested within 'include:' + // if the plugin does not require a node version it will just have a range + + versionsPlugin = versionsJson.matrices[name] + + if (versionsPlugin['by-node-version'] === true) { + matrix = { + 'node-version': [], + range: [], + include: {} + } + const range = [] + const plugin = versionsPlugin['node-versions'] + for (const version in plugin) { + range.push({ 'node-version': [version], range: plugin[version] }) + } + + for (let ele = 0; ele < range.length; ele++) { + if (ele === 0) { + matrix['node-version'] = range[ele]['node-version'] + matrix.range = range[ele].range + } else { + matrix.include = [range[ele]] + } + } + + matricesJson.matrices[name] = matrix + } else { + matrix = { + range: versionsPlugin.range + } + matricesJson.matrices[name] = matrix + } + } + fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) +} + +module.exports = { + generateMatrix +} diff --git a/scripts/outdated.js b/scripts/outdated.js index d4f5098512e..a23610023e2 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -7,6 +7,8 @@ const fs = require('fs') const { execSync } = require('child_process') const yaml = require('js-yaml') +const { generateMatrix } = require('./create_matrix') + const latestsPath = path.join( __dirname, '..', @@ -27,12 +29,23 @@ const matricesPath = path.join( 'matrices.json' ) +const versionsPath = path.join( + __dirname, + '..', + 'packages', + 'datadog-instrumentations', + 'src', + 'helpers', + 'versions.json' +) + const latestsJson = require(latestsPath) const internalsNames = Array.from(new Set(getInternals().map(n => n.name))) .filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) const matricesJson = require(matricesPath) -const pluginsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matricesPath, 'utf-8')).matrices) +const versionsJson = require(versionsPath) +const pluginNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matricesPath, 'utf-8')).matrices) // TODO A lot of this can be optimized by using `npm outdated`. @@ -42,6 +55,10 @@ function makeAPR (branchName) { execSync(`gh pr create --title ${title} --body ${body} --base master --head ${branchName} `) } +function splitting (element) { + return +element.split('.')[0] +} + function maxVersion (range) { if (typeof range === 'string') { return range @@ -49,57 +66,43 @@ function maxVersion (range) { return range.pop() } -function minVersion (range) { - if (typeof range === 'string') { - return range - } - return range.shift() -} +async function updateRange (name, major) { + const versionRange = await npmView(`${name}@${major} version`) -function splitting (element) { - return +element.split('.')[0] -} + const maxRange = maxVersion(versionRange) -async function ranges (name, minimum) { - const distTags = await npmView(`${name} dist-tags`) - const latestVersion = splitting(distTags?.latest) + return maxRange +} - const splitMin = splitting(minimum) +async function loopRange (name, range) { + for (let ele = 0; ele < range.length; ele++) { + const latest = range[ele].split(' - ') + const major = splitting(latest[0]) - const ranges = [] - let versionRange - let maxRange - let minRange + latest[1] = await updateRange(name, major) + range[ele] = `${latest[0]} - ${latest[1]}` + } + fs.writeFileSync(versionsPath, JSON.stringify(versionsJson, null, 2)) +} - for (let major = splitMin; major <= latestVersion; major++) { - try { - versionRange = await npmView(`${name}@${major} version`) - maxRange = maxVersion(versionRange) - minRange = minVersion(versionRange) +async function updatePlugin (name) { + const plugin = versionsJson.matrices[name] - if (major === splitMin) { - ranges.push(`${minimum} - ${maxRange}`) - } else if (versionRange !== undefined) { - ranges.push(`${minRange} - ${maxRange}`) - } - } catch (e) { - console.log(`No version range found for "${name}" at version ${major}`) + if (plugin['by-node-version'] === true) { + for (const versions in plugin['node-versions']) { + const pluginRange = plugin['node-versions'] + loopRange(name, pluginRange[versions]) } + } else { + loopRange(name, plugin.range) } - return ranges } async function fix () { - let latests - - for (const name of pluginsNames) { - latests = matricesJson.matrices[name] - const minVersion = latests['min-version'] - const versions = await ranges(name, minVersion) - - latests.range = versions + for (const name of pluginNames) { + await updatePlugin(name) + generateMatrix(name) } - fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) const result = execSync('git status').toString() @@ -135,5 +138,40 @@ async function check () { } } +function minVersion (range) { + if (typeof range === 'string') { + return range + } + return range.shift() +} +async function ranges (name, minimum) { + const distTags = await npmView(`${name} dist-tags`) + const latestVersion = splitting(distTags?.latest) + + const splitMin = splitting(minimum) + + const ranges = [] + let versionRange + let maxRange + let minRange + + for (let major = splitMin; major <= latestVersion; major++) { + try { + versionRange = await npmView(`${name}@${major} version`) + maxRange = maxVersion(versionRange) + minRange = minVersion(versionRange) + + if (major === splitMin) { + ranges.push(`${minimum} - ${maxRange}`) + } else if (versionRange !== undefined) { + ranges.push(`${minRange} - ${maxRange}`) + } + } catch (e) { + console.log(`No version range found for "${name}" at version ${major}`) + } + } + return ranges +} + if (process.argv.includes('fix')) fix() else check() From 482e7013a8353418fa68f4845bc262295aea4d3f Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Wed, 25 Sep 2024 10:45:00 -0400 Subject: [PATCH 41/80] adding script to create matrix --- .../src/helpers/matrices.json | 12 ++++++------ scripts/create_matrix.js | 9 ++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index c0b12098fe0..4506e85f89a 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -5,15 +5,15 @@ "16" ], "range": [ - "2.4.2 - 2.6.12", - "3.0.7 - 3.2.7", - "4.0.0 - 4.4.2" + [ + "2.4.2 - 2.6.12", + "3.0.7 - 3.2.7", + "4.0.0 - 4.4.2" + ] ], "include": [ { - "node-version": [ - "18" - ], + "node-version": "18", "range": [ "4.4.1 - 4.4.2" ] diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index e696c2f3373..fef982a4edd 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -55,18 +55,17 @@ function generateMatrix (name) { const range = [] const plugin = versionsPlugin['node-versions'] for (const version in plugin) { - range.push({ 'node-version': [version], range: plugin[version] }) + range.push({ 'node-version': version, range: plugin[version] }) } for (let ele = 0; ele < range.length; ele++) { if (ele === 0) { - matrix['node-version'] = range[ele]['node-version'] - matrix.range = range[ele].range + matrix['node-version'] = [range[ele]['node-version']] + matrix.range = [range[ele].range] } else { matrix.include = [range[ele]] } } - matricesJson.matrices[name] = matrix } else { matrix = { @@ -77,7 +76,7 @@ function generateMatrix (name) { } fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) } - +generateMatrix('couchbase') module.exports = { generateMatrix } From 3c65afbafaff2618e7facbe69bc5f6ecf778215e Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Wed, 25 Sep 2024 10:49:01 -0400 Subject: [PATCH 42/80] adding script to create matrix --- .../src/helpers/matrices.json | 12 +++++------- scripts/create_matrix.js | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 4506e85f89a..2d5e0a4fa40 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -2,18 +2,16 @@ "matrices": { "couchbase": { "node-version": [ - "16" + 16 ], "range": [ - [ - "2.4.2 - 2.6.12", - "3.0.7 - 3.2.7", - "4.0.0 - 4.4.2" - ] + "2.4.2 - 2.6.12", + "3.0.7 - 3.2.7", + "4.0.0 - 4.4.2" ], "include": [ { - "node-version": "18", + "node-version": 18, "range": [ "4.4.1 - 4.4.2" ] diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index fef982a4edd..450a1b65cfa 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -55,13 +55,13 @@ function generateMatrix (name) { const range = [] const plugin = versionsPlugin['node-versions'] for (const version in plugin) { - range.push({ 'node-version': version, range: plugin[version] }) + range.push({ 'node-version': +version, range: plugin[version] }) } for (let ele = 0; ele < range.length; ele++) { if (ele === 0) { matrix['node-version'] = [range[ele]['node-version']] - matrix.range = [range[ele].range] + matrix.range = range[ele].range } else { matrix.include = [range[ele]] } From c1bd2eb864b8bda02cf4a4d10b85c473247fc3e0 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Wed, 25 Sep 2024 11:00:31 -0400 Subject: [PATCH 43/80] adding script to create matrix --- .github/workflows/plugins.yml | 2 +- packages/datadog-instrumentations/src/helpers/matrices.json | 4 +--- scripts/create_matrix.js | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index eaab543ea7f..6f5c4861556 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -155,7 +155,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.apollo}} + matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.@apollo/gateway}} runs-on: ubuntu-latest env: PLUGINS: apollo diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 2d5e0a4fa40..1eb87fbfb3d 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -12,9 +12,7 @@ "include": [ { "node-version": 18, - "range": [ - "4.4.1 - 4.4.2" - ] + "range": "4.4.1 - 4.4.2" } ] }, diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index 450a1b65cfa..751d411ac32 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -63,7 +63,10 @@ function generateMatrix (name) { matrix['node-version'] = [range[ele]['node-version']] matrix.range = range[ele].range } else { - matrix.include = [range[ele]] + matrix.include = [{ + 'node-version': range[ele]['node-version'], + range: range[ele].range[0] + }] } } matricesJson.matrices[name] = matrix From f1565eb6de6f2c5c02c45536d1d4b9fa157d5f74 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Wed, 25 Sep 2024 11:03:31 -0400 Subject: [PATCH 44/80] adding script to create matrix --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 6f5c4861556..8c4fffbbfd2 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -155,7 +155,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.@apollo/gateway}} + matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.apollo/gateway}} runs-on: ubuntu-latest env: PLUGINS: apollo From 5da893353d7d60574aa1dd9d3c276afb6b799938 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Wed, 25 Sep 2024 11:05:07 -0400 Subject: [PATCH 45/80] adding script to create matrix --- .github/workflows/plugins.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 8c4fffbbfd2..eaab543ea7f 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -155,7 +155,7 @@ jobs: needs: - versions strategy: - matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.apollo/gateway}} + matrix: ${{fromJson(needs.versions.outputs.matrices).matrices.apollo}} runs-on: ubuntu-latest env: PLUGINS: apollo From 486029235cd15f54e96436dbad0d3c8ec42d042b Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Thu, 26 Sep 2024 11:05:18 -0400 Subject: [PATCH 46/80] updating scripts --- .../datadog-instrumentations/src/helpers/matrices.json | 7 ++++--- .../datadog-instrumentations/src/helpers/versions.json | 7 ++++--- scripts/outdated.js | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 1eb87fbfb3d..098f36e2bc5 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -6,6 +6,7 @@ ], "range": [ "2.4.2 - 2.6.12", + "3.0.0 - 3.0.5", "3.0.7 - 3.2.7", "4.0.0 - 4.4.2" ], @@ -29,7 +30,7 @@ }, "amqplib": { "range": [ - "0.5.0 - 0.10.4" + "0.5.3 - 0.10.4" ] }, "@apollo/gateway": { @@ -344,7 +345,7 @@ "4.6.4 - 4.13.21", "5.0.0 - 5.13.22", "6.0.0 - 6.13.3", - "7.0.0 - 7.8.1", + "7.0.0 - 7.8.2", "8.0.0 - 8.6.3" ] }, @@ -383,7 +384,7 @@ "openai": { "range": [ "3.0.0 - 3.3.0", - "4.0.0 - 4.63.0" + "4.0.0 - 4.64.0" ] }, "@opensearch-project/opensearch": { diff --git a/packages/datadog-instrumentations/src/helpers/versions.json b/packages/datadog-instrumentations/src/helpers/versions.json index 552e4814db7..d310e7d38d5 100644 --- a/packages/datadog-instrumentations/src/helpers/versions.json +++ b/packages/datadog-instrumentations/src/helpers/versions.json @@ -6,6 +6,7 @@ "node-versions": { "16": [ "2.4.2 - 2.6.12", + "3.0.0 - 3.2.7", "3.0.7 - 3.2.7", "4.0.0 - 4.4.2" ], @@ -29,7 +30,7 @@ "amqplib": { "min-version": "0.5.0", "range": [ - "0.5.0 - 0.10.4" + "0.5.3 - 0.10.4" ] }, "@apollo/gateway": { @@ -386,7 +387,7 @@ "4.6.4 - 4.13.21", "5.0.0 - 5.13.22", "6.0.0 - 6.13.3", - "7.0.0 - 7.8.1", + "7.0.0 - 7.8.2", "8.0.0 - 8.6.3" ] }, @@ -430,7 +431,7 @@ "min-version": "3.0.0", "range": [ "3.0.0 - 3.3.0", - "4.0.0 - 4.63.0" + "4.0.0 - 4.64.0" ] }, "@opensearch-project/opensearch": { diff --git a/scripts/outdated.js b/scripts/outdated.js index a23610023e2..9ce64f9761c 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -55,10 +55,6 @@ function makeAPR (branchName) { execSync(`gh pr create --title ${title} --body ${body} --base master --head ${branchName} `) } -function splitting (element) { - return +element.split('.')[0] -} - function maxVersion (range) { if (typeof range === 'string') { return range @@ -77,7 +73,7 @@ async function updateRange (name, major) { async function loopRange (name, range) { for (let ele = 0; ele < range.length; ele++) { const latest = range[ele].split(' - ') - const major = splitting(latest[0]) + const major = +latest[0].split('.')[0] latest[1] = await updateRange(name, major) range[ele] = `${latest[0]} - ${latest[1]}` @@ -173,5 +169,9 @@ async function ranges (name, minimum) { return ranges } +function splitting (element) { + return +element.split('.')[0] +} + if (process.argv.includes('fix')) fix() else check() From ebfb9b844e5f2183a438750108026be847a210af Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Fri, 27 Sep 2024 17:49:59 -0400 Subject: [PATCH 47/80] removing matrices.json --- .github/workflows/plugins.yml | 4 ++-- scripts/create_matrix.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index eaab543ea7f..f1825da4b87 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - id: plugins run: | - content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') + content=$(node scripts/outdated.js fix) echo "matrices=$content" >> $GITHUB_OUTPUT echo $content @@ -107,7 +107,7 @@ jobs: uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 - amqp10: # TODO: move rhea to its own job + amqp10: needs: - versions strategy: diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index 751d411ac32..ac21e845262 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -77,9 +77,10 @@ function generateMatrix (name) { matricesJson.matrices[name] = matrix } } - fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) + return matricesJson.matrices } -generateMatrix('couchbase') module.exports = { generateMatrix } + +// content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') From 1b20c5f7916e90bfee774f70c29d43d5fc72a369 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Fri, 27 Sep 2024 18:08:26 -0400 Subject: [PATCH 48/80] removing matrices.jn reverting back and keeping matrices json --- .github/workflows/plugins.yml | 4 ++-- scripts/create_matrix.js | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index f1825da4b87..eaab543ea7f 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -22,7 +22,7 @@ jobs: - uses: actions/checkout@v4 - id: plugins run: | - content=$(node scripts/outdated.js fix) + content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') echo "matrices=$content" >> $GITHUB_OUTPUT echo $content @@ -107,7 +107,7 @@ jobs: uses: ./.github/actions/testagent/logs - uses: codecov/codecov-action@v3 - amqp10: + amqp10: # TODO: move rhea to its own job needs: - versions strategy: diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index ac21e845262..751d411ac32 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -77,10 +77,9 @@ function generateMatrix (name) { matricesJson.matrices[name] = matrix } } - return matricesJson.matrices + fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) } +generateMatrix('couchbase') module.exports = { generateMatrix } - -// content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') From 7f9decd9892b3fcc26e4c26a98a90a18ab909799 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 1 Oct 2024 16:02:56 -0400 Subject: [PATCH 49/80] removing matrices.json --- .github/workflows/plugins.yml | 5 ++++- scripts/create_matrix.js | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index eaab543ea7f..44f6c4d15bf 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -20,9 +20,12 @@ jobs: matrices: ${{steps.plugins.outputs.matrices}} steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/node/latest + - uses: ./.github/actions/install - id: plugins run: | - content=$(cat packages/datadog-instrumentations/src/helpers/matrices.json | tr '\n' ' ') + echo "starting up" + content=$(node ./scripts/create_matrix.js) echo "matrices=$content" >> $GITHUB_OUTPUT echo $content diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index 751d411ac32..4ac2cd66672 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -77,9 +77,10 @@ function generateMatrix (name) { matricesJson.matrices[name] = matrix } } - fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) + // fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) + return JSON.stringify(matricesJson, null, 2) } -generateMatrix('couchbase') +// generateMatrix('couchbase') module.exports = { generateMatrix } From cd064f6871ab2e22f2711be1c45b3d3be048424f Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 1 Oct 2024 16:07:49 -0400 Subject: [PATCH 50/80] removing matrices.json --- scripts/create_matrix.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index 4ac2cd66672..f4b803a29b8 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -1,3 +1,5 @@ +#!/usr/bin/env node + const { npmView } = require('./helpers/versioning') const path = require('path') const fs = require('fs') @@ -77,10 +79,10 @@ function generateMatrix (name) { matricesJson.matrices[name] = matrix } } - // fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) + fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) return JSON.stringify(matricesJson, null, 2) } -// generateMatrix('couchbase') + module.exports = { generateMatrix } From 6ee768ca41fdfdb30015c8d8209af3e9a7292679 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 1 Oct 2024 16:11:44 -0400 Subject: [PATCH 51/80] removing matrices.json --- scripts/create_matrix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index f4b803a29b8..e37ff0535ab 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -80,7 +80,7 @@ function generateMatrix (name) { } } fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) - return JSON.stringify(matricesJson, null, 2) + return matricesJson } module.exports = { From d336692cc13bb1dce8b025d2283e193163d4ea45 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Tue, 1 Oct 2024 16:38:52 -0400 Subject: [PATCH 52/80] removing matrices.json --- .github/workflows/plugins.yml | 1 + scripts/create_matrix.js | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/plugins.yml b/.github/workflows/plugins.yml index 44f6c4d15bf..93ff8f4d07d 100644 --- a/.github/workflows/plugins.yml +++ b/.github/workflows/plugins.yml @@ -25,6 +25,7 @@ jobs: - id: plugins run: | echo "starting up" + echo node --version content=$(node ./scripts/create_matrix.js) echo "matrices=$content" >> $GITHUB_OUTPUT echo $content diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index e37ff0535ab..8dba602618a 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -1,9 +1,7 @@ #!/usr/bin/env node -const { npmView } = require('./helpers/versioning') const path = require('path') const fs = require('fs') -const { execSync } = require('child_process') const yaml = require('js-yaml') const matricesPath = path.join( @@ -34,7 +32,7 @@ const pluginsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matric const versionsJson = require(versionsPath) const versionsNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(versionsPath, 'utf-8')).matrices) -function generateMatrix (name) { +function generateMatrix () { let versionsPlugin let matrix @@ -79,10 +77,14 @@ function generateMatrix (name) { matricesJson.matrices[name] = matrix } } - fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) return matricesJson } module.exports = { generateMatrix } + +if (require.main === module) { + // eslint-disable-next-line no-console + console.log(JSON.stringify(generateMatrix())) +} From 07b26343dabad2cd11f864b687fab755cf8520e1 Mon Sep 17 00:00:00 2001 From: Crystal Magloire Date: Wed, 2 Oct 2024 12:10:37 -0400 Subject: [PATCH 53/80] updating versions json --- packages/datadog-instrumentations/src/helpers/versions.json | 6 +++++- scripts/create_matrix.js | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/versions.json b/packages/datadog-instrumentations/src/helpers/versions.json index d310e7d38d5..2128c416100 100644 --- a/packages/datadog-instrumentations/src/helpers/versions.json +++ b/packages/datadog-instrumentations/src/helpers/versions.json @@ -1,6 +1,7 @@ { "matrices": { "couchbase": { + "name": "couchbase", "min-version": "2.4.2", "by-node-version": true, "node-versions": { @@ -8,10 +9,13 @@ "2.4.2 - 2.6.12", "3.0.0 - 3.2.7", "3.0.7 - 3.2.7", - "4.0.0 - 4.4.2" + "4.0.0 - 4.4.2" ], "18": [ "4.4.1 - 4.4.2" + ], + "strict": [ + ] } }, diff --git a/scripts/create_matrix.js b/scripts/create_matrix.js index 8dba602618a..4c8fa6f8c51 100644 --- a/scripts/create_matrix.js +++ b/scripts/create_matrix.js @@ -1,5 +1,3 @@ -#!/usr/bin/env node - const path = require('path') const fs = require('fs') const yaml = require('js-yaml') From 783552158675ff912528f9c759af8c68c684c398 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:22:35 -0400 Subject: [PATCH 54/80] wip --- .github/workflows/outdated-integrations.yml | 9 +- .../src/helpers/latests.json | 90 +-- .../src/helpers/matrices.json | 547 ------------------ 3 files changed, 7 insertions(+), 639 deletions(-) diff --git a/.github/workflows/outdated-integrations.yml b/.github/workflows/outdated-integrations.yml index 7a0512545f3..90019cfe809 100644 --- a/.github/workflows/outdated-integrations.yml +++ b/.github/workflows/outdated-integrations.yml @@ -1,9 +1,12 @@ name: Outdated Integrations on: - schedule: - # Yes, this runs a _lot_. We don't want to be out of date for very long. - - cron: '37 12,16,22 * * *' + # schedule: + # # Yes, this runs a _lot_. We don't want to be out of date for very long. + # - cron: '37 12,16,22 * * *' + push: + branches: + - 'quinna/test-outdated-integrations' # for testing jobs: outdated-integrations: diff --git a/packages/datadog-instrumentations/src/helpers/latests.json b/packages/datadog-instrumentations/src/helpers/latests.json index 31f6595bb36..944ec56afd4 100644 --- a/packages/datadog-instrumentations/src/helpers/latests.json +++ b/packages/datadog-instrumentations/src/helpers/latests.json @@ -6,100 +6,12 @@ ], "latests": { "aerospike": "5.12.1", - "amqp10": "3.6.0", - "amqplib": "0.10.4", - "apollo-server-core": "3.13.0", - "@apollo/server": "4.11.0", - "@apollo/gateway": "2.9.1", - "@smithy/smithy-client": "3.3.2", - "@aws-sdk/smithy-client": "3.374.0", - "aws-sdk": "2.1691.0", - "bluebird": "3.7.2", - "body-parser": "1.20.3", - "bunyan": "1.8.15", "cassandra-driver": "4.7.2", - "connect": "3.7.0", - "cookie-parser": "1.4.6", - "cookie": "0.6.0", "couchbase": "4.4.1", - "@cucumber/cucumber": "11.0.1", "cypress": "13.14.2", "@elastic/transport": "8.7.1", "@elastic/elasticsearch": "8.15.0", - "elasticsearch": "16.7.3", - "express-mongo-sanitize": "2.2.0", - "express": "4.21.0", - "fastify": "5.0.0", - "find-my-way": "9.0.1", - "fs": "0.0.1-security", - "generic-pool": "3.9.0", - "@google-cloud/pubsub": "4.7.2", - "@graphql-tools/executor": "1.3.1", - "graphql": "16.9.0", - "@grpc/grpc-js": "1.11.3", - "@hapi/hapi": "21.3.10", - "hapi": "18.1.0", - "ioredis": "5.4.1", - "jest-environment-node": "29.7.0", - "jest-environment-jsdom": "29.7.0", - "@jest/core": "29.7.0", - "@jest/test-sequencer": "29.7.0", - "@jest/reporters": "29.7.0", - "jest-circus": "29.7.0", - "@jest/transform": "29.7.0", - "jest-config": "29.7.0", - "jest-runtime": "29.7.0", - "jest-worker": "29.7.0", - "kafkajs": "2.2.4", - "knex": "3.1.0", - "koa": "2.15.3", - "@koa/router": "13.1.0", - "koa-router": "13.0.1", - "ldapjs": "3.0.7", - "limitd-client": "2.14.1", - "lodash": "4.17.21", - "mariadb": "3.3.2", - "memcached": "2.2.2", - "microgateway-core": "3.3.4", - "moleculer": "0.14.34", - "mongodb-core": "3.2.7", - "mongodb": "6.9.0", - "mongoose": "8.6.3", - "mquery": "5.0.0", - "mysql": "2.18.1", - "mysql2": "3.11.3", - "next": "14.2.12", - "nyc": "17.0.0", - "openai": "4.62.1", - "@opensearch-project/opensearch": "2.12.0", - "oracledb": "6.6.0", - "paperplane": "3.1.2", - "passport-http": "0.3.0", - "passport-local": "1.0.0", - "pg": "8.13.0", - "pino": "9.4.0", - "pino-pretty": "11.2.2", - "@playwright/test": "1.47.1", - "playwright": "1.47.1", - "promise-js": "0.0.7", - "promise": "8.3.0", - "q": "1.5.1", - "qs": "6.13.0", - "@node-redis/client": "1.0.6", - "@redis/client": "1.6.0", - "redis": "4.7.0", - "restify": "11.1.0", - "rhea": "3.0.2", - "router": "1.3.8", - "selenium-webdriver": "4.24.1", - "sequelize": "6.37.3", - "sharedb": "5.0.4", - "tedious": "18.6.1", - "undici": "6.19.8", - "vitest": "2.1.1", - "@vitest/runner": "2.1.1", - "when": "3.7.8", - "winston": "3.14.2" + "elasticsearch": "16.7.3" }, "matrices": { "couchbase": { diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 098f36e2bc5..44fa3772fdf 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -23,79 +23,12 @@ "5.0.0 - 5.12.1" ] }, - "amqp10": { - "range": [ - "3.0.0 - 3.6.0" - ] - }, - "amqplib": { - "range": [ - "0.5.3 - 0.10.4" - ] - }, - "@apollo/gateway": { - "range": [ - "0.1.0 - 0.54.1", - "2.0.0 - 2.9.1" - ] - }, - "@aws-sdk/smithy-client": { - "range": [ - "3.0.0 - 3.374.0" - ] - }, - "aws-sdk": { - "range": [ - "2.1.35 - 2.1691.0" - ] - }, - "bluebird": { - "range": [ - "2.0.0 - 2.11.0", - "3.0.0 - 3.7.2" - ] - }, - "body-parser": { - "range": [ - "1.0.0 - 1.20.3" - ] - }, - "bunyan": { - "range": [ - "1.0.0 - 1.8.15" - ] - }, "cassandra-driver": { "range": [ "3.0.0 - 3.6.0", "4.0.0 - 4.7.2" ] }, - "connect": { - "range": [ - "2.0.0 - 2.30.2", - "3.0.0 - 3.7.0" - ] - }, - "cookie-parser": { - "range": [ - "1.0.0 - 1.4.6" - ] - }, - "cookie": { - "range": [ - "0.0.0 - 0.6.0" - ] - }, - "@cucumber/cucumber": { - "range": [ - "7.0.0 - 7.3.2", - "8.0.0 - 8.11.1", - "9.0.0 - 9.6.0", - "10.0.0 - 10.9.0", - "11.0.0 - 11.0.1" - ] - }, "cypress": { "range": [ "0.0.1 - 0.20.3", @@ -141,486 +74,6 @@ "15.0.0 - 15.5.0", "16.0.0 - 16.7.3" ] - }, - "express-mongo-sanitize": { - "range": [ - "1.0.0 - 1.3.2", - "2.0.0 - 2.2.0" - ] - }, - "express": { - "range": [ - "4.0.0 - 4.21.0" - ] - }, - "fastify": { - "range": [ - "1.0.0 - 1.14.6", - "2.0.0 - 2.15.3", - "3.0.0 - 3.29.5", - "4.0.0 - 4.28.1", - "5.0.0 - 5.0.0" - ] - }, - "find-my-way": { - "range": [ - "1.0.0 - 1.18.1", - "2.0.0 - 2.2.5", - "3.0.0 - 3.0.5", - "4.0.0 - 4.5.1", - "5.0.0 - 5.6.0", - "6.0.0 - 6.4.0", - "7.0.0 - 7.7.0", - "8.0.0 - 8.2.2", - "9.0.0 - 9.0.1" - ] - }, - "generic-pool": { - "range": [ - "2.0.0 - 2.5.4", - "3.0.0 - 3.9.0" - ] - }, - "@google-cloud/pubsub": { - "range": [ - "1.2.0 - 1.7.3", - "2.0.0 - 2.19.4", - "3.0.0 - 3.7.5", - "4.0.0 - 4.7.2" - ] - }, - "@graphql-tools/executor": { - "range": [ - "0.0.14 - 0.0.20", - "1.0.0 - 1.3.1" - ] - }, - "graphql": { - "range": [ - "0.10.0 - 0.13.2", - "14.0.0 - 14.7.0", - "15.0.0 - 15.9.0", - "16.0.0 - 16.9.0" - ] - }, - "@grpc/grpc-js": { - "range": [ - "1.0.3 - 1.11.3" - ] - }, - "@hapi/hapi": { - "range": [ - "17.9.0 - 17.9.0", - "18.2.0 - 18.4.1", - "19.0.0 - 19.2.0", - "20.0.0 - 20.3.0", - "21.0.0 - 21.3.10" - ] - }, - "hapi": { - "range": [ - "16.0.0 - 16.8.4", - "17.0.0 - 17.8.5", - "18.0.0 - 18.1.0" - ] - }, - "ioredis": { - "range": [ - "2.0.0 - 2.5.0", - "3.0.0 - 3.2.2", - "4.0.0 - 4.28.5", - "5.0.0 - 5.4.1" - ] - }, - "jest-environment-node": { - "range": [ - "24.8.0 - 24.9.0", - "25.0.0 - 25.5.0", - "26.0.0 - 26.6.2", - "27.0.0 - 27.5.1", - "28.0.0 - 28.1.3", - "29.0.0 - 29.7.0" - ] - }, - "kafkajs": { - "range": [ - "1.4.0 - 1.16.0", - "2.0.0 - 2.2.4" - ] - }, - "knex": { - "range": [ - "0.8.0 - 0.95.15", - "1.0.0 - 1.0.7", - "2.0.0 - 2.5.1", - "3.0.0 - 3.1.0" - ] - }, - "koa": { - "range": [ - "2.0.0 - 2.15.3" - ] - }, - "@koa/router": { - "range": [ - "8.0.0 - 8.0.8", - "9.0.1 - 9.4.0", - "10.0.0 - 10.1.1", - "11.0.0 - 11.0.2", - "12.0.0 - 12.0.2", - "13.0.0 - 13.1.0" - ] - }, - "koa-router": { - "range": [ - "7.0.0 - 7.4.0", - "8.0.6 - 8.0.8", - "9.0.1 - 9.4.0", - "10.0.0 - 10.1.1", - "11.0.0 - 11.0.2", - "12.0.0 - 12.0.1", - "13.0.1 - 13.0.1" - ] - }, - "ldapjs": { - "range": [ - "0.1.0 - 0.8.0", - "1.0.0 - 1.0.2", - "2.0.0 - 2.3.3", - "3.0.0 - 3.0.7" - ] - }, - "limitd-client": { - "range": [ - "1.0.0 - 1.13.1", - "2.0.0 - 2.14.1" - ] - }, - "lodash": { - "range": [ - "0.1.0 - 0.10.0", - "1.0.0 - 1.0.2", - "2.0.0 - 2.4.2", - "3.0.0 - 3.10.1", - "4.0.0 - 4.17.21" - ] - }, - "mariadb": { - "range": [ - "3.0.0 - 3.3.2" - ] - }, - "memcached": { - "range": [ - "2.2.0 - 2.2.2" - ] - }, - "microgateway-core": { - "range": [ - "2.1.0 - 2.5.17", - "3.0.0 - 3.3.4" - ] - }, - "moleculer": { - "range": [ - "0.14.0 - 0.14.34" - ] - }, - "mongodb-core": { - "range": [ - "2.0.0 - 2.1.20", - "3.0.0 - 3.2.7" - ] - }, - "mongodb": { - "range": [ - "3.3.0 - 3.7.4", - "4.0.0 - 4.17.2", - "5.0.0 - 5.9.2", - "6.0.0 - 6.9.0" - ] - }, - "mongoose": { - "range": [ - "4.6.4 - 4.13.21", - "5.0.0 - 5.13.22", - "6.0.0 - 6.13.3", - "7.0.0 - 7.8.2", - "8.0.0 - 8.6.3" - ] - }, - "mquery": { - "range": [ - "0.0.1 - 0.9.0", - "1.0.0 - 1.11.0", - "2.0.0 - 2.3.3", - "3.0.0 - 3.2.5", - "4.0.0 - 4.0.3", - "5.0.0 - 5.0.0" - ] - }, - "mysql": { - "range": [ - "2.0.0 - 2.18.1" - ] - }, - "mysql2": { - "range": [ - "1.0.0 - 1.6.6", - "2.0.0 - 2.3.3", - "3.0.0 - 3.11.3" - ] - }, - "next": { - "range": [ - "9.5.0 - 9.5.5", - "10.0.0 - 10.2.3", - "11.0.0 - 11.1.4", - "12.0.0 - 12.3.4", - "13.0.0 - 13.5.7", - "14.0.0 - 14.2.13" - ] - }, - "openai": { - "range": [ - "3.0.0 - 3.3.0", - "4.0.0 - 4.64.0" - ] - }, - "@opensearch-project/opensearch": { - "range": [ - "1.0.0 - 1.2.0", - "2.0.0 - 2.12.0" - ] - }, - "oracledb": { - "range": [ - "5.0.0 - 5.5.0", - "6.0.0 - 6.6.0" - ] - }, - "paperplane": { - "range": [ - "2.3.0 - 2.3.2", - "3.0.0 - 3.1.2" - ] - }, - "passport-http": { - "range": [ - "0.1.0 - 0.3.0" - ] - }, - "passport-local": { - "range": [ - "0.1.0 - 0.1.6", - "1.0.0 - 1.0.0" - ] - }, - "pg": { - "range": [ - "4.0.0 - 4.5.7", - "5.0.0 - 5.2.1", - "6.0.0 - 6.4.2", - "7.0.0 - 7.18.2", - "8.0.0 - 8.13.0" - ] - }, - "pino": { - "range": [ - "2.0.0 - 2.16.0", - "3.0.0 - 3.4.0", - "4.0.0 - 4.17.6", - "5.0.0 - 5.17.0", - "6.0.0 - 6.14.0", - "7.0.0 - 7.11.0", - "8.0.0 - 8.21.0", - "9.0.0 - 9.4.0" - ] - }, - "pino-pretty": { - "range": [ - "1.0.0 - 1.0.1", - "2.0.0 - 2.6.1", - "3.0.0 - 3.6.1", - "4.0.0 - 4.8.0", - "5.0.0 - 5.1.3", - "6.0.0 - 6.0.0", - "7.0.0 - 7.6.1", - "8.0.0 - 8.1.0", - "9.0.0 - 9.4.1", - "10.0.0 - 10.3.1", - "11.0.0 - 11.2.2" - ] - }, - "@playwright/test": { - "range": [ - "0.0.0 - 0.1111.0", - "1.12.0 - 1.47.2" - ] - }, - "playwright": { - "range": [ - "0.0.0 - 0.18.0", - "1.0.0 - 1.47.2" - ] - }, - "promise-js": { - "range": [ - "0.0.3 - 0.0.7" - ] - }, - "promise": { - "range": [ - "7.0.0 - 7.3.1", - "8.0.0 - 8.3.0" - ] - }, - "q": { - "range": [ - "1.0.0 - 1.5.1" - ] - }, - "qs": { - "range": [ - "0.0.0 - 0.6.6", - "1.0.0 - 1.2.2", - "2.0.0 - 2.4.2", - "3.0.0 - 3.1.0", - "4.0.0 - 4.0.0", - "5.0.0 - 5.2.1", - "6.0.0 - 6.13.0" - ] - }, - "@node-redis/client": { - "range": [ - "1.0.0 - 1.0.6" - ] - }, - "@redis/client": { - "range": [ - "1.1.0 - 1.6.0" - ] - }, - "redis": { - "range": [ - "0.12.0 - 0.12.1", - "1.0.0 - 1.0.0", - "2.0.0 - 2.8.0", - "3.0.0 - 3.1.2", - "4.0.0 - 4.7.0" - ] - }, - "restify": { - "range": [ - "3.0.0 - 3.0.3", - "4.0.0 - 4.3.4", - "5.0.0 - 5.2.1", - "6.0.0 - 6.4.0", - "7.0.0 - 7.7.0", - "8.0.0 - 8.6.1", - "9.0.0 - 9.1.0", - "10.0.0 - 10.0.0", - "11.0.0 - 11.1.0" - ] - }, - "rhea": { - "range": [ - "1.0.0 - 1.0.24", - "2.0.0 - 2.0.8", - "3.0.0 - 3.0.3" - ] - }, - "router": { - "range": [ - "0.2.1 - 0.6.2", - "1.0.0 - 1.3.8" - ] - }, - "selenium-webdriver": { - "range": [ - "2.29.0 - 2.53.3", - "3.0.0 - 3.6.0", - "4.0.0 - 4.25.0" - ] - }, - "sequelize": { - "range": [ - "0.0.0 - 0.4.3", - "1.0.0 - 1.7.11", - "2.0.0 - 2.1.3", - "3.0.0 - 3.35.1", - "4.0.0 - 4.44.4", - "5.1.0 - 5.22.5", - "6.1.0 - 6.37.3" - ] - }, - "sharedb": { - "range": [ - "1.0.0 - 1.9.2", - "2.0.0 - 2.2.6", - "3.0.0 - 3.3.2", - "4.0.0 - 4.1.5", - "5.0.0 - 5.0.4" - ] - }, - "tedious": { - "range": [ - "1.0.0 - 1.15.0", - "2.0.0 - 2.7.1", - "3.0.0 - 3.0.1", - "4.0.0 - 4.2.0", - "5.0.0 - 5.0.3", - "6.0.0 - 6.7.1", - "7.0.0 - 7.0.0", - "8.0.0 - 8.3.1", - "9.0.0 - 9.2.3", - "10.0.0 - 10.0.0", - "11.0.0 - 11.8.0", - "12.0.0 - 12.3.0", - "13.0.0 - 13.2.0", - "14.0.0 - 14.7.0", - "15.0.0 - 15.1.3", - "16.0.0 - 16.7.1", - "17.0.0 - 17.0.0", - "18.0.0 - 18.6.2" - ] - }, - "undici": { - "range": [ - "0.1.0 - 0.5.0", - "1.0.0 - 1.3.1", - "2.0.0 - 2.2.1", - "3.0.0 - 3.3.6", - "4.0.0 - 4.16.0", - "5.0.0 - 5.28.4", - "6.0.0 - 6.19.8" - ] - }, - "vitest": { - "range": [ - "0.0.0 - 0.34.6", - "1.0.0 - 1.6.0", - "2.0.0 - 2.1.1" - ] - }, - "@vitest/runner": { - "range": [ - "0.28.0 - 0.34.7", - "1.0.0 - 1.6.0", - "2.0.0 - 2.1.1" - ] - }, - "when": { - "range": [ - "3.0.0 - 3.7.8" - ] - }, - "winston": { - "range": [ - "1.0.0 - 1.1.2", - "2.0.0 - 2.4.7", - "3.0.0 - 3.14.2" - ] } } } \ No newline at end of file From ff794793320abc69b2365bbf69d43a9d1d61337f Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:29:52 -0400 Subject: [PATCH 55/80] wip --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index eb52c60ac14..d14ba956334 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "bench:e2e:ci-visibility": "node benchmark/e2e-ci/benchmark-run.js", "type:doc": "cd docs && yarn && yarn build", "type:test": "cd docs && yarn && yarn test", - "outdated-integrations": "node scripts/outdated.js fix", + "outdated-integrations": "node scripts/outdated.js", "lint": "node scripts/check_licenses.js && eslint . && yarn audit --groups dependencies", "lint-fix": "node scripts/check_licenses.js && eslint . --fix && yarn audit --groups dependencies", "services": "node ./scripts/install_plugin_modules && node packages/dd-trace/test/setup/services", From 68263e8c5db738a2586a3b2d6f28b96ad5686621 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:35:02 -0400 Subject: [PATCH 56/80] wip --- scripts/outdated.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 9ce64f9761c..7ae2326038b 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -123,13 +123,13 @@ async function check () { const latest = latestsJson.latests[name] if (!latest) { console.log(`No latest version found for "${name}"`) - process.exitCode = 1 + // process.exitCode = 1 } const distTags = await npmView(name + ' dist-tags') const npmLatest = distTags.latest if (npmLatest !== latest) { console.log(`"latests.json: is not up to date for "${name}": expected "${npmLatest}", got "${latest}"`) - process.exitCode = 1 + // process.exitCode = 1 } } } From 12a6e9d723972ef9d35e4f207ae2a65e6f04721f Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:38:56 -0400 Subject: [PATCH 57/80] wip --- scripts/outdated.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 7ae2326038b..6627885ac27 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -173,5 +173,8 @@ function splitting (element) { return +element.split('.')[0] } -if (process.argv.includes('fix')) fix() -else check() +if (process.argv.includes('fix')) // TODO: fix this parsing + fix() +else + check() + fix() From 8efa626229e80f3f8df67dbf2f08cf5c4e9ccaac Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:43:34 -0400 Subject: [PATCH 58/80] wip --- scripts/outdated.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 6627885ac27..b4340426ea5 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -174,7 +174,9 @@ function splitting (element) { } if (process.argv.includes('fix')) // TODO: fix this parsing - fix() -else - check() - fix() +{ fix(); +}else { + check(); + fix(); +} + From d055df65193b988b4f41f1a529d7180bb88668b1 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:48:02 -0400 Subject: [PATCH 59/80] Change to use test packages --- scripts/outdated.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index b4340426ea5..99db7e5b177 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -40,8 +40,8 @@ const versionsPath = path.join( ) const latestsJson = require(latestsPath) -const internalsNames = Array.from(new Set(getInternals().map(n => n.name))) - .filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) +const internalsNames = Array.from(new Set(getInternals().map(n => n.name))).filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) +const testNames = ["aerospike", "cassandra-driver", 'couchbase', 'cypress', '@elastic/transport', '@elastic/elasticsearch', 'elasticsearch'] const matricesJson = require(matricesPath) const versionsJson = require(versionsPath) @@ -119,7 +119,7 @@ async function fix () { } async function check () { - for (const name of internalsNames) { + for (const name of testNames) { const latest = latestsJson.latests[name] if (!latest) { console.log(`No latest version found for "${name}"`) From c6e473b761083a6b8be0ca522d3bb9f0d6d002f4 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:53:26 -0400 Subject: [PATCH 60/80] Add logging --- scripts/outdated.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 99db7e5b177..7d14a3d4d58 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -95,6 +95,7 @@ async function updatePlugin (name) { } async function fix () { + console.log("Checking if there is a PR to make") for (const name of pluginNames) { await updatePlugin(name) generateMatrix(name) @@ -173,10 +174,12 @@ function splitting (element) { return +element.split('.')[0] } -if (process.argv.includes('fix')) // TODO: fix this parsing -{ fix(); -}else { - check(); - fix(); -} +check(); +fix(); +// if (process.argv.includes('fix')) // TODO: fix this parsing +// { fix(); +// }else { +// check(); +// fix(); +// } From 98f26d87714b34cd52de75e14ce14cb7e66a7b83 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 10:56:11 -0400 Subject: [PATCH 61/80] Add more logging --- scripts/outdated.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/outdated.js b/scripts/outdated.js index 7d14a3d4d58..b2c4ba6ec9b 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -102,9 +102,11 @@ async function fix () { } const result = execSync('git status').toString() + console.log(result) if (result.includes(matricesPath)) { const branchName = 'update_outdated_integrations' + console.log(branchName) try { execSync(`git checkout -b ${branchName}`) execSync(`git add ${matricesPath}`) From 5c98619f93355807ca78ed175165ac2957d702b8 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 11:09:26 -0400 Subject: [PATCH 62/80] wip --- scripts/outdated.js | 46 +++++++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index b2c4ba6ec9b..4d1c7915ee9 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -103,24 +103,38 @@ async function fix () { const result = execSync('git status').toString() console.log(result) - - if (result.includes(matricesPath)) { - const branchName = 'update_outdated_integrations' - console.log(branchName) - try { - execSync(`git checkout -b ${branchName}`) - execSync(`git add ${matricesPath}`) - execSync('git commit -m "fix: update integr latests.json"') - execSync(`git push origin ${branchName}`) - - makeAPR(branchName) - } catch (e) { - console.log('ERROR', e) - process.exitCode = 1 - } - } + const branchName = 'update_outdated_integrations' + +// TODO: add conditional +try { + execSync(`git checkout -b ${branchName}`) + execSync(`git add ${matricesPath}`) + execSync('git commit -m "fix: update latests.json"') + execSync(`git push origin ${branchName}`) + makeAPR(branchName) +} catch (e) { + console.log('ERROR', e) + process.exitCode = 1 +} } +// if (result.includes(matricesPath)) { +// const branchName = 'update_outdated_integrations' +// console.log(branchName) +// try { +// execSync(`git checkout -b ${branchName}`) +// execSync(`git add ${matricesPath}`) +// execSync('git commit -m "fix: update integr latests.json"') +// execSync(`git push origin ${branchName}`) + +// makeAPR(branchName) +// } catch (e) { +// console.log('ERROR', e) +// process.exitCode = 1 +// } +// } +// } + async function check () { for (const name of testNames) { const latest = latestsJson.latests[name] From d8a703e48b522f8ad9fa705bbb7f3d73ba9bb2df Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 11:14:36 -0400 Subject: [PATCH 63/80] add outdated integrations --- .github/workflows/outdated-integrations.yml | 13 +++++++++++++ scripts/outdated.js | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/outdated-integrations.yml b/.github/workflows/outdated-integrations.yml index 90019cfe809..d1c0b6c1a28 100644 --- a/.github/workflows/outdated-integrations.yml +++ b/.github/workflows/outdated-integrations.yml @@ -16,3 +16,16 @@ jobs: - uses: ./.github/actions/node/setup - run: yarn install - run: yarn outdated-integrations + - run: git diff + - name: Create Pull Request + id: pr + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: "update_outdated_integrations" + commit-message: "fix: update latests.json" + delete-branch: true + base: master + title: "chore: update latests.json" + labels: changelog/no-changelog + body: \ No newline at end of file diff --git a/scripts/outdated.js b/scripts/outdated.js index 4d1c7915ee9..79eea00c8fb 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -103,19 +103,6 @@ async function fix () { const result = execSync('git status').toString() console.log(result) - const branchName = 'update_outdated_integrations' - -// TODO: add conditional -try { - execSync(`git checkout -b ${branchName}`) - execSync(`git add ${matricesPath}`) - execSync('git commit -m "fix: update latests.json"') - execSync(`git push origin ${branchName}`) - makeAPR(branchName) -} catch (e) { - console.log('ERROR', e) - process.exitCode = 1 -} } // if (result.includes(matricesPath)) { From 4ed2c8503ab4305aa604354cbbaf5125f1e016d6 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 11:15:06 -0400 Subject: [PATCH 64/80] wip --- .github/workflows/outdated-integrations.yml | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/outdated-integrations.yml b/.github/workflows/outdated-integrations.yml index d1c0b6c1a28..46d87f1804a 100644 --- a/.github/workflows/outdated-integrations.yml +++ b/.github/workflows/outdated-integrations.yml @@ -17,15 +17,15 @@ jobs: - run: yarn install - run: yarn outdated-integrations - run: git diff - - name: Create Pull Request - id: pr - uses: peter-evans/create-pull-request@v6 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: "update_outdated_integrations" - commit-message: "fix: update latests.json" - delete-branch: true - base: master - title: "chore: update latests.json" - labels: changelog/no-changelog - body: \ No newline at end of file + # - name: Create Pull Request + # id: pr + # uses: peter-evans/create-pull-request@v6 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # branch: "update_outdated_integrations" + # commit-message: "fix: update latests.json" + # delete-branch: true + # base: master + # title: "chore: update latests.json" + # labels: changelog/no-changelog + # body: \ No newline at end of file From a8003103b30223ada93ddf571f443921eb722d9a Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 11:27:02 -0400 Subject: [PATCH 65/80] add integrations --- .github/workflows/outdated-integrations.yml | 3 + .../src/helpers/latests.json | 27 +++- .../src/helpers/matrices.json | 133 ++++++++++++++++++ scripts/outdated.js | 3 +- 4 files changed, 163 insertions(+), 3 deletions(-) diff --git a/.github/workflows/outdated-integrations.yml b/.github/workflows/outdated-integrations.yml index 46d87f1804a..22c1531e2b8 100644 --- a/.github/workflows/outdated-integrations.yml +++ b/.github/workflows/outdated-integrations.yml @@ -14,8 +14,11 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/node/setup + - run: yarn install + - run: yarn outdated-integrations + - run: git diff # - name: Create Pull Request # id: pr diff --git a/packages/datadog-instrumentations/src/helpers/latests.json b/packages/datadog-instrumentations/src/helpers/latests.json index 944ec56afd4..cdab194abb3 100644 --- a/packages/datadog-instrumentations/src/helpers/latests.json +++ b/packages/datadog-instrumentations/src/helpers/latests.json @@ -6,12 +6,37 @@ ], "latests": { "aerospike": "5.12.1", + "amqp10": "3.6.0", + "amqplib": "0.10.4", + "apollo-server-core": "3.13.0", + "@apollo/server": "4.11.0", + "@apollo/gateway": "2.9.1", + "@smithy/smithy-client": "3.3.2", + "@aws-sdk/smithy-client": "3.374.0", + "aws-sdk": "2.1691.0", + "bluebird": "3.7.2", + "body-parser": "1.20.3", + "bunyan": "1.8.15", "cassandra-driver": "4.7.2", + "connect": "3.7.0", + "cookie-parser": "1.4.6", + "cookie": "0.6.0", "couchbase": "4.4.1", + "@cucumber/cucumber": "11.0.1", "cypress": "13.14.2", "@elastic/transport": "8.7.1", "@elastic/elasticsearch": "8.15.0", - "elasticsearch": "16.7.3" + "elasticsearch": "16.7.3", + "express-mongo-sanitize": "2.2.0", + "express": "4.21.0", + "fastify": "5.0.0", + "find-my-way": "9.0.1", + "fs": "0.0.1-security", + "generic-pool": "3.9.0", + "@google-cloud/pubsub": "4.7.2", + "@graphql-tools/executor": "1.3.1", + "graphql": "16.9.0", + "@grpc/grpc-js": "1.11.3" }, "matrices": { "couchbase": { diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 44fa3772fdf..0391e02952b 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -23,12 +23,79 @@ "5.0.0 - 5.12.1" ] }, + "amqp10": { + "range": [ + "3.0.0 - 3.6.0" + ] + }, + "amqplib": { + "range": [ + "0.5.3 - 0.10.4" + ] + }, + "@apollo/gateway": { + "range": [ + "0.1.0 - 0.54.1", + "2.0.0 - 2.9.1" + ] + }, + "@aws-sdk/smithy-client": { + "range": [ + "3.0.0 - 3.374.0" + ] + }, + "aws-sdk": { + "range": [ + "2.1.35 - 2.1691.0" + ] + }, + "bluebird": { + "range": [ + "2.0.0 - 2.11.0", + "3.0.0 - 3.7.2" + ] + }, + "body-parser": { + "range": [ + "1.0.0 - 1.20.3" + ] + }, + "bunyan": { + "range": [ + "1.0.0 - 1.8.15" + ] + }, "cassandra-driver": { "range": [ "3.0.0 - 3.6.0", "4.0.0 - 4.7.2" ] }, + "connect": { + "range": [ + "2.0.0 - 2.30.2", + "3.0.0 - 3.7.0" + ] + }, + "cookie-parser": { + "range": [ + "1.0.0 - 1.4.6" + ] + }, + "cookie": { + "range": [ + "0.0.0 - 0.6.0" + ] + }, + "@cucumber/cucumber": { + "range": [ + "7.0.0 - 7.3.2", + "8.0.0 - 8.11.1", + "9.0.0 - 9.6.0", + "10.0.0 - 10.9.0", + "11.0.0 - 11.0.1" + ] + }, "cypress": { "range": [ "0.0.1 - 0.20.3", @@ -74,6 +141,72 @@ "15.0.0 - 15.5.0", "16.0.0 - 16.7.3" ] + }, + "express-mongo-sanitize": { + "range": [ + "1.0.0 - 1.3.2", + "2.0.0 - 2.2.0" + ] + }, + "express": { + "range": [ + "4.0.0 - 4.21.0" + ] + }, + "fastify": { + "range": [ + "1.0.0 - 1.14.6", + "2.0.0 - 2.15.3", + "3.0.0 - 3.29.5", + "4.0.0 - 4.28.1", + "5.0.0 - 5.0.0" + ] + }, + "find-my-way": { + "range": [ + "1.0.0 - 1.18.1", + "2.0.0 - 2.2.5", + "3.0.0 - 3.0.5", + "4.0.0 - 4.5.1", + "5.0.0 - 5.6.0", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.2.2", + "9.0.0 - 9.0.1" + ] + }, + "generic-pool": { + "range": [ + "2.0.0 - 2.5.4", + "3.0.0 - 3.9.0" + ] + }, + "@google-cloud/pubsub": { + "range": [ + "1.2.0 - 1.7.3", + "2.0.0 - 2.19.4", + "3.0.0 - 3.7.5", + "4.0.0 - 4.7.2" + ] + }, + "@graphql-tools/executor": { + "range": [ + "0.0.14 - 0.0.20", + "1.0.0 - 1.3.1" + ] + }, + "graphql": { + "range": [ + "0.10.0 - 0.13.2", + "14.0.0 - 14.7.0", + "15.0.0 - 15.9.0", + "16.0.0 - 16.9.0" + ] + }, + "@grpc/grpc-js": { + "range": [ + "1.0.3 - 1.11.3" + ] } } } \ No newline at end of file diff --git a/scripts/outdated.js b/scripts/outdated.js index 79eea00c8fb..57fa9c8ab6b 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -41,7 +41,6 @@ const versionsPath = path.join( const latestsJson = require(latestsPath) const internalsNames = Array.from(new Set(getInternals().map(n => n.name))).filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) -const testNames = ["aerospike", "cassandra-driver", 'couchbase', 'cypress', '@elastic/transport', '@elastic/elasticsearch', 'elasticsearch'] const matricesJson = require(matricesPath) const versionsJson = require(versionsPath) @@ -123,7 +122,7 @@ async function fix () { // } async function check () { - for (const name of testNames) { + for (const name of internalsNames) { const latest = latestsJson.latests[name] if (!latest) { console.log(`No latest version found for "${name}"`) From 013212fb1d9c598bbda9cd2be15b5159fe70c51d Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 13:32:31 -0400 Subject: [PATCH 66/80] add outdated? --- scripts/outdated.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 57fa9c8ab6b..8fb426adfde 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -132,9 +132,13 @@ async function check () { const npmLatest = distTags.latest if (npmLatest !== latest) { console.log(`"latests.json: is not up to date for "${name}": expected "${npmLatest}", got "${latest}"`) + outdated_integrations[name] = npmLatest // process.exitCode = 1 } } + console.log("Outdated:") + console.log(outdated_integrations) + // TODO: write this to latests } function minVersion (range) { @@ -176,12 +180,12 @@ function splitting (element) { return +element.split('.')[0] } +const outdated_integrations = {}; check(); fix(); // if (process.argv.includes('fix')) // TODO: fix this parsing // { fix(); // }else { // check(); -// fix(); // } From 7b7d0606add12b540c3cca182f1e97a42e3f7792 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 13:35:40 -0400 Subject: [PATCH 67/80] wip --- scripts/outdated.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 8fb426adfde..f1a9451729b 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -122,6 +122,7 @@ async function fix () { // } async function check () { + const outdated_integrations = {}; for (const name of internalsNames) { const latest = latestsJson.latests[name] if (!latest) { @@ -180,7 +181,6 @@ function splitting (element) { return +element.split('.')[0] } -const outdated_integrations = {}; check(); fix(); // if (process.argv.includes('fix')) // TODO: fix this parsing From 83d85838a295cbfbd4d8f103b1c0e010d3b91cc0 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 15:43:07 -0400 Subject: [PATCH 68/80] attempt to write latest? --- scripts/outdated.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index f1a9451729b..84e172fc3c4 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -8,6 +8,8 @@ const { execSync } = require('child_process') const yaml = require('js-yaml') const { generateMatrix } = require('./create_matrix') +const outdated_integrations = {}; + const latestsPath = path.join( __dirname, @@ -93,9 +95,24 @@ async function updatePlugin (name) { } } +function updateLatests(latestsPath) { + try { + const existingLatests = JSON.parse(fs.readFileSync(latestsPath, 'utf-8')); + + Object.assign(existingLatests.latests, outdated_integrations); + + // Write the updated data back to latests.json + fs.writeFileSync(latestsPath, JSON.stringify(existingLatests, null, 2)); + console.log('latests updated successfully.'); + } catch (error) { + console.error('Error updating latests.json:', error); + } +} + async function fix () { console.log("Checking if there is a PR to make") for (const name of pluginNames) { + updateLatests(latestsPath) await updatePlugin(name) generateMatrix(name) } @@ -122,7 +139,6 @@ async function fix () { // } async function check () { - const outdated_integrations = {}; for (const name of internalsNames) { const latest = latestsJson.latests[name] if (!latest) { @@ -133,9 +149,10 @@ async function check () { const npmLatest = distTags.latest if (npmLatest !== latest) { console.log(`"latests.json: is not up to date for "${name}": expected "${npmLatest}", got "${latest}"`) - outdated_integrations[name] = npmLatest // process.exitCode = 1 } + outdated_integrations[name] = npmLatest + } console.log("Outdated:") console.log(outdated_integrations) From 7120ae1182ae59a9920ec8821f13fd30e1692aa3 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 15:49:01 -0400 Subject: [PATCH 69/80] wip --- scripts/outdated.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 84e172fc3c4..ecd6d7079a1 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -110,9 +110,9 @@ function updateLatests(latestsPath) { } async function fix () { - console.log("Checking if there is a PR to make") + updateLatests(latestsPath) + console.log("Generating matrix..") for (const name of pluginNames) { - updateLatests(latestsPath) await updatePlugin(name) generateMatrix(name) } From 521759cc8457297419331131b04d6d770878e244 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Tue, 8 Oct 2024 15:55:51 -0400 Subject: [PATCH 70/80] expand and update --- .../src/helpers/latests.json | 67 ++- .../src/helpers/matrices.json | 414 ++++++++++++++++++ scripts/outdated.js | 5 +- 3 files changed, 481 insertions(+), 5 deletions(-) diff --git a/packages/datadog-instrumentations/src/helpers/latests.json b/packages/datadog-instrumentations/src/helpers/latests.json index cdab194abb3..3e30d1ae097 100644 --- a/packages/datadog-instrumentations/src/helpers/latests.json +++ b/packages/datadog-instrumentations/src/helpers/latests.json @@ -4,7 +4,7 @@ "@playwright/test", "redis" ], - "latests": { +"latests": { "aerospike": "5.12.1", "amqp10": "3.6.0", "amqplib": "0.10.4", @@ -36,7 +36,70 @@ "@google-cloud/pubsub": "4.7.2", "@graphql-tools/executor": "1.3.1", "graphql": "16.9.0", - "@grpc/grpc-js": "1.11.3" + "@grpc/grpc-js": "1.11.3", + "@hapi/hapi": "21.3.10", + "hapi": "18.1.0", + "ioredis": "5.4.1", + "jest-environment-node": "29.7.0", + "jest-environment-jsdom": "29.7.0", + "@jest/core": "29.7.0", + "@jest/test-sequencer": "29.7.0", + "@jest/reporters": "29.7.0", + "jest-circus": "29.7.0", + "@jest/transform": "29.7.0", + "jest-config": "29.7.0", + "jest-runtime": "29.7.0", + "jest-worker": "29.7.0", + "kafkajs": "2.2.4", + "knex": "3.1.0", + "koa": "2.15.3", + "@koa/router": "13.1.0", + "koa-router": "13.0.1", + "ldapjs": "3.0.7", + "limitd-client": "2.14.1", + "lodash": "4.17.21", + "mariadb": "3.3.2", + "memcached": "2.2.2", + "microgateway-core": "3.3.4", + "moleculer": "0.14.34", + "mongodb-core": "3.2.7", + "mongodb": "6.9.0", + "mongoose": "8.6.3", + "mquery": "5.0.0", + "mysql": "2.18.1", + "mysql2": "3.11.3", + "next": "14.2.12", + "nyc": "17.0.0", + "openai": "4.62.1", + "@opensearch-project/opensearch": "2.12.0", + "oracledb": "6.6.0", + "paperplane": "3.1.2", + "passport-http": "0.3.0", + "passport-local": "1.0.0", + "pg": "8.13.0", + "pino": "9.4.0", + "pino-pretty": "11.2.2", + "@playwright/test": "1.47.1", + "playwright": "1.47.1", + "promise-js": "0.0.7", + "promise": "8.3.0", + "q": "1.5.1", + "qs": "6.13.0", + "@node-redis/client": "1.0.6", + "@redis/client": "1.6.0", + "redis": "4.7.0", + "restify": "11.1.0", + "rhea": "3.0.2", + "router": "1.3.8", + "selenium-webdriver": "4.24.1", + "sequelize": "6.37.3", + "sharedb": "5.0.4", + "tedious": "18.6.1", + "undici": "6.19.8", + "vitest": "2.1.1", + "@vitest/runner": "2.1.1", + "when": "3.7.8", + "winston": "3.14.2" }, "matrices": { "couchbase": { diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json index 0391e02952b..098f36e2bc5 100644 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -207,6 +207,420 @@ "range": [ "1.0.3 - 1.11.3" ] + }, + "@hapi/hapi": { + "range": [ + "17.9.0 - 17.9.0", + "18.2.0 - 18.4.1", + "19.0.0 - 19.2.0", + "20.0.0 - 20.3.0", + "21.0.0 - 21.3.10" + ] + }, + "hapi": { + "range": [ + "16.0.0 - 16.8.4", + "17.0.0 - 17.8.5", + "18.0.0 - 18.1.0" + ] + }, + "ioredis": { + "range": [ + "2.0.0 - 2.5.0", + "3.0.0 - 3.2.2", + "4.0.0 - 4.28.5", + "5.0.0 - 5.4.1" + ] + }, + "jest-environment-node": { + "range": [ + "24.8.0 - 24.9.0", + "25.0.0 - 25.5.0", + "26.0.0 - 26.6.2", + "27.0.0 - 27.5.1", + "28.0.0 - 28.1.3", + "29.0.0 - 29.7.0" + ] + }, + "kafkajs": { + "range": [ + "1.4.0 - 1.16.0", + "2.0.0 - 2.2.4" + ] + }, + "knex": { + "range": [ + "0.8.0 - 0.95.15", + "1.0.0 - 1.0.7", + "2.0.0 - 2.5.1", + "3.0.0 - 3.1.0" + ] + }, + "koa": { + "range": [ + "2.0.0 - 2.15.3" + ] + }, + "@koa/router": { + "range": [ + "8.0.0 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.2", + "13.0.0 - 13.1.0" + ] + }, + "koa-router": { + "range": [ + "7.0.0 - 7.4.0", + "8.0.6 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.1", + "13.0.1 - 13.0.1" + ] + }, + "ldapjs": { + "range": [ + "0.1.0 - 0.8.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.3.3", + "3.0.0 - 3.0.7" + ] + }, + "limitd-client": { + "range": [ + "1.0.0 - 1.13.1", + "2.0.0 - 2.14.1" + ] + }, + "lodash": { + "range": [ + "0.1.0 - 0.10.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.10.1", + "4.0.0 - 4.17.21" + ] + }, + "mariadb": { + "range": [ + "3.0.0 - 3.3.2" + ] + }, + "memcached": { + "range": [ + "2.2.0 - 2.2.2" + ] + }, + "microgateway-core": { + "range": [ + "2.1.0 - 2.5.17", + "3.0.0 - 3.3.4" + ] + }, + "moleculer": { + "range": [ + "0.14.0 - 0.14.34" + ] + }, + "mongodb-core": { + "range": [ + "2.0.0 - 2.1.20", + "3.0.0 - 3.2.7" + ] + }, + "mongodb": { + "range": [ + "3.3.0 - 3.7.4", + "4.0.0 - 4.17.2", + "5.0.0 - 5.9.2", + "6.0.0 - 6.9.0" + ] + }, + "mongoose": { + "range": [ + "4.6.4 - 4.13.21", + "5.0.0 - 5.13.22", + "6.0.0 - 6.13.3", + "7.0.0 - 7.8.2", + "8.0.0 - 8.6.3" + ] + }, + "mquery": { + "range": [ + "0.0.1 - 0.9.0", + "1.0.0 - 1.11.0", + "2.0.0 - 2.3.3", + "3.0.0 - 3.2.5", + "4.0.0 - 4.0.3", + "5.0.0 - 5.0.0" + ] + }, + "mysql": { + "range": [ + "2.0.0 - 2.18.1" + ] + }, + "mysql2": { + "range": [ + "1.0.0 - 1.6.6", + "2.0.0 - 2.3.3", + "3.0.0 - 3.11.3" + ] + }, + "next": { + "range": [ + "9.5.0 - 9.5.5", + "10.0.0 - 10.2.3", + "11.0.0 - 11.1.4", + "12.0.0 - 12.3.4", + "13.0.0 - 13.5.7", + "14.0.0 - 14.2.13" + ] + }, + "openai": { + "range": [ + "3.0.0 - 3.3.0", + "4.0.0 - 4.64.0" + ] + }, + "@opensearch-project/opensearch": { + "range": [ + "1.0.0 - 1.2.0", + "2.0.0 - 2.12.0" + ] + }, + "oracledb": { + "range": [ + "5.0.0 - 5.5.0", + "6.0.0 - 6.6.0" + ] + }, + "paperplane": { + "range": [ + "2.3.0 - 2.3.2", + "3.0.0 - 3.1.2" + ] + }, + "passport-http": { + "range": [ + "0.1.0 - 0.3.0" + ] + }, + "passport-local": { + "range": [ + "0.1.0 - 0.1.6", + "1.0.0 - 1.0.0" + ] + }, + "pg": { + "range": [ + "4.0.0 - 4.5.7", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.2", + "7.0.0 - 7.18.2", + "8.0.0 - 8.13.0" + ] + }, + "pino": { + "range": [ + "2.0.0 - 2.16.0", + "3.0.0 - 3.4.0", + "4.0.0 - 4.17.6", + "5.0.0 - 5.17.0", + "6.0.0 - 6.14.0", + "7.0.0 - 7.11.0", + "8.0.0 - 8.21.0", + "9.0.0 - 9.4.0" + ] + }, + "pino-pretty": { + "range": [ + "1.0.0 - 1.0.1", + "2.0.0 - 2.6.1", + "3.0.0 - 3.6.1", + "4.0.0 - 4.8.0", + "5.0.0 - 5.1.3", + "6.0.0 - 6.0.0", + "7.0.0 - 7.6.1", + "8.0.0 - 8.1.0", + "9.0.0 - 9.4.1", + "10.0.0 - 10.3.1", + "11.0.0 - 11.2.2" + ] + }, + "@playwright/test": { + "range": [ + "0.0.0 - 0.1111.0", + "1.12.0 - 1.47.2" + ] + }, + "playwright": { + "range": [ + "0.0.0 - 0.18.0", + "1.0.0 - 1.47.2" + ] + }, + "promise-js": { + "range": [ + "0.0.3 - 0.0.7" + ] + }, + "promise": { + "range": [ + "7.0.0 - 7.3.1", + "8.0.0 - 8.3.0" + ] + }, + "q": { + "range": [ + "1.0.0 - 1.5.1" + ] + }, + "qs": { + "range": [ + "0.0.0 - 0.6.6", + "1.0.0 - 1.2.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.1.0", + "4.0.0 - 4.0.0", + "5.0.0 - 5.2.1", + "6.0.0 - 6.13.0" + ] + }, + "@node-redis/client": { + "range": [ + "1.0.0 - 1.0.6" + ] + }, + "@redis/client": { + "range": [ + "1.1.0 - 1.6.0" + ] + }, + "redis": { + "range": [ + "0.12.0 - 0.12.1", + "1.0.0 - 1.0.0", + "2.0.0 - 2.8.0", + "3.0.0 - 3.1.2", + "4.0.0 - 4.7.0" + ] + }, + "restify": { + "range": [ + "3.0.0 - 3.0.3", + "4.0.0 - 4.3.4", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.6.1", + "9.0.0 - 9.1.0", + "10.0.0 - 10.0.0", + "11.0.0 - 11.1.0" + ] + }, + "rhea": { + "range": [ + "1.0.0 - 1.0.24", + "2.0.0 - 2.0.8", + "3.0.0 - 3.0.3" + ] + }, + "router": { + "range": [ + "0.2.1 - 0.6.2", + "1.0.0 - 1.3.8" + ] + }, + "selenium-webdriver": { + "range": [ + "2.29.0 - 2.53.3", + "3.0.0 - 3.6.0", + "4.0.0 - 4.25.0" + ] + }, + "sequelize": { + "range": [ + "0.0.0 - 0.4.3", + "1.0.0 - 1.7.11", + "2.0.0 - 2.1.3", + "3.0.0 - 3.35.1", + "4.0.0 - 4.44.4", + "5.1.0 - 5.22.5", + "6.1.0 - 6.37.3" + ] + }, + "sharedb": { + "range": [ + "1.0.0 - 1.9.2", + "2.0.0 - 2.2.6", + "3.0.0 - 3.3.2", + "4.0.0 - 4.1.5", + "5.0.0 - 5.0.4" + ] + }, + "tedious": { + "range": [ + "1.0.0 - 1.15.0", + "2.0.0 - 2.7.1", + "3.0.0 - 3.0.1", + "4.0.0 - 4.2.0", + "5.0.0 - 5.0.3", + "6.0.0 - 6.7.1", + "7.0.0 - 7.0.0", + "8.0.0 - 8.3.1", + "9.0.0 - 9.2.3", + "10.0.0 - 10.0.0", + "11.0.0 - 11.8.0", + "12.0.0 - 12.3.0", + "13.0.0 - 13.2.0", + "14.0.0 - 14.7.0", + "15.0.0 - 15.1.3", + "16.0.0 - 16.7.1", + "17.0.0 - 17.0.0", + "18.0.0 - 18.6.2" + ] + }, + "undici": { + "range": [ + "0.1.0 - 0.5.0", + "1.0.0 - 1.3.1", + "2.0.0 - 2.2.1", + "3.0.0 - 3.3.6", + "4.0.0 - 4.16.0", + "5.0.0 - 5.28.4", + "6.0.0 - 6.19.8" + ] + }, + "vitest": { + "range": [ + "0.0.0 - 0.34.6", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "@vitest/runner": { + "range": [ + "0.28.0 - 0.34.7", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "when": { + "range": [ + "3.0.0 - 3.7.8" + ] + }, + "winston": { + "range": [ + "1.0.0 - 1.1.2", + "2.0.0 - 2.4.7", + "3.0.0 - 3.14.2" + ] } } } \ No newline at end of file diff --git a/scripts/outdated.js b/scripts/outdated.js index ecd6d7079a1..e89abb4bbe3 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -98,8 +98,8 @@ async function updatePlugin (name) { function updateLatests(latestsPath) { try { const existingLatests = JSON.parse(fs.readFileSync(latestsPath, 'utf-8')); - - Object.assign(existingLatests.latests, outdated_integrations); + console.log(existingLatests["latests"]) + Object.assign(existingLatests["latests"], outdated_integrations); // Write the updated data back to latests.json fs.writeFileSync(latestsPath, JSON.stringify(existingLatests, null, 2)); @@ -116,7 +116,6 @@ async function fix () { await updatePlugin(name) generateMatrix(name) } - const result = execSync('git status').toString() console.log(result) } From f9913bf8c5ef0c96a7b8357d96e84d45cd6d67d9 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 15:29:09 -0400 Subject: [PATCH 71/80] update script --- scripts/outdated.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index e89abb4bbe3..877165332f6 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -98,7 +98,8 @@ async function updatePlugin (name) { function updateLatests(latestsPath) { try { const existingLatests = JSON.parse(fs.readFileSync(latestsPath, 'utf-8')); - console.log(existingLatests["latests"]) + // console.log(existingLatests["latests"]) + console.log(outdated_integrations) Object.assign(existingLatests["latests"], outdated_integrations); // Write the updated data back to latests.json @@ -153,8 +154,6 @@ async function check () { outdated_integrations[name] = npmLatest } - console.log("Outdated:") - console.log(outdated_integrations) // TODO: write this to latests } From 8aefad08e12a6b1030e920386344846370caacc0 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 15:35:24 -0400 Subject: [PATCH 72/80] wip --- scripts/outdated.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 877165332f6..8fbfa762711 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -8,8 +8,7 @@ const { execSync } = require('child_process') const yaml = require('js-yaml') const { generateMatrix } = require('./create_matrix') -const outdated_integrations = {}; - +let outdated_integrations = {}; const latestsPath = path.join( __dirname, @@ -152,6 +151,7 @@ async function check () { // process.exitCode = 1 } outdated_integrations[name] = npmLatest + console.log(outdated_integrations) } // TODO: write this to latests From aac59086621da55ef7182856abe340dc2c3d155a Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 15:37:18 -0400 Subject: [PATCH 73/80] wip --- scripts/outdated.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 8fbfa762711..c764a4f980a 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -151,10 +151,10 @@ async function check () { // process.exitCode = 1 } outdated_integrations[name] = npmLatest - console.log(outdated_integrations) - } // TODO: write this to latests + console.log(outdated_integrations) + } function minVersion (range) { From a65eeba0a26308cf427af5561953fbce185ab4c0 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 15:39:44 -0400 Subject: [PATCH 74/80] wip --- scripts/outdated.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index c764a4f980a..8f3f2dd7adb 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -110,8 +110,9 @@ function updateLatests(latestsPath) { } async function fix () { - updateLatests(latestsPath) - console.log("Generating matrix..") + await check(); + updateLatests(latestsPath); + console.log("Generating matrix.."); for (const name of pluginNames) { await updatePlugin(name) generateMatrix(name) @@ -196,7 +197,6 @@ function splitting (element) { return +element.split('.')[0] } -check(); fix(); // if (process.argv.includes('fix')) // TODO: fix this parsing // { fix(); From add1936d0e589bb7d43437c5a52109a4fbabf78d Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 15:42:39 -0400 Subject: [PATCH 75/80] wip --- scripts/outdated.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 8f3f2dd7adb..3d7de75915c 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -98,7 +98,7 @@ function updateLatests(latestsPath) { try { const existingLatests = JSON.parse(fs.readFileSync(latestsPath, 'utf-8')); // console.log(existingLatests["latests"]) - console.log(outdated_integrations) + // console.log(outdated_integrations) Object.assign(existingLatests["latests"], outdated_integrations); // Write the updated data back to latests.json @@ -154,7 +154,7 @@ async function check () { outdated_integrations[name] = npmLatest } // TODO: write this to latests - console.log(outdated_integrations) + // console.log(outdated_integrations) } From 83820a38d0b43f7dbafde080a313f867105cf94d Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 15:52:14 -0400 Subject: [PATCH 76/80] wip --- scripts/outdated.js | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index 3d7de75915c..fdadb7279a1 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -49,12 +49,6 @@ const pluginNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matrice // TODO A lot of this can be optimized by using `npm outdated`. -function makeAPR (branchName) { - const title = 'Fix: Update Outdated Versions' - const body = 'Checking for and updating outdated integration versions' - execSync(`gh pr create --title ${title} --body ${body} --base master --head ${branchName} `) -} - function maxVersion (range) { if (typeof range === 'string') { return range @@ -97,65 +91,38 @@ async function updatePlugin (name) { function updateLatests(latestsPath) { try { const existingLatests = JSON.parse(fs.readFileSync(latestsPath, 'utf-8')); - // console.log(existingLatests["latests"]) - // console.log(outdated_integrations) Object.assign(existingLatests["latests"], outdated_integrations); // Write the updated data back to latests.json fs.writeFileSync(latestsPath, JSON.stringify(existingLatests, null, 2)); - console.log('latests updated successfully.'); } catch (error) { - console.error('Error updating latests.json:', error); + console.error('Error updating latests.json: ', error); } } async function fix () { await check(); updateLatests(latestsPath); - console.log("Generating matrix.."); for (const name of pluginNames) { await updatePlugin(name) generateMatrix(name) } - const result = execSync('git status').toString() - console.log(result) } -// if (result.includes(matricesPath)) { -// const branchName = 'update_outdated_integrations' -// console.log(branchName) -// try { -// execSync(`git checkout -b ${branchName}`) -// execSync(`git add ${matricesPath}`) -// execSync('git commit -m "fix: update integr latests.json"') -// execSync(`git push origin ${branchName}`) - -// makeAPR(branchName) -// } catch (e) { -// console.log('ERROR', e) -// process.exitCode = 1 -// } -// } -// } async function check () { for (const name of internalsNames) { const latest = latestsJson.latests[name] if (!latest) { console.log(`No latest version found for "${name}"`) - // process.exitCode = 1 } const distTags = await npmView(name + ' dist-tags') const npmLatest = distTags.latest if (npmLatest !== latest) { console.log(`"latests.json: is not up to date for "${name}": expected "${npmLatest}", got "${latest}"`) - // process.exitCode = 1 } outdated_integrations[name] = npmLatest } - // TODO: write this to latests - // console.log(outdated_integrations) - } function minVersion (range) { @@ -198,9 +165,4 @@ function splitting (element) { } fix(); -// if (process.argv.includes('fix')) // TODO: fix this parsing -// { fix(); -// }else { -// check(); -// } From e2ba00963cae40e4394caa2aaff65e49dc5f758e Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 15:55:07 -0400 Subject: [PATCH 77/80] update matrices.json? --- scripts/outdated.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/outdated.js b/scripts/outdated.js index fdadb7279a1..2776288085d 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -73,6 +73,8 @@ async function loopRange (name, range) { range[ele] = `${latest[0]} - ${latest[1]}` } fs.writeFileSync(versionsPath, JSON.stringify(versionsJson, null, 2)) + fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) + } async function updatePlugin (name) { From 31370dd1b939cb141b819a2d3656316911176739 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 16:11:23 -0400 Subject: [PATCH 78/80] remove matrices.json --- .../src/helpers/matrices.json | 626 ------------------ scripts/outdated.js | 2 - 2 files changed, 628 deletions(-) delete mode 100644 packages/datadog-instrumentations/src/helpers/matrices.json diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json deleted file mode 100644 index 098f36e2bc5..00000000000 --- a/packages/datadog-instrumentations/src/helpers/matrices.json +++ /dev/null @@ -1,626 +0,0 @@ -{ - "matrices": { - "couchbase": { - "node-version": [ - 16 - ], - "range": [ - "2.4.2 - 2.6.12", - "3.0.0 - 3.0.5", - "3.0.7 - 3.2.7", - "4.0.0 - 4.4.2" - ], - "include": [ - { - "node-version": 18, - "range": "4.4.1 - 4.4.2" - } - ] - }, - "aerospike": { - "range": [ - "4.0.0 - 4.0.5", - "5.0.0 - 5.12.1" - ] - }, - "amqp10": { - "range": [ - "3.0.0 - 3.6.0" - ] - }, - "amqplib": { - "range": [ - "0.5.3 - 0.10.4" - ] - }, - "@apollo/gateway": { - "range": [ - "0.1.0 - 0.54.1", - "2.0.0 - 2.9.1" - ] - }, - "@aws-sdk/smithy-client": { - "range": [ - "3.0.0 - 3.374.0" - ] - }, - "aws-sdk": { - "range": [ - "2.1.35 - 2.1691.0" - ] - }, - "bluebird": { - "range": [ - "2.0.0 - 2.11.0", - "3.0.0 - 3.7.2" - ] - }, - "body-parser": { - "range": [ - "1.0.0 - 1.20.3" - ] - }, - "bunyan": { - "range": [ - "1.0.0 - 1.8.15" - ] - }, - "cassandra-driver": { - "range": [ - "3.0.0 - 3.6.0", - "4.0.0 - 4.7.2" - ] - }, - "connect": { - "range": [ - "2.0.0 - 2.30.2", - "3.0.0 - 3.7.0" - ] - }, - "cookie-parser": { - "range": [ - "1.0.0 - 1.4.6" - ] - }, - "cookie": { - "range": [ - "0.0.0 - 0.6.0" - ] - }, - "@cucumber/cucumber": { - "range": [ - "7.0.0 - 7.3.2", - "8.0.0 - 8.11.1", - "9.0.0 - 9.6.0", - "10.0.0 - 10.9.0", - "11.0.0 - 11.0.1" - ] - }, - "cypress": { - "range": [ - "0.0.1 - 0.20.3", - "1.0.0 - 1.4.2", - "2.0.0 - 2.1.0", - "3.0.0 - 3.8.3", - "4.0.0 - 4.12.1", - "5.0.0 - 5.6.0", - "6.0.0 - 6.9.1", - "7.0.0 - 7.7.0", - "8.0.0 - 8.7.0", - "9.0.0 - 9.7.0", - "10.0.0 - 10.11.0", - "11.0.0 - 11.2.0", - "12.0.0 - 12.17.4", - "13.0.0 - 13.14.2" - ] - }, - "@elastic/elasticsearch": { - "range": [ - "5.6.16 - 5.6.22", - "6.7.0 - 6.8.8", - "7.0.0 - 7.17.14", - "8.0.0 - 8.14.1" - ] - }, - "elasticsearch": { - "range": [ - "0.2.0 - 0.3.9", - "1.0.0 - 1.5.14", - "2.0.0 - 2.4.3", - "3.0.0 - 3.1.4", - "4.0.0 - 4.1.0", - "5.0.0 - 5.0.0", - "6.0.0 - 6.1.0", - "8.0.1 - 8.2.0", - "9.0.0 - 9.0.2", - "10.0.0 - 10.1.3", - "11.0.0 - 11.0.1", - "12.0.0 - 12.1.3", - "13.0.0 - 13.3.1", - "14.0.0 - 14.2.2", - "15.0.0 - 15.5.0", - "16.0.0 - 16.7.3" - ] - }, - "express-mongo-sanitize": { - "range": [ - "1.0.0 - 1.3.2", - "2.0.0 - 2.2.0" - ] - }, - "express": { - "range": [ - "4.0.0 - 4.21.0" - ] - }, - "fastify": { - "range": [ - "1.0.0 - 1.14.6", - "2.0.0 - 2.15.3", - "3.0.0 - 3.29.5", - "4.0.0 - 4.28.1", - "5.0.0 - 5.0.0" - ] - }, - "find-my-way": { - "range": [ - "1.0.0 - 1.18.1", - "2.0.0 - 2.2.5", - "3.0.0 - 3.0.5", - "4.0.0 - 4.5.1", - "5.0.0 - 5.6.0", - "6.0.0 - 6.4.0", - "7.0.0 - 7.7.0", - "8.0.0 - 8.2.2", - "9.0.0 - 9.0.1" - ] - }, - "generic-pool": { - "range": [ - "2.0.0 - 2.5.4", - "3.0.0 - 3.9.0" - ] - }, - "@google-cloud/pubsub": { - "range": [ - "1.2.0 - 1.7.3", - "2.0.0 - 2.19.4", - "3.0.0 - 3.7.5", - "4.0.0 - 4.7.2" - ] - }, - "@graphql-tools/executor": { - "range": [ - "0.0.14 - 0.0.20", - "1.0.0 - 1.3.1" - ] - }, - "graphql": { - "range": [ - "0.10.0 - 0.13.2", - "14.0.0 - 14.7.0", - "15.0.0 - 15.9.0", - "16.0.0 - 16.9.0" - ] - }, - "@grpc/grpc-js": { - "range": [ - "1.0.3 - 1.11.3" - ] - }, - "@hapi/hapi": { - "range": [ - "17.9.0 - 17.9.0", - "18.2.0 - 18.4.1", - "19.0.0 - 19.2.0", - "20.0.0 - 20.3.0", - "21.0.0 - 21.3.10" - ] - }, - "hapi": { - "range": [ - "16.0.0 - 16.8.4", - "17.0.0 - 17.8.5", - "18.0.0 - 18.1.0" - ] - }, - "ioredis": { - "range": [ - "2.0.0 - 2.5.0", - "3.0.0 - 3.2.2", - "4.0.0 - 4.28.5", - "5.0.0 - 5.4.1" - ] - }, - "jest-environment-node": { - "range": [ - "24.8.0 - 24.9.0", - "25.0.0 - 25.5.0", - "26.0.0 - 26.6.2", - "27.0.0 - 27.5.1", - "28.0.0 - 28.1.3", - "29.0.0 - 29.7.0" - ] - }, - "kafkajs": { - "range": [ - "1.4.0 - 1.16.0", - "2.0.0 - 2.2.4" - ] - }, - "knex": { - "range": [ - "0.8.0 - 0.95.15", - "1.0.0 - 1.0.7", - "2.0.0 - 2.5.1", - "3.0.0 - 3.1.0" - ] - }, - "koa": { - "range": [ - "2.0.0 - 2.15.3" - ] - }, - "@koa/router": { - "range": [ - "8.0.0 - 8.0.8", - "9.0.1 - 9.4.0", - "10.0.0 - 10.1.1", - "11.0.0 - 11.0.2", - "12.0.0 - 12.0.2", - "13.0.0 - 13.1.0" - ] - }, - "koa-router": { - "range": [ - "7.0.0 - 7.4.0", - "8.0.6 - 8.0.8", - "9.0.1 - 9.4.0", - "10.0.0 - 10.1.1", - "11.0.0 - 11.0.2", - "12.0.0 - 12.0.1", - "13.0.1 - 13.0.1" - ] - }, - "ldapjs": { - "range": [ - "0.1.0 - 0.8.0", - "1.0.0 - 1.0.2", - "2.0.0 - 2.3.3", - "3.0.0 - 3.0.7" - ] - }, - "limitd-client": { - "range": [ - "1.0.0 - 1.13.1", - "2.0.0 - 2.14.1" - ] - }, - "lodash": { - "range": [ - "0.1.0 - 0.10.0", - "1.0.0 - 1.0.2", - "2.0.0 - 2.4.2", - "3.0.0 - 3.10.1", - "4.0.0 - 4.17.21" - ] - }, - "mariadb": { - "range": [ - "3.0.0 - 3.3.2" - ] - }, - "memcached": { - "range": [ - "2.2.0 - 2.2.2" - ] - }, - "microgateway-core": { - "range": [ - "2.1.0 - 2.5.17", - "3.0.0 - 3.3.4" - ] - }, - "moleculer": { - "range": [ - "0.14.0 - 0.14.34" - ] - }, - "mongodb-core": { - "range": [ - "2.0.0 - 2.1.20", - "3.0.0 - 3.2.7" - ] - }, - "mongodb": { - "range": [ - "3.3.0 - 3.7.4", - "4.0.0 - 4.17.2", - "5.0.0 - 5.9.2", - "6.0.0 - 6.9.0" - ] - }, - "mongoose": { - "range": [ - "4.6.4 - 4.13.21", - "5.0.0 - 5.13.22", - "6.0.0 - 6.13.3", - "7.0.0 - 7.8.2", - "8.0.0 - 8.6.3" - ] - }, - "mquery": { - "range": [ - "0.0.1 - 0.9.0", - "1.0.0 - 1.11.0", - "2.0.0 - 2.3.3", - "3.0.0 - 3.2.5", - "4.0.0 - 4.0.3", - "5.0.0 - 5.0.0" - ] - }, - "mysql": { - "range": [ - "2.0.0 - 2.18.1" - ] - }, - "mysql2": { - "range": [ - "1.0.0 - 1.6.6", - "2.0.0 - 2.3.3", - "3.0.0 - 3.11.3" - ] - }, - "next": { - "range": [ - "9.5.0 - 9.5.5", - "10.0.0 - 10.2.3", - "11.0.0 - 11.1.4", - "12.0.0 - 12.3.4", - "13.0.0 - 13.5.7", - "14.0.0 - 14.2.13" - ] - }, - "openai": { - "range": [ - "3.0.0 - 3.3.0", - "4.0.0 - 4.64.0" - ] - }, - "@opensearch-project/opensearch": { - "range": [ - "1.0.0 - 1.2.0", - "2.0.0 - 2.12.0" - ] - }, - "oracledb": { - "range": [ - "5.0.0 - 5.5.0", - "6.0.0 - 6.6.0" - ] - }, - "paperplane": { - "range": [ - "2.3.0 - 2.3.2", - "3.0.0 - 3.1.2" - ] - }, - "passport-http": { - "range": [ - "0.1.0 - 0.3.0" - ] - }, - "passport-local": { - "range": [ - "0.1.0 - 0.1.6", - "1.0.0 - 1.0.0" - ] - }, - "pg": { - "range": [ - "4.0.0 - 4.5.7", - "5.0.0 - 5.2.1", - "6.0.0 - 6.4.2", - "7.0.0 - 7.18.2", - "8.0.0 - 8.13.0" - ] - }, - "pino": { - "range": [ - "2.0.0 - 2.16.0", - "3.0.0 - 3.4.0", - "4.0.0 - 4.17.6", - "5.0.0 - 5.17.0", - "6.0.0 - 6.14.0", - "7.0.0 - 7.11.0", - "8.0.0 - 8.21.0", - "9.0.0 - 9.4.0" - ] - }, - "pino-pretty": { - "range": [ - "1.0.0 - 1.0.1", - "2.0.0 - 2.6.1", - "3.0.0 - 3.6.1", - "4.0.0 - 4.8.0", - "5.0.0 - 5.1.3", - "6.0.0 - 6.0.0", - "7.0.0 - 7.6.1", - "8.0.0 - 8.1.0", - "9.0.0 - 9.4.1", - "10.0.0 - 10.3.1", - "11.0.0 - 11.2.2" - ] - }, - "@playwright/test": { - "range": [ - "0.0.0 - 0.1111.0", - "1.12.0 - 1.47.2" - ] - }, - "playwright": { - "range": [ - "0.0.0 - 0.18.0", - "1.0.0 - 1.47.2" - ] - }, - "promise-js": { - "range": [ - "0.0.3 - 0.0.7" - ] - }, - "promise": { - "range": [ - "7.0.0 - 7.3.1", - "8.0.0 - 8.3.0" - ] - }, - "q": { - "range": [ - "1.0.0 - 1.5.1" - ] - }, - "qs": { - "range": [ - "0.0.0 - 0.6.6", - "1.0.0 - 1.2.2", - "2.0.0 - 2.4.2", - "3.0.0 - 3.1.0", - "4.0.0 - 4.0.0", - "5.0.0 - 5.2.1", - "6.0.0 - 6.13.0" - ] - }, - "@node-redis/client": { - "range": [ - "1.0.0 - 1.0.6" - ] - }, - "@redis/client": { - "range": [ - "1.1.0 - 1.6.0" - ] - }, - "redis": { - "range": [ - "0.12.0 - 0.12.1", - "1.0.0 - 1.0.0", - "2.0.0 - 2.8.0", - "3.0.0 - 3.1.2", - "4.0.0 - 4.7.0" - ] - }, - "restify": { - "range": [ - "3.0.0 - 3.0.3", - "4.0.0 - 4.3.4", - "5.0.0 - 5.2.1", - "6.0.0 - 6.4.0", - "7.0.0 - 7.7.0", - "8.0.0 - 8.6.1", - "9.0.0 - 9.1.0", - "10.0.0 - 10.0.0", - "11.0.0 - 11.1.0" - ] - }, - "rhea": { - "range": [ - "1.0.0 - 1.0.24", - "2.0.0 - 2.0.8", - "3.0.0 - 3.0.3" - ] - }, - "router": { - "range": [ - "0.2.1 - 0.6.2", - "1.0.0 - 1.3.8" - ] - }, - "selenium-webdriver": { - "range": [ - "2.29.0 - 2.53.3", - "3.0.0 - 3.6.0", - "4.0.0 - 4.25.0" - ] - }, - "sequelize": { - "range": [ - "0.0.0 - 0.4.3", - "1.0.0 - 1.7.11", - "2.0.0 - 2.1.3", - "3.0.0 - 3.35.1", - "4.0.0 - 4.44.4", - "5.1.0 - 5.22.5", - "6.1.0 - 6.37.3" - ] - }, - "sharedb": { - "range": [ - "1.0.0 - 1.9.2", - "2.0.0 - 2.2.6", - "3.0.0 - 3.3.2", - "4.0.0 - 4.1.5", - "5.0.0 - 5.0.4" - ] - }, - "tedious": { - "range": [ - "1.0.0 - 1.15.0", - "2.0.0 - 2.7.1", - "3.0.0 - 3.0.1", - "4.0.0 - 4.2.0", - "5.0.0 - 5.0.3", - "6.0.0 - 6.7.1", - "7.0.0 - 7.0.0", - "8.0.0 - 8.3.1", - "9.0.0 - 9.2.3", - "10.0.0 - 10.0.0", - "11.0.0 - 11.8.0", - "12.0.0 - 12.3.0", - "13.0.0 - 13.2.0", - "14.0.0 - 14.7.0", - "15.0.0 - 15.1.3", - "16.0.0 - 16.7.1", - "17.0.0 - 17.0.0", - "18.0.0 - 18.6.2" - ] - }, - "undici": { - "range": [ - "0.1.0 - 0.5.0", - "1.0.0 - 1.3.1", - "2.0.0 - 2.2.1", - "3.0.0 - 3.3.6", - "4.0.0 - 4.16.0", - "5.0.0 - 5.28.4", - "6.0.0 - 6.19.8" - ] - }, - "vitest": { - "range": [ - "0.0.0 - 0.34.6", - "1.0.0 - 1.6.0", - "2.0.0 - 2.1.1" - ] - }, - "@vitest/runner": { - "range": [ - "0.28.0 - 0.34.7", - "1.0.0 - 1.6.0", - "2.0.0 - 2.1.1" - ] - }, - "when": { - "range": [ - "3.0.0 - 3.7.8" - ] - }, - "winston": { - "range": [ - "1.0.0 - 1.1.2", - "2.0.0 - 2.4.7", - "3.0.0 - 3.14.2" - ] - } - } -} \ No newline at end of file diff --git a/scripts/outdated.js b/scripts/outdated.js index 2776288085d..fdadb7279a1 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -73,8 +73,6 @@ async function loopRange (name, range) { range[ele] = `${latest[0]} - ${latest[1]}` } fs.writeFileSync(versionsPath, JSON.stringify(versionsJson, null, 2)) - fs.writeFileSync(matricesPath, JSON.stringify(matricesJson, null, 2)) - } async function updatePlugin (name) { From c8d8b9e61ece71291b37fcb7fe0d4c57d2ea0b8d Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 16:15:07 -0400 Subject: [PATCH 79/80] wip --- scripts/outdated.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/outdated.js b/scripts/outdated.js index fdadb7279a1..c8435eb6bdb 100644 --- a/scripts/outdated.js +++ b/scripts/outdated.js @@ -43,7 +43,7 @@ const versionsPath = path.join( const latestsJson = require(latestsPath) const internalsNames = Array.from(new Set(getInternals().map(n => n.name))).filter(x => typeof x === 'string' && x !== 'child_process' && !x.startsWith('node:')) -const matricesJson = require(matricesPath) +// const matricesJson = require(matricesPath) const versionsJson = require(versionsPath) const pluginNames = Object.getOwnPropertyNames(yaml.load(fs.readFileSync(matricesPath, 'utf-8')).matrices) From 4a0d44c1c9ebed67dc7069002b86eaeca4d34b62 Mon Sep 17 00:00:00 2001 From: quinna-h Date: Wed, 23 Oct 2024 16:19:20 -0400 Subject: [PATCH 80/80] add matrices.json back to make yarn happy --- .../src/helpers/matrices.json | 626 ++++++++++++++++++ 1 file changed, 626 insertions(+) create mode 100644 packages/datadog-instrumentations/src/helpers/matrices.json diff --git a/packages/datadog-instrumentations/src/helpers/matrices.json b/packages/datadog-instrumentations/src/helpers/matrices.json new file mode 100644 index 00000000000..098f36e2bc5 --- /dev/null +++ b/packages/datadog-instrumentations/src/helpers/matrices.json @@ -0,0 +1,626 @@ +{ + "matrices": { + "couchbase": { + "node-version": [ + 16 + ], + "range": [ + "2.4.2 - 2.6.12", + "3.0.0 - 3.0.5", + "3.0.7 - 3.2.7", + "4.0.0 - 4.4.2" + ], + "include": [ + { + "node-version": 18, + "range": "4.4.1 - 4.4.2" + } + ] + }, + "aerospike": { + "range": [ + "4.0.0 - 4.0.5", + "5.0.0 - 5.12.1" + ] + }, + "amqp10": { + "range": [ + "3.0.0 - 3.6.0" + ] + }, + "amqplib": { + "range": [ + "0.5.3 - 0.10.4" + ] + }, + "@apollo/gateway": { + "range": [ + "0.1.0 - 0.54.1", + "2.0.0 - 2.9.1" + ] + }, + "@aws-sdk/smithy-client": { + "range": [ + "3.0.0 - 3.374.0" + ] + }, + "aws-sdk": { + "range": [ + "2.1.35 - 2.1691.0" + ] + }, + "bluebird": { + "range": [ + "2.0.0 - 2.11.0", + "3.0.0 - 3.7.2" + ] + }, + "body-parser": { + "range": [ + "1.0.0 - 1.20.3" + ] + }, + "bunyan": { + "range": [ + "1.0.0 - 1.8.15" + ] + }, + "cassandra-driver": { + "range": [ + "3.0.0 - 3.6.0", + "4.0.0 - 4.7.2" + ] + }, + "connect": { + "range": [ + "2.0.0 - 2.30.2", + "3.0.0 - 3.7.0" + ] + }, + "cookie-parser": { + "range": [ + "1.0.0 - 1.4.6" + ] + }, + "cookie": { + "range": [ + "0.0.0 - 0.6.0" + ] + }, + "@cucumber/cucumber": { + "range": [ + "7.0.0 - 7.3.2", + "8.0.0 - 8.11.1", + "9.0.0 - 9.6.0", + "10.0.0 - 10.9.0", + "11.0.0 - 11.0.1" + ] + }, + "cypress": { + "range": [ + "0.0.1 - 0.20.3", + "1.0.0 - 1.4.2", + "2.0.0 - 2.1.0", + "3.0.0 - 3.8.3", + "4.0.0 - 4.12.1", + "5.0.0 - 5.6.0", + "6.0.0 - 6.9.1", + "7.0.0 - 7.7.0", + "8.0.0 - 8.7.0", + "9.0.0 - 9.7.0", + "10.0.0 - 10.11.0", + "11.0.0 - 11.2.0", + "12.0.0 - 12.17.4", + "13.0.0 - 13.14.2" + ] + }, + "@elastic/elasticsearch": { + "range": [ + "5.6.16 - 5.6.22", + "6.7.0 - 6.8.8", + "7.0.0 - 7.17.14", + "8.0.0 - 8.14.1" + ] + }, + "elasticsearch": { + "range": [ + "0.2.0 - 0.3.9", + "1.0.0 - 1.5.14", + "2.0.0 - 2.4.3", + "3.0.0 - 3.1.4", + "4.0.0 - 4.1.0", + "5.0.0 - 5.0.0", + "6.0.0 - 6.1.0", + "8.0.1 - 8.2.0", + "9.0.0 - 9.0.2", + "10.0.0 - 10.1.3", + "11.0.0 - 11.0.1", + "12.0.0 - 12.1.3", + "13.0.0 - 13.3.1", + "14.0.0 - 14.2.2", + "15.0.0 - 15.5.0", + "16.0.0 - 16.7.3" + ] + }, + "express-mongo-sanitize": { + "range": [ + "1.0.0 - 1.3.2", + "2.0.0 - 2.2.0" + ] + }, + "express": { + "range": [ + "4.0.0 - 4.21.0" + ] + }, + "fastify": { + "range": [ + "1.0.0 - 1.14.6", + "2.0.0 - 2.15.3", + "3.0.0 - 3.29.5", + "4.0.0 - 4.28.1", + "5.0.0 - 5.0.0" + ] + }, + "find-my-way": { + "range": [ + "1.0.0 - 1.18.1", + "2.0.0 - 2.2.5", + "3.0.0 - 3.0.5", + "4.0.0 - 4.5.1", + "5.0.0 - 5.6.0", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.2.2", + "9.0.0 - 9.0.1" + ] + }, + "generic-pool": { + "range": [ + "2.0.0 - 2.5.4", + "3.0.0 - 3.9.0" + ] + }, + "@google-cloud/pubsub": { + "range": [ + "1.2.0 - 1.7.3", + "2.0.0 - 2.19.4", + "3.0.0 - 3.7.5", + "4.0.0 - 4.7.2" + ] + }, + "@graphql-tools/executor": { + "range": [ + "0.0.14 - 0.0.20", + "1.0.0 - 1.3.1" + ] + }, + "graphql": { + "range": [ + "0.10.0 - 0.13.2", + "14.0.0 - 14.7.0", + "15.0.0 - 15.9.0", + "16.0.0 - 16.9.0" + ] + }, + "@grpc/grpc-js": { + "range": [ + "1.0.3 - 1.11.3" + ] + }, + "@hapi/hapi": { + "range": [ + "17.9.0 - 17.9.0", + "18.2.0 - 18.4.1", + "19.0.0 - 19.2.0", + "20.0.0 - 20.3.0", + "21.0.0 - 21.3.10" + ] + }, + "hapi": { + "range": [ + "16.0.0 - 16.8.4", + "17.0.0 - 17.8.5", + "18.0.0 - 18.1.0" + ] + }, + "ioredis": { + "range": [ + "2.0.0 - 2.5.0", + "3.0.0 - 3.2.2", + "4.0.0 - 4.28.5", + "5.0.0 - 5.4.1" + ] + }, + "jest-environment-node": { + "range": [ + "24.8.0 - 24.9.0", + "25.0.0 - 25.5.0", + "26.0.0 - 26.6.2", + "27.0.0 - 27.5.1", + "28.0.0 - 28.1.3", + "29.0.0 - 29.7.0" + ] + }, + "kafkajs": { + "range": [ + "1.4.0 - 1.16.0", + "2.0.0 - 2.2.4" + ] + }, + "knex": { + "range": [ + "0.8.0 - 0.95.15", + "1.0.0 - 1.0.7", + "2.0.0 - 2.5.1", + "3.0.0 - 3.1.0" + ] + }, + "koa": { + "range": [ + "2.0.0 - 2.15.3" + ] + }, + "@koa/router": { + "range": [ + "8.0.0 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.2", + "13.0.0 - 13.1.0" + ] + }, + "koa-router": { + "range": [ + "7.0.0 - 7.4.0", + "8.0.6 - 8.0.8", + "9.0.1 - 9.4.0", + "10.0.0 - 10.1.1", + "11.0.0 - 11.0.2", + "12.0.0 - 12.0.1", + "13.0.1 - 13.0.1" + ] + }, + "ldapjs": { + "range": [ + "0.1.0 - 0.8.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.3.3", + "3.0.0 - 3.0.7" + ] + }, + "limitd-client": { + "range": [ + "1.0.0 - 1.13.1", + "2.0.0 - 2.14.1" + ] + }, + "lodash": { + "range": [ + "0.1.0 - 0.10.0", + "1.0.0 - 1.0.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.10.1", + "4.0.0 - 4.17.21" + ] + }, + "mariadb": { + "range": [ + "3.0.0 - 3.3.2" + ] + }, + "memcached": { + "range": [ + "2.2.0 - 2.2.2" + ] + }, + "microgateway-core": { + "range": [ + "2.1.0 - 2.5.17", + "3.0.0 - 3.3.4" + ] + }, + "moleculer": { + "range": [ + "0.14.0 - 0.14.34" + ] + }, + "mongodb-core": { + "range": [ + "2.0.0 - 2.1.20", + "3.0.0 - 3.2.7" + ] + }, + "mongodb": { + "range": [ + "3.3.0 - 3.7.4", + "4.0.0 - 4.17.2", + "5.0.0 - 5.9.2", + "6.0.0 - 6.9.0" + ] + }, + "mongoose": { + "range": [ + "4.6.4 - 4.13.21", + "5.0.0 - 5.13.22", + "6.0.0 - 6.13.3", + "7.0.0 - 7.8.2", + "8.0.0 - 8.6.3" + ] + }, + "mquery": { + "range": [ + "0.0.1 - 0.9.0", + "1.0.0 - 1.11.0", + "2.0.0 - 2.3.3", + "3.0.0 - 3.2.5", + "4.0.0 - 4.0.3", + "5.0.0 - 5.0.0" + ] + }, + "mysql": { + "range": [ + "2.0.0 - 2.18.1" + ] + }, + "mysql2": { + "range": [ + "1.0.0 - 1.6.6", + "2.0.0 - 2.3.3", + "3.0.0 - 3.11.3" + ] + }, + "next": { + "range": [ + "9.5.0 - 9.5.5", + "10.0.0 - 10.2.3", + "11.0.0 - 11.1.4", + "12.0.0 - 12.3.4", + "13.0.0 - 13.5.7", + "14.0.0 - 14.2.13" + ] + }, + "openai": { + "range": [ + "3.0.0 - 3.3.0", + "4.0.0 - 4.64.0" + ] + }, + "@opensearch-project/opensearch": { + "range": [ + "1.0.0 - 1.2.0", + "2.0.0 - 2.12.0" + ] + }, + "oracledb": { + "range": [ + "5.0.0 - 5.5.0", + "6.0.0 - 6.6.0" + ] + }, + "paperplane": { + "range": [ + "2.3.0 - 2.3.2", + "3.0.0 - 3.1.2" + ] + }, + "passport-http": { + "range": [ + "0.1.0 - 0.3.0" + ] + }, + "passport-local": { + "range": [ + "0.1.0 - 0.1.6", + "1.0.0 - 1.0.0" + ] + }, + "pg": { + "range": [ + "4.0.0 - 4.5.7", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.2", + "7.0.0 - 7.18.2", + "8.0.0 - 8.13.0" + ] + }, + "pino": { + "range": [ + "2.0.0 - 2.16.0", + "3.0.0 - 3.4.0", + "4.0.0 - 4.17.6", + "5.0.0 - 5.17.0", + "6.0.0 - 6.14.0", + "7.0.0 - 7.11.0", + "8.0.0 - 8.21.0", + "9.0.0 - 9.4.0" + ] + }, + "pino-pretty": { + "range": [ + "1.0.0 - 1.0.1", + "2.0.0 - 2.6.1", + "3.0.0 - 3.6.1", + "4.0.0 - 4.8.0", + "5.0.0 - 5.1.3", + "6.0.0 - 6.0.0", + "7.0.0 - 7.6.1", + "8.0.0 - 8.1.0", + "9.0.0 - 9.4.1", + "10.0.0 - 10.3.1", + "11.0.0 - 11.2.2" + ] + }, + "@playwright/test": { + "range": [ + "0.0.0 - 0.1111.0", + "1.12.0 - 1.47.2" + ] + }, + "playwright": { + "range": [ + "0.0.0 - 0.18.0", + "1.0.0 - 1.47.2" + ] + }, + "promise-js": { + "range": [ + "0.0.3 - 0.0.7" + ] + }, + "promise": { + "range": [ + "7.0.0 - 7.3.1", + "8.0.0 - 8.3.0" + ] + }, + "q": { + "range": [ + "1.0.0 - 1.5.1" + ] + }, + "qs": { + "range": [ + "0.0.0 - 0.6.6", + "1.0.0 - 1.2.2", + "2.0.0 - 2.4.2", + "3.0.0 - 3.1.0", + "4.0.0 - 4.0.0", + "5.0.0 - 5.2.1", + "6.0.0 - 6.13.0" + ] + }, + "@node-redis/client": { + "range": [ + "1.0.0 - 1.0.6" + ] + }, + "@redis/client": { + "range": [ + "1.1.0 - 1.6.0" + ] + }, + "redis": { + "range": [ + "0.12.0 - 0.12.1", + "1.0.0 - 1.0.0", + "2.0.0 - 2.8.0", + "3.0.0 - 3.1.2", + "4.0.0 - 4.7.0" + ] + }, + "restify": { + "range": [ + "3.0.0 - 3.0.3", + "4.0.0 - 4.3.4", + "5.0.0 - 5.2.1", + "6.0.0 - 6.4.0", + "7.0.0 - 7.7.0", + "8.0.0 - 8.6.1", + "9.0.0 - 9.1.0", + "10.0.0 - 10.0.0", + "11.0.0 - 11.1.0" + ] + }, + "rhea": { + "range": [ + "1.0.0 - 1.0.24", + "2.0.0 - 2.0.8", + "3.0.0 - 3.0.3" + ] + }, + "router": { + "range": [ + "0.2.1 - 0.6.2", + "1.0.0 - 1.3.8" + ] + }, + "selenium-webdriver": { + "range": [ + "2.29.0 - 2.53.3", + "3.0.0 - 3.6.0", + "4.0.0 - 4.25.0" + ] + }, + "sequelize": { + "range": [ + "0.0.0 - 0.4.3", + "1.0.0 - 1.7.11", + "2.0.0 - 2.1.3", + "3.0.0 - 3.35.1", + "4.0.0 - 4.44.4", + "5.1.0 - 5.22.5", + "6.1.0 - 6.37.3" + ] + }, + "sharedb": { + "range": [ + "1.0.0 - 1.9.2", + "2.0.0 - 2.2.6", + "3.0.0 - 3.3.2", + "4.0.0 - 4.1.5", + "5.0.0 - 5.0.4" + ] + }, + "tedious": { + "range": [ + "1.0.0 - 1.15.0", + "2.0.0 - 2.7.1", + "3.0.0 - 3.0.1", + "4.0.0 - 4.2.0", + "5.0.0 - 5.0.3", + "6.0.0 - 6.7.1", + "7.0.0 - 7.0.0", + "8.0.0 - 8.3.1", + "9.0.0 - 9.2.3", + "10.0.0 - 10.0.0", + "11.0.0 - 11.8.0", + "12.0.0 - 12.3.0", + "13.0.0 - 13.2.0", + "14.0.0 - 14.7.0", + "15.0.0 - 15.1.3", + "16.0.0 - 16.7.1", + "17.0.0 - 17.0.0", + "18.0.0 - 18.6.2" + ] + }, + "undici": { + "range": [ + "0.1.0 - 0.5.0", + "1.0.0 - 1.3.1", + "2.0.0 - 2.2.1", + "3.0.0 - 3.3.6", + "4.0.0 - 4.16.0", + "5.0.0 - 5.28.4", + "6.0.0 - 6.19.8" + ] + }, + "vitest": { + "range": [ + "0.0.0 - 0.34.6", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "@vitest/runner": { + "range": [ + "0.28.0 - 0.34.7", + "1.0.0 - 1.6.0", + "2.0.0 - 2.1.1" + ] + }, + "when": { + "range": [ + "3.0.0 - 3.7.8" + ] + }, + "winston": { + "range": [ + "1.0.0 - 1.1.2", + "2.0.0 - 2.4.7", + "3.0.0 - 3.14.2" + ] + } + } +} \ No newline at end of file