Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1eada6a
[test optimization] Use duration buckets for playwright EFD retries (…
juan-fernandez May 8, 2026
6b515f6
[test-optimization] Propagate ITR skipping enabled tag to suites and …
anmarchenko May 8, 2026
371116c
fix(config): disable OTLP only when protocolVersion is explicitly set…
BridgeAR May 8, 2026
8d2f39e
[test optimization] Support Jest 30.4.1 (#8361)
juan-fernandez May 8, 2026
bf19c0c
[test optimization] Bump cucumber latest version (#8364)
juan-fernandez May 8, 2026
d4a0a7c
[test optimization] Bump playwright support to 1.59 (#8363)
juan-fernandez May 8, 2026
6a0d999
fix(plugin-mysql): destructure CLIENT_PORT_KEY from the constants mod…
BridgeAR May 8, 2026
735acb6
fix(aws-sdk): global crypto error (#8368)
pabloerhard May 8, 2026
9868f2c
test: add a few database tests to cover recent reports better (#7534)
BridgeAR May 8, 2026
8737a21
chore(couchbase): drop SDK 2.x instrumentation hook (#8362)
BridgeAR May 8, 2026
24b976b
refactor(azure-metadata): parse WEBSITE_OWNER_NAME without regex (#8348)
BridgeAR May 8, 2026
649616f
fix(grpc): require a colon and a strictly numeric tail before tagging…
BridgeAR May 8, 2026
b7a3e92
perf(mongodb): fold limit-depth and bigint sanitisation into one pass…
BridgeAR May 8, 2026
62f26a9
perf(pubsub): trim per-message allocations in publish hot path (#8374)
BridgeAR May 8, 2026
966c184
chore(deps): bump dc-polyfill from 0.1.10 to 0.1.11 (#8369)
bm1549 May 8, 2026
311ff70
perf(grpc): cache method metadata, drop banned for-in walks (#8377)
BridgeAR May 9, 2026
bc81958
perf(database): cache the DBM SQL injection comment per connection (#…
BridgeAR May 9, 2026
c8b0965
perf(mongodb): cache the per-connection topology shape (#8370)
BridgeAR May 9, 2026
41fddf0
perf(aws-sdk): trim per-response allocations (#8328)
BridgeAR May 9, 2026
be94477
ci: replace CodeQL workflow with default setup configuration (#8380)
rochdev May 9, 2026
d469531
chore(deps-dev): bump nock from 13.5.6 to 14.0.14 (#8280)
dependabot[bot] May 9, 2026
4e110b0
test(ws): refactor lifecycle hooks to use dynamic ports and separate …
rochdev May 9, 2026
08e9f09
fix(stacktrace): filter dd-trace instrumentation frames for any repo …
rochdev May 9, 2026
3101f87
fix(tracing): fix TypeError in ritm.js when requiring node:-prefixed …
yuichi0301 May 9, 2026
f6a5dcf
chore(deps): bump openai (#8360)
dependabot[bot] May 9, 2026
ca90f8a
chore(deps): bump the test-versions group across 1 directory with 2 u…
dependabot[bot] May 11, 2026
138d873
v5.102.1
rochdev May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .github/codeql_config.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/apm-integrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ jobs:
matrix:
node-version: [eol]
range:
# - '^2.6.12' skipping due to bug with couchbase integration that is blocking CI.
# TODO: diagnose and fix failures. Link to bug issue: https://github.com/DataDog/dd-trace-js/issues/6400
- "^3.0.7"
- ">=4.0.0 <4.2.0"
include:
Expand Down
54 changes: 0 additions & 54 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Temporary Items
# Logs
logs
*.log
node-*-junit.xml
npm-debug.log*
yarn-debug.log*
yarn-error.log*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test.beforeEach(async ({ page }) => {

test.describe('playwright', () => {
test('should be able to log to the console', async ({ page }) => {
test.step('log to the console', async () => {
await test.step('log to the console', async () => {
logger.log('info', 'Hello simple log!')
})

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict'

const stack = require('./read-stack')

describe('stack during module import', () => {
it('can read a default error stack while loading the test module', () => {
expect(stack).toContain('Error: stack from module import')
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict'

const stack = new Error('stack from module import').stack

if (!stack.includes('stack from module import')) {
throw new Error('Expected stack to include the original error message')
}

module.exports = stack
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict'

const { test, expect } = require('@playwright/test')

test.describe('efd duration retries', () => {
test('instant test', async () => {
expect(1 + 1).toBe(2)
})

test('slightly slow test', async () => {
await new Promise(resolve => setTimeout(resolve, 11_000))
expect(1 + 1).toBe(2)
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict'

const { test, expect } = require('@playwright/test')

test.describe('efd project duration', () => {
test('project scoped test', async ({ browserName }, testInfo) => {
if (browserName && testInfo.project.name === 'second-chromium') {
await new Promise(resolve => setTimeout(resolve, 6_000))
}
expect(1 + 1).toBe(2)
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict'

const { test, expect } = require('@playwright/test')

test.describe('efd repeat duration', () => {
test('repeat-scoped test', async () => {
if (test.info().repeatEachIndex === 0) {
await new Promise(resolve => setTimeout(resolve, 6_000))
}

expect(1 + 1).toBe(2)
})
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict'

const { test, expect } = require('@playwright/test')

test.describe('efd repeat each', () => {
test('native repeat test', async () => {
expect(1 + 1).toBe(2)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ const testFrameworks = [
{
testFramework: 'jest',
command: 'node ./ci-visibility/test-optimization-wrong-init/run-jest.js',
expectedOutput: 'PASS ci-visibility/test-optimization-wrong-init/sum-wrong-init-test.js',
expectedOutput: [
'PASS ci-visibility/test-optimization-wrong-init/sum-wrong-init-test.js',
'Test Suites:\\s+1 passed, 1 total',
].join('|'),
},
{
testFramework: 'vitest',
Expand Down
12 changes: 12 additions & 0 deletions integration-tests/cucumber/cucumber.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ const { DD_HOST_CPU_COUNT } = require('../../packages/dd-trace/src/plugins/util/
const { NODE_MAJOR } = require('../../version')
const { ERROR_MESSAGE, ERROR_TYPE, ERROR_STACK } = require('../../packages/dd-trace/src/constants')

function assertItrSkippingEnabledTags (events, expected) {
const testSuite = events.find(event => event.type === 'test_suite_end').content
assert.strictEqual(testSuite.meta[TEST_ITR_SKIPPING_ENABLED], expected)
const test = events.find(event => event.type === 'test').content
assert.strictEqual(test.meta[TEST_ITR_SKIPPING_ENABLED], expected)
}

const version = process.env.CUCUMBER_VERSION || 'latest'

const onlyLatestIt = version === 'latest' ? it : it.skip
Expand Down Expand Up @@ -646,6 +653,7 @@ describe(`cucumber@${version} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_ITR_TESTS_SKIPPED], 'false')
assert.strictEqual(testModule.meta[TEST_CODE_COVERAGE_ENABLED], 'false')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'false')
assertItrSkippingEnabledTags(payload.events, 'false')
}, ({ url }) => url.endsWith('/api/v2/citestcycle')).then(() => done()).catch(done)

childProcess = exec(
Expand Down Expand Up @@ -720,6 +728,7 @@ describe(`cucumber@${version} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_TYPE], 'suite')
assert.strictEqual(testModule.metrics[TEST_ITR_SKIPPING_COUNT], 1)
assertItrSkippingEnabledTags(eventsRequest.payload.events, 'true')
done()
}).catch(done)

Expand Down Expand Up @@ -763,6 +772,7 @@ describe(`cucumber@${version} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_ITR_TESTS_SKIPPED], 'false')
assert.strictEqual(testModule.meta[TEST_CODE_COVERAGE_ENABLED], 'true')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assertItrSkippingEnabledTags(payload.events, 'true')
}, ({ url }) => url.endsWith('/api/v2/citestcycle')).then(() => done()).catch(done)

childProcess = exec(
Expand Down Expand Up @@ -962,6 +972,7 @@ describe(`cucumber@${version} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_CODE_COVERAGE_ENABLED], 'true')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assert.strictEqual(testModule.metrics[TEST_ITR_SKIPPING_COUNT], 0)
assertItrSkippingEnabledTags(events, 'true')
}, 25000)

childProcess = exec(
Expand Down Expand Up @@ -1130,6 +1141,7 @@ describe(`cucumber@${version} commonJS`, () => {
tests.forEach(test => {
assert.ok(!test.meta[TEST_SUITE].includes('farewell'))
})
assertItrSkippingEnabledTags(events, 'true')
})

childProcess = exec(
Expand Down
9 changes: 9 additions & 0 deletions integration-tests/cypress/cypress-itr.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ const oldestVersion = DD_MAJOR >= 6 ? '12.0.0' : '6.7.0'
const version = requestedVersion === 'oldest' ? oldestVersion : requestedVersion
const hookFile = 'dd-trace/loader-hook.mjs'

function assertItrSkippingEnabledTags (events, expected) {
const testSuite = events.find(event => event.type === 'test_suite_end').content
assert.strictEqual(testSuite.meta[TEST_ITR_SKIPPING_ENABLED], expected)
const test = events.find(event => event.type === 'test').content
assert.strictEqual(test.meta[TEST_ITR_SKIPPING_ENABLED], expected)
}

function shouldTestsRun (type) {
if (DD_MAJOR === 5) {
if (NODE_MAJOR <= 16) {
Expand Down Expand Up @@ -270,6 +277,7 @@ moduleTypes.forEach(({
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assert.strictEqual(testModule.metrics[TEST_ITR_SKIPPING_COUNT], 1)
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_TYPE], 'test')
assertItrSkippingEnabledTags(events, 'true')
}, 25000)

const coverageRequestPromise = receiver
Expand Down Expand Up @@ -528,6 +536,7 @@ moduleTypes.forEach(({
assert.strictEqual(testModule.meta[TEST_CODE_COVERAGE_ENABLED], 'true')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assert.strictEqual(testModule.metrics[TEST_ITR_SKIPPING_COUNT], 0)
assertItrSkippingEnabledTags(events, 'true')
}, 30000)

const skippableRequestPromise = receiver
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/esbuild/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"author": "Thomas Hunter II <tlhunter@datadog.com>",
"license": "ISC",
"dependencies": {
"@apollo/server": "5.5.0",
"@apollo/server": "5.5.1",
"@koa/router": "15.5.0",
"aws-sdk": "2.1693.0",
"axios": "1.16.0",
"express": "4.22.1",
"knex": "3.2.10",
"koa": "3.2.0",
"openai": "6.35.0"
"openai": "6.37.0"
}
}
36 changes: 36 additions & 0 deletions integration-tests/jest/jest.core.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,42 @@ describe(`jest@${JEST_VERSION} commonJS`, () => {
})
})

it('keeps default stack formatting when imported modules read error stacks', async () => {
const eventsPromise = receiver
.gatherPayloadsMaxTimeout(({ url }) => url.endsWith('/api/v2/citestcycle'), (payloads) => {
const events = payloads.flatMap(({ payload }) => payload.events)
const suites = events.filter(event => event.type === 'test_suite_end')
const stackImportSuites = suites.filter(
suite => suite.content.meta[TEST_SUITE] ===
'ci-visibility/jest-stack-on-import/jest-stack-on-import-test.js'
)

assert.strictEqual(stackImportSuites.length, 1)
assert.strictEqual(stackImportSuites[0].content.meta[TEST_STATUS], 'pass')
})

childProcess = exec(runTestsCommand, {
cwd,
env: {
...getCiVisAgentlessConfig(receiver.port),
TESTS_TO_RUN: 'jest-stack-on-import/jest-stack-on-import-test',
SHOULD_CHECK_RESULTS: 'true',
},
})
childProcess.stdout?.on('data', (chunk) => {
testOutput += chunk.toString()
})
childProcess.stderr?.on('data', (chunk) => {
testOutput += chunk.toString()
})

const [exitCode] = await once(childProcess, 'exit')

assert.strictEqual(exitCode, 0, testOutput)
assert.doesNotMatch(testOutput, /originalPrepareStackTrace is not a function/)
await eventsPromise
})

it('reports parsing errors in the test file', (done) => {
const eventsPromise = receiver
.gatherPayloadsMaxTimeout(({ url }) => url.endsWith('/api/v2/citestcycle'), (payloads) => {
Expand Down
11 changes: 11 additions & 0 deletions integration-tests/jest/jest.itr-efd.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ const JEST_VERSION = requestedJestVersion === 'oldest' ? oldestJestVersion : req
const onlyLatestIt = JEST_VERSION === 'latest' ? it : it.skip
const shouldInstallJestEnvironmentJsdom = JEST_VERSION === 'latest' || Number(JEST_VERSION.split('.')[0]) >= 28

function assertItrSkippingEnabledTags (events, expected) {
const testSuite = events.find(event => event.type === 'test_suite_end').content
assert.strictEqual(testSuite.meta[TEST_ITR_SKIPPING_ENABLED], expected)
const test = events.find(event => event.type === 'test').content
assert.strictEqual(test.meta[TEST_ITR_SKIPPING_ENABLED], expected)
}

// TODO: add ESM tests
describe(`jest@${JEST_VERSION} commonJS`, () => {
let receiver
Expand Down Expand Up @@ -233,6 +240,7 @@ describe(`jest@${JEST_VERSION} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_ITR_TESTS_SKIPPED], 'false')
assert.strictEqual(testModule.meta[TEST_CODE_COVERAGE_ENABLED], 'false')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'false')
assertItrSkippingEnabledTags(payload.events, 'false')
}, ({ url }) => url === '/api/v2/citestcycle').then(() => done()).catch(done)

childProcess = exec(
Expand Down Expand Up @@ -298,6 +306,7 @@ describe(`jest@${JEST_VERSION} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_TYPE], 'suite')
assert.strictEqual(testModule.metrics[TEST_ITR_SKIPPING_COUNT], 1)
assertItrSkippingEnabledTags(eventsRequest.payload.events, 'true')
done()
}).catch(done)

Expand Down Expand Up @@ -380,6 +389,7 @@ describe(`jest@${JEST_VERSION} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_ITR_TESTS_SKIPPED], 'false')
assert.strictEqual(testModule.meta[TEST_CODE_COVERAGE_ENABLED], 'true')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assertItrSkippingEnabledTags(payload.events, 'true')
}, ({ url }) => url === '/api/v2/citestcycle').then(() => done()).catch(done)

childProcess = exec(
Expand Down Expand Up @@ -584,6 +594,7 @@ describe(`jest@${JEST_VERSION} commonJS`, () => {
assert.strictEqual(testModule.meta[TEST_ITR_TESTS_SKIPPED], 'false')
assert.strictEqual(testModule.meta[TEST_CODE_COVERAGE_ENABLED], 'true')
assert.strictEqual(testModule.meta[TEST_ITR_SKIPPING_ENABLED], 'true')
assertItrSkippingEnabledTags(events, 'true')
}, 25000)

childProcess = exec(
Expand Down
5 changes: 5 additions & 0 deletions integration-tests/jest/jest.test-management.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1383,12 +1383,17 @@ describe(`jest@${JEST_VERSION} commonJS`, () => {
.gatherPayloadsMaxTimeout(({ url }) => url.endsWith('/api/v2/citestcycle'), (payloads) => {
const events = payloads.flatMap(({ payload }) => payload.events)
const tests = events.filter(event => event.type === 'test').map(event => event.content)
const suites = events.filter(event => event.type === 'test_suite_end').map(event => event.content)
const testSession = events.find(event => event.type === 'test_session_end').content

if (isQuarantining) {
assert.strictEqual(testSession.meta[TEST_MANAGEMENT_ENABLED], 'true')
// test session is passed even though a test fails because the test is quarantined
assert.strictEqual(testSession.meta[TEST_STATUS], 'pass')
const quarantinedSuite = suites.find(
suite => suite.meta[TEST_SUITE] === 'ci-visibility/test-management/test-quarantine-1.js'
)
assert.strictEqual(quarantinedSuite.meta[TEST_STATUS], 'pass')
} else {
assert.ok(!(TEST_MANAGEMENT_ENABLED in testSession.meta))
assert.strictEqual(testSession.meta[TEST_STATUS], 'fail')
Expand Down
Loading
Loading