Skip to content

Commit

Permalink
chore: update test-all-versions configs to test fewer package versions (
Browse files Browse the repository at this point in the history
#2464)

The TAV tests in CI are taking 2.5h - 3h, for a total usage of over 13h
compute time. E.g.: https:/open-telemetry/opentelemetry-js-contrib/actions/runs/11233652488/usage

This change reduces the number of tested versions from 839 to 317
(for a TAV run with Node.js v20). For a few of the .tav.yml files the
tested version range was actually increased to capture some versions
that the instrumentation supported, but were not being tested by TAV.
  • Loading branch information
trentm authored Oct 15, 2024
1 parent ad560df commit 0341e89
Show file tree
Hide file tree
Showing 33 changed files with 278 additions and 186 deletions.
148 changes: 123 additions & 25 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions plugins/node/instrumentation-amqplib/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
'amqplib':
versions: ">=0.5.5"
amqplib:
versions:
include: ">=0.5.5"
mode: latest-minors
commands:
- yarn test
- npm test
8 changes: 6 additions & 2 deletions plugins/node/instrumentation-cucumber/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
'@cucumber/cucumber':
- versions: '^8.0.0 || ^9.0.0'
- versions:
include: '^8.0.0 || ^9.0.0'
mode: latest-minors
node: '>=14'
commands: npm test
- versions: '^10.0.0'
- versions:
include: '^10.0.0'
mode: latest-minors
node: '>=18'
commands: npm test
4 changes: 3 additions & 1 deletion plugins/node/instrumentation-dataloader/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
dataloader:
# Testing ^2.0.0 covers about 90% of the downloaded versions
versions: "^2.0.0"
versions:
include: "^2.0.0"
mode: latest-minors
commands: npm run test
4 changes: 3 additions & 1 deletion plugins/node/instrumentation-lru-memoizer/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
'lru-memoizer':
versions: ">=1.3 <3"
versions:
include: ">=1.3 <3"
mode: latest-minors
commands:
- npm test
8 changes: 6 additions & 2 deletions plugins/node/instrumentation-socket.io/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'socket.io':
- versions: "2.1.1 || 2.2.0 || 2.3.0 || 2.4.0 || ^2.5.0"
- versions:
include: "^2.1.1"
mode: latest-minors
peerDependencies: socket.io-client@^2
commands:
- npm run test
Expand All @@ -9,7 +11,9 @@
commands:
- npm run test

- versions: "4.5.3 || 4.6.2 || ^4.7.1"
- versions:
include: "^4.5.3"
mode: latest-minors
peerDependencies: socket.io-client@^4
commands:
- npm run test
21 changes: 15 additions & 6 deletions plugins/node/opentelemetry-instrumentation-aws-sdk/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
"aws-sdk":
# A small subset of releases in the range [2.308.0, 3) to reduce testing time.
versions: "2.308.0 || 2.556.0 || 2.801.0 || 2.1049.0 || 2.1297.0 || 2.1546.0 || >=2.1548.0"
versions:
include: "^2.308.0"
mode: max-7
commands:
- npm run test

# Versions [3.363.0, 3.377.0] of all @aws-sdk/client-* were bad releases. See:
# - https:/open-telemetry/opentelemetry-js-contrib/pull/2464#issuecomment-2403652552
# - https:/open-telemetry/opentelemetry-js-contrib/issues/1828#issuecomment-1834276719

"@aws-sdk/client-s3":
# A small subset of releases in the range [3.6.1, 4) to reduce testing time.
# - 3.377.0 was a bad release (see issue #1828).
# - 3.529.0 was missing the fast-xml-parser dependency (https:/aws/aws-sdk-js-v3/releases/tag/v3.529.1)
versions: "3.6.1 || 3.55.0 || 3.180.0 || 3.289.0 || 3.385.0 || 3.498.0 || >=3.529.1"
versions:
include: "^3.6.1"
exclude: "3.529.0 || >=3.363.0 <=3.377.0"
mode: "max-7"
commands:
- npm run test

"@aws-sdk/client-sqs":
# A small subset of releases in the range [3.24.0, 4) to reduce testing time.
versions: "3.24.0 || 3.94.0 || 3.202.0 || 3.296.0 || 3.388.0 || 3.496.0 || >=3.503.1"
versions:
include: "^3.24.0"
exclude: ">=3.363.0 <=3.377.0"
mode: "max-7"
commands:
- npm run test
4 changes: 3 additions & 1 deletion plugins/node/opentelemetry-instrumentation-bunyan/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
bunyan:
# Testing ^1.8.12 covers at least 95% of the downloaded versions
versions: "^1.8.12"
versions:
include: "^1.8.12"
mode: latest-minors
commands: npm run test
4 changes: 3 additions & 1 deletion plugins/node/opentelemetry-instrumentation-express/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
express:
- versions: "^4.16.2"
- versions:
include: "^4.16.2"
mode: latest-minors
commands: npm run test
10 changes: 6 additions & 4 deletions plugins/node/opentelemetry-instrumentation-fastify/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"fastify":
# Sanity check the first 4.x release, instead of all releases, plus recent
# releases.
- versions: "4.0.0 || >=4.24.3 <5"
- versions:
include: "^4.0.0"
mode: max-7
commands: npm run test
- versions: ">=5 <6"
- versions:
include: ">=5 <6"
mode: max-7
commands: npm run test
peerDependencies: "@fastify/[email protected]"
node: '>=20'
Expand Down
5 changes: 3 additions & 2 deletions plugins/node/opentelemetry-instrumentation-graphql/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
graphql:
# Taking a sample from the most downloaded versions in the range "14 || 15 || 16"
versions: "16.4.0 || 16.3.0 || 16.2.0 || 16.0.0 || ^15.8.0 || 15.7.2 || 15.6.1 || 15.6.0 || 15.5.3 || 15.5.1 || 15.5.0 || 15.4.0 || 15.3.0 || ^14.7.0 || 14.6.0 || 14.5.8 || 14.0.0"
versions:
include: "14 || 15 || 16"
mode: max-7
commands: npm run test
12 changes: 9 additions & 3 deletions plugins/node/opentelemetry-instrumentation-hapi/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
"@hapi/hapi":
- versions: "^19.2.0 || ^18.4.1 || ^17.9.0"
- versions:
include: "^19.2.0 || ^18.4.1 || ^17.9.0"
mode: latest-minors
node: ">=14 <16"
commands: npm test
- versions: "^20.3.0"
- versions:
include: "^20.3.0"
mode: latest-minors
node: ">=14"
commands: npm test
- versions: "^21.3.3"
- versions:
include: "^21.3.3"
mode: latest-minors
node: ">=14.15.0"
commands: npm test

5 changes: 4 additions & 1 deletion plugins/node/opentelemetry-instrumentation-ioredis/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ioredis:
# Ignoring v4.19.0. Tests never ends. Caused by https:/luin/ioredis/pull/1219
versions: "^2.5.0 || ^3.2.2 || 4.14.1 || 4.16.3 || 4.17.3 || 4.18.0 || 4.19.2 || 4.19.4 || 4.22.0 || 4.24.5 || 4.26.0 || 4.27.11 || ^4.28.5 || 5.0.6 || 5.2.6 || ^5.3.2"
versions:
include: '>=2.0.0 <6'
exclude: '4.19.0'
mode: max-7
commands: npm run test
8 changes: 6 additions & 2 deletions plugins/node/opentelemetry-instrumentation-koa/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
"@koa/router":
versions: "8.0.8 || 9.4.0 || 10.0.0 || 10.1.1 || 11.0.1 || >=12.0.0"
versions:
include: ">=8.0.0"
mode: latest-minors
commands: npm run test

koa:
# Testing ^2.7.0 covers at least 97% of the downloaded koa versions
versions: "^2.7.0"
versions:
include: "^2.7.0"
mode: latest-minors
commands: npm run test
13 changes: 10 additions & 3 deletions plugins/node/opentelemetry-instrumentation-mongodb/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mongodb:
- versions: ">=3.3 <4"
- versions:
include: ">=3.3 <4"
mode: max-7
commands: npm run test-v3
- versions:
include: ">=4 <5"
Expand All @@ -9,9 +11,14 @@ mongodb:
# tests for the wrong version.
# Ref: https:/open-telemetry/opentelemetry-js-contrib/pull/2001#issuecomment-1992202942
exclude: "4.17.2"
mode: max-7
commands: npm run test-v4
- versions: ">=5 <6"
- versions:
include: ">=5 <6"
mode: max-7
commands: npm run test-v5-v6
- versions: ">=6 <7"
- versions:
include: ">=6 <7"
mode: max-7
node: '>=15.0.0'
commands: npm run test-v5-v6
15 changes: 6 additions & 9 deletions plugins/node/opentelemetry-instrumentation-mysql2/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
mysql2:
- versions: <4 >=3.2.0 || 3.1.0 || 3.0.0
commands: npm run test

- versions: <3 >=2.3.2 || 2.3.0 || 2.2.5 || 2.1.0
# Skip 2.3.3 which installs types from git which takes 10m on it's own
commands: npm run test

- versions: 1.4.2 || 1.5.3 || 1.6.4 || 1.6.5 || 1.7.0
versions:
include: ">=1.4.2 <4"
# Skip v1.6.2, which is broken
commands: npm run test
# Skip 2.3.3 which installs types from git which takes 10m on it's own
exclude: "1.6.2 || 2.3.3"
mode: latest-minors
commands: npm run test
35 changes: 26 additions & 9 deletions plugins/node/opentelemetry-instrumentation-nestjs-core/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,44 @@
"@nestjs/core":
- versions: "^8.2.0 || 8.1.2 || 8.1.1 || 8.0.11 || 8.0.9 || 8.0.6"
- versions:
include: ">=10.0.0 <11"
mode: latest-minors
# NestJS 10 requires Node.js v16 or later.
# https://docs.nestjs.com/migration-guide#dropping-support-for-nodejs-v12
node: ">=16"
peerDependencies:
- "@nestjs/common@^10.0.0"
- "rxjs@^7.1.0"
commands: npm run test

- versions:
include: ">=9.0.0 <10"
mode: latest-minors
peerDependencies:
- "@nestjs/common@^9.0.0"
- "rxjs@^7.1.0"
commands: npm run test

- versions:
include: ">=8.0.0 <9"
mode: latest-minors
peerDependencies:
- "@nestjs/common@^8.0.0"
- "@nestjs/microservices@^8.0.0"
- "@nestjs/platform-express@^8.0.0"
- "@nestjs/websockets@^8.0.0"
- "rxjs@^7.1.0"
commands: npm run test

- versions: "^7.6.17 || 7.6.15 || 7.6.13 || 7.6.12"
- versions:
# We *could* test all 7.x "latest-minors", but the latest 7.x release was
# 2021, so let's just test the latest.
include: "^7.6.18"
peerDependencies:
- "@nestjs/common@^7.0.0"
- "@nestjs/microservices@^7.0.0"
- "@nestjs/platform-express@^7.0.0"
- "@nestjs/websockets@^7.0.0"
- "rxjs@^6.0.0"
commands: npm run test

- versions: "6.11.11"
peerDependencies:
- "@nestjs/common@^6.0.0"
- "@nestjs/microservices@^6.0.0"
- "@nestjs/platform-express@^6.0.0"
- "@nestjs/websockets@^6.0.0"
- "rxjs@^6.0.0"
commands: npm run test
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
"devDependencies": {
"@nestjs/common": "9.4.3",
"@nestjs/core": "9.4.3",
"@nestjs/microservices": "9.4.3",
"@nestjs/platform-express": "9.4.3",
"@nestjs/websockets": "9.4.3",
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-async-hooks": "^1.8.0",
"@opentelemetry/sdk-trace-base": "^1.8.0",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export const setup = async (version: string): Promise<App> => {
);
}

const app = await core.NestFactory.create(AppModule);
const app = await core.NestFactory.create(AppModule, { logger: false });
if (app.listenAsync) {
await app.listenAsync(0, 'localhost');
} else {
Expand Down
9 changes: 5 additions & 4 deletions plugins/node/opentelemetry-instrumentation-pg/.tav.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pg:
# a sample from supported versions
- versions: "8.5.1 || 8.6.0 || 8.7.1"
peerDependencies: pg-pool@^3
commands: npm run test
versions:
include: '>=8.0.3 <9'
mode: max-7
peerDependencies: pg-pool@^3
commands: npm run test
2 changes: 1 addition & 1 deletion plugins/node/opentelemetry-instrumentation-pg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm install --save @opentelemetry/instrumentation-pg

### Supported Versions

- [`pg`](https://www.npmjs.com/package/pg) versions `>=8.0.0 <9`
- [`pg`](https://www.npmjs.com/package/pg) versions `>=8.0.3 <9`
- [`pg-pool`](https://www.npmjs.com/package/pg-pool) versions `>=2.0.0 <4`

## Usage
Expand Down
Loading

0 comments on commit 0341e89

Please sign in to comment.