Skip to content

Commit 2c36076

Browse files
Merge branch 'master' into juan-fernandez/fix-test-suite-duration
2 parents b44bfca + e955673 commit 2c36076

File tree

24 files changed

+634
-380
lines changed

24 files changed

+634
-380
lines changed

.github/workflows/apm-integrations.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,17 @@ jobs:
384384
- uses: ./.github/actions/install
385385
- run: yarn test:plugins:ci
386386

387-
cookie-session:
387+
express-mongo-sanitize:
388+
runs-on: ubuntu-latest
389+
env:
390+
PLUGINS: express-mongo-sanitize
391+
steps:
392+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
393+
- uses: ./.github/actions/plugins/test
394+
with:
395+
dd_api_key: ${{ secrets.DD_API_KEY }}
396+
397+
express-session:
388398
runs-on: ubuntu-latest
389399
env:
390400
PLUGINS: express-session

.github/workflows/nightly-dispatch.yml renamed to .github/workflows/custom-node-version-dispatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Nightly Testing
1+
name: Nightly and custom Node.js builds
22

33
on:
44
workflow_dispatch:

.github/workflows/serverless.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,11 @@ jobs:
7878
EXTRA_CORS_EXPOSE_HEADERS: x-amz-request-id,x-amzn-requestid,x-amz-id-2
7979
AWS_DEFAULT_REGION: us-east-1
8080
FORCE_NONINTERACTIVE: 'true'
81-
LAMBDA_EXECUTOR: local
8281
START_WEB: '0'
8382
ports:
8483
- 4566:4566
84+
volumes:
85+
- /var/run/docker.sock:/var/run/docker.sock:rw
8586
# we have two localstacks since upgrading localstack was causing lambda & S3 tests to fail
8687
# To-Do: Debug localstack / lambda and localstack / S3
8788
localstack-legacy:

docs/test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ const elasticsearchOptions: plugins.elasticsearch = {
262262

263263
const awsSdkOptions: plugins.aws_sdk = {
264264
service: 'test',
265-
splitByAwsService: false,
266265
batchPropagationEnabled: false,
267266
hooks: {
268267
request: (span?: Span, response?) => {},

index.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,12 +1698,6 @@ declare namespace tracer {
16981698
* [aws-sdk](https://github.com/aws/aws-sdk-js) module.
16991699
*/
17001700
interface aws_sdk extends Instrumentation {
1701-
/**
1702-
* Whether to add a suffix to the service name so that each AWS service has its own service name.
1703-
* @default true
1704-
*/
1705-
splitByAwsService?: boolean;
1706-
17071701
/**
17081702
* Whether to inject all messages during batch AWS SQS, Kinesis, and SNS send operations. Normal
17091703
* behavior is to inject the first message in batch send operations.

integration-tests/ci-visibility/subproject/cypress-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"pluginsFile": "cypress/plugins-old/index.js",
55
"supportFile": "cypress/support/e2e.js",
66
"integrationFolder": "cypress/e2e",
7-
"defaultCommandTimeout": 100,
7+
"defaultCommandTimeout": 1000,
88
"nodeVersion": "system"
99
}

integration-tests/ci-visibility/subproject/cypress.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict'
22

33
module.exports = {
4-
defaultCommandTimeout: 100,
4+
defaultCommandTimeout: 1000,
55
e2e: {
66
setupNodeEvents (on, config) {
77
return require('dd-trace/ci/cypress/plugin')(on, config)

integration-tests/cypress-config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"pluginsFile": "cypress/plugins-old/index.js",
55
"supportFile": "cypress/support/e2e.js",
66
"integrationFolder": "cypress/e2e",
7-
"defaultCommandTimeout": 100,
7+
"defaultCommandTimeout": 1000,
88
"nodeVersion": "system"
99
}

integration-tests/cypress/cypress.spec.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ moduleTypes.forEach(({
493493
.map(file => file.filename)
494494

495495
assert.includeMembers(fileNames, Object.keys(coverageFixture))
496-
}, 20000)
496+
}, 25000)
497497

498498
childProcess = exec(
499499
testCommand,
@@ -988,7 +988,7 @@ moduleTypes.forEach(({
988988
'ci-visibility/subproject/src/index.tsx',
989989
'ci-visibility/subproject/cypress/e2e/spec.cy.js'
990990
])
991-
}, 10000)
991+
}, 25000)
992992

993993
childProcess = exec(
994994
command,
@@ -1028,7 +1028,7 @@ moduleTypes.forEach(({
10281028
assert.exists(testEvent.content.test_session_id)
10291029
assert.notEqual(testEvent.content.test_suite_id, testModuleEvent.content.test_module_id)
10301030
})
1031-
})
1031+
}, 25000)
10321032

10331033
childProcess = exec(
10341034
testCommand,
@@ -1173,7 +1173,7 @@ moduleTypes.forEach(({
11731173

11741174
const testSession = events.find(event => event.type === 'test_session_end').content
11751175
assert.propertyVal(testSession.meta, TEST_EARLY_FLAKE_ENABLED, 'true')
1176-
})
1176+
}, 25000)
11771177

11781178
const {
11791179
NODE_OPTIONS, // NODE_OPTIONS dd-trace config does not work with cypress
@@ -1241,7 +1241,7 @@ moduleTypes.forEach(({
12411241

12421242
const testSession = events.find(event => event.type === 'test_session_end').content
12431243
assert.notProperty(testSession.meta, TEST_EARLY_FLAKE_ENABLED)
1244-
})
1244+
}, 25000)
12451245

12461246
const specToRun = 'cypress/e2e/spec.cy.js'
12471247
childProcess = exec(
@@ -1298,7 +1298,7 @@ moduleTypes.forEach(({
12981298

12991299
const testSession = events.find(event => event.type === 'test_session_end').content
13001300
assert.propertyVal(testSession.meta, TEST_EARLY_FLAKE_ENABLED, 'true')
1301-
})
1301+
}, 25000)
13021302

13031303
const specToRun = 'cypress/e2e/skipped-test.js'
13041304

@@ -1353,7 +1353,7 @@ moduleTypes.forEach(({
13531353

13541354
const newTests = tests.filter(test => test.meta[TEST_IS_NEW] === 'true')
13551355
assert.equal(newTests.length, 0)
1356-
})
1356+
}, 25000)
13571357

13581358
const specToRun = 'cypress/e2e/spec.cy.js'
13591359

@@ -1624,7 +1624,7 @@ moduleTypes.forEach(({
16241624
'cypress/e2e/flaky-test-retries.js.flaky test retry always passes'
16251625
])
16261626
assert.equal(tests.filter(test => test.meta[TEST_RETRY_REASON] === TEST_RETRY_REASON_TYPES.atr).length, 0)
1627-
})
1627+
}, 25000)
16281628

16291629
const {
16301630
NODE_OPTIONS, // NODE_OPTIONS dd-trace config does not work with cypress
@@ -1683,7 +1683,7 @@ moduleTypes.forEach(({
16831683
])
16841684

16851685
assert.equal(tests.filter(test => test.meta[TEST_RETRY_REASON] === TEST_RETRY_REASON_TYPES.atr).length, 2)
1686-
})
1686+
}, 25000)
16871687

16881688
const {
16891689
NODE_OPTIONS, // NODE_OPTIONS dd-trace config does not work with cypress
@@ -1795,7 +1795,7 @@ moduleTypes.forEach(({
17951795

17961796
const testSession = events.find(event => event.type === 'test_session_end').content
17971797
assert.notProperty(testSession.meta, TEST_EARLY_FLAKE_ENABLED)
1798-
})
1798+
}, 25000)
17991799

18001800
const specToRun = 'cypress/e2e/spec.cy.js'
18011801
childProcess = exec(
@@ -1835,7 +1835,7 @@ moduleTypes.forEach(({
18351835
const test = events.find(event => event.type === 'test').content
18361836
assert.equal(test.resource, 'cypress/e2e/multi-origin.js.tests multiple origins')
18371837
assert.equal(test.meta[TEST_STATUS], 'pass')
1838-
})
1838+
}, 25000)
18391839

18401840
secondWebAppServer = http.createServer((req, res) => {
18411841
res.setHeader('Content-Type', 'text/html')
@@ -2011,7 +2011,7 @@ moduleTypes.forEach(({
20112011
}
20122012
}
20132013
}
2014-
})
2014+
}, 25000)
20152015

20162016
const runAttemptToFixTest = async ({
20172017
isAttemptToFix,
@@ -2195,7 +2195,7 @@ moduleTypes.forEach(({
21952195
assert.propertyVal(failedTest.meta, TEST_STATUS, 'fail')
21962196
assert.notProperty(failedTest.meta, TEST_MANAGEMENT_IS_DISABLED)
21972197
}
2198-
})
2198+
}, 25000)
21992199

22002200
const runDisableTest = async (isDisabling, extraEnvVars = {}) => {
22012201
const testAssertionsPromise = getTestAssertions(isDisabling)
@@ -2294,7 +2294,7 @@ moduleTypes.forEach(({
22942294
assert.propertyVal(failedTest.meta, TEST_STATUS, 'fail')
22952295
assert.notProperty(failedTest.meta, TEST_MANAGEMENT_IS_QUARANTINED)
22962296
}
2297-
})
2297+
}, 25000)
22982298

22992299
const runQuarantineTest = async (isQuarantining, extraEnvVars = {}) => {
23002300
const testAssertionsPromise = getTestAssertions(isQuarantining)
@@ -2366,7 +2366,7 @@ moduleTypes.forEach(({
23662366
const tests = events.filter(event => event.type === 'test').map(event => event.content)
23672367
// it is not retried
23682368
assert.equal(tests.length, 1)
2369-
})
2369+
}, 25000)
23702370

23712371
const {
23722372
NODE_OPTIONS,

integration-tests/vitest/vitest.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ const {
5353
DD_CAPABILITIES_IMPACTED_TESTS
5454
} = require('../../packages/dd-trace/src/plugins/util/test')
5555
const { DD_HOST_CPU_COUNT } = require('../../packages/dd-trace/src/plugins/util/env')
56+
const { NODE_MAJOR } = require('../../version')
5657

5758
const NUM_RETRIES_EFD = 3
5859

@@ -399,7 +400,10 @@ versions.forEach((version) => {
399400
})
400401

401402
// total code coverage only works for >=2.0.0
402-
if (version === 'latest') {
403+
// v4 dropped support for Node 18. Every test but this once passes, so we'll leave them
404+
// for now. The breaking change is in https://github.com/vitest-dev/vitest/commit/9a0bf2254
405+
// shipped in https://github.com/vitest-dev/vitest/releases/tag/v4.0.0-beta.12
406+
if (version === 'latest' && NODE_MAJOR >= 20) {
403407
const coverageProviders = ['v8', 'istanbul']
404408

405409
coverageProviders.forEach((coverageProvider) => {

0 commit comments

Comments
 (0)