Skip to content

Commit eb9030c

Browse files
authored
nightly testing (#6629)
* Testing using env * Added workflow_call into workflows * Compatability changes with node 25 * Added env into pending workflow * Changed next job to use prebuilt action * removed runNightly from cancel-in-progress * Simplified next job * fix to input reference * Changed kafka test to use test action and readded reusable llmobs action * Fix grammar issue and used with versions * testing nightly as workflow dispatch * Changes to nightly dispatch yml * Added gh token into env * Added changes to simplify workflow * Set back to some original job design, resolved conflicts * fixed format error * fixed format error * Removed extra hyphen * Comment change and added NODE_VERSION into versions file * Set back changes on grpc client * Modified env, generalized node major usage and code quality changes * Added missing brackets * Reinstated serverless group * Normalized version handling and added appsec and profiling tests
1 parent cdbcc24 commit eb9030c

20 files changed

Lines changed: 139 additions & 58 deletions

File tree

.github/actions/node/action.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ runs:
1010
steps:
1111
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
1212
with:
13-
node-version: ${{ inputs.version == 'eol' && '16' || inputs.version == 'oldest' && '18' || inputs.version == 'maintenance' && '20' || inputs.version == 'active' && '22' || inputs.version == 'latest' && '24' || inputs.version }}
13+
node-version: ${{
14+
inputs.version == 'eol' && '16' ||
15+
inputs.version == 'oldest' && '18' ||
16+
inputs.version == 'maintenance' && '20' ||
17+
inputs.version == 'active' && '22' ||
18+
inputs.version == 'latest' && (env.LATEST_VERSION || '24') ||
19+
inputs.version }}
1420
check-latest: true
1521
registry-url: ${{ inputs.registry-url || 'https://registry.npmjs.org' }}

.github/workflows/apm-capabilities.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ on:
66
branches: [master]
77
schedule:
88
- cron: 0 4 * * *
9+
workflow_dispatch:
10+
inputs:
11+
latest-version:
12+
description: 'Node version to use'
13+
required: false
14+
type: string
15+
916

1017
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
18+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1219
cancel-in-progress: true
1320

1421
env:
1522
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
23+
LATEST_VERSION: ${{ inputs.latest-version }}
1624

1725
jobs:
1826
tracing-macos:

.github/workflows/apm-integrations.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,21 @@ on:
66
branches: [master]
77
schedule:
88
- cron: 0 4 * * *
9+
workflow_dispatch:
10+
inputs:
11+
latest-version:
12+
description: 'Node version to run'
13+
required: false
14+
type: string
15+
916

1017
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
18+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1219
cancel-in-progress: true
1320

1421
env:
1522
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
23+
LATEST_VERSION: ${{ inputs.latest-version }}
1624

1725
# TODO: upstream jobs
1826

@@ -750,6 +758,7 @@ jobs:
750758
service: dd-trace-js-tests
751759

752760
# TODO: fix performance issues and test more Node versions
761+
753762
next:
754763
strategy:
755764
fail-fast: false

.github/workflows/appsec.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ on:
66
branches: [master]
77
schedule:
88
- cron: 0 4 * * *
9+
workflow_dispatch:
10+
inputs:
11+
latest-version:
12+
description: 'Node version to use'
13+
required: false
14+
type: string
915

1016
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
17+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1218
cancel-in-progress: true
1319

1420
env:
1521
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
22+
LATEST_VERSION: ${{ inputs.latest-version }}
1623

1724
jobs:
1825
macos:

.github/workflows/llmobs.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ on:
66
branches: [master]
77
schedule:
88
- cron: 0 4 * * *
9+
workflow_dispatch:
10+
inputs:
11+
latest-version:
12+
description: 'Node version to use'
13+
required: false
14+
type: string
915

1016
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
17+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1218
cancel-in-progress: true
1319

1420
env:
1521
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
22+
LATEST_VERSION: ${{ inputs.latest-version }}
1623

1724
jobs:
1825
sdk:

.github/workflows/nightly-dispatch.yml

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,53 +3,69 @@ name: Nightly Testing
33
on:
44
workflow_dispatch:
55
inputs:
6-
runApmIntegrations:
6+
node-version:
7+
description: 'Node Version To Use'
8+
required: true
9+
type: number
10+
apm-integrations:
711
description: 'APM Integration Tests'
812
required: false
913
default: true
1014
type: boolean
11-
runApmCapabilities:
15+
apm-capabilities:
1216
description: 'APM Capabilities Tests'
1317
required: false
1418
default: true
1519
type: boolean
16-
runLlmobs:
20+
llmobs:
1721
description: 'LLM-OBS Tests'
1822
required: false
1923
default: true
2024
type: boolean
21-
runPlatform:
25+
platform:
2226
description: 'Platform Tests'
2327
required: false
2428
default: true
2529
type: boolean
26-
runServerless:
30+
serverless:
2731
description: 'Serverless Tests'
2832
required: false
2933
default: true
3034
type: boolean
35+
profiling:
36+
description: 'Profiling Tests'
37+
required: false
38+
default: true
39+
type: boolean
40+
appsec:
41+
description: 'AppSec Tests'
42+
required: false
43+
default: true
44+
type: boolean
45+
46+
permissions:
47+
actions: write
48+
contents: read
49+
50+
env:
51+
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
3152

3253
jobs:
33-
nightly:
54+
run-nightly:
55+
strategy:
56+
matrix:
57+
workflow:
58+
- apm-integrations
59+
- apm-capabilities
60+
- llmobs
61+
- platform
62+
- serverless
63+
- appsec
64+
- profiling
3465
runs-on: ubuntu-latest
3566
steps:
36-
- uses: ./.github/workflows/apm-integrations
37-
if: inputs.runApmIntegrations
38-
with:
39-
runNightly: 'true'
40-
- uses: ./.github/workflows/apm-capabilities
41-
if: inputs.runApmCapabilities
42-
with:
43-
runNightly: 'true'
44-
- uses: ./.github/workflows/llmobs
45-
if: inputs.runLlmobs
46-
with:
47-
runNightly: 'true'
48-
- uses: ./.github/workflows/platform
49-
if: inputs.runPlatform
50-
with:
51-
runNightly: 'true'
52-
- uses: ./.github/workflows/serverless
53-
if: inputs.runServerless
54-
with:
55-
runNightly: 'true'
67+
- name: Trigger ${{matrix.workflow }} workflow
68+
if: ${{ inputs[matrix.workflow] }}
69+
run: gh workflow run ${{matrix.workflow}}.yml --repo ${{ github.repository }} --ref ${{ env.BRANCH_NAME }} -f latest-version=${{ inputs.node-version }}
70+
env:
71+
GH_TOKEN: ${{ github.token }}

.github/workflows/platform.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ on:
66
branches: [master]
77
schedule:
88
- cron: 0 4 * * *
9+
workflow_dispatch:
10+
inputs:
11+
latest-version:
12+
description: 'Node version to use'
13+
required: false
14+
type: string
915

1016
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
17+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1218
cancel-in-progress: true
1319

1420
env:
1521
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
22+
LATEST_VERSION: ${{ inputs.latest-version }}
1623

1724
# TODO: upstream jobs
1825

.github/workflows/profiling.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ on:
66
branches: [master]
77
schedule:
88
- cron: 0 4 * * *
9+
workflow_dispatch:
10+
inputs:
11+
latest-version:
12+
description: 'Node version to use'
13+
required: false
14+
type: string
915

1016
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
17+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1218
cancel-in-progress: true
1319

1420
env:
1521
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
22+
LATEST_VERSION: ${{ inputs.latest-version }}
1623

1724
jobs:
1825
macos:

.github/workflows/serverless.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@ on:
66
branches: [master]
77
schedule:
88
- cron: 0 4 * * *
9+
workflow_dispatch:
10+
inputs:
11+
latest-version:
12+
description: 'Node version to use'
13+
required: false
14+
type: string
15+
916

1017
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
18+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1219
cancel-in-progress: true
1320

1421
env:
1522
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
23+
LATEST_VERSION: ${{ inputs.latest-version }}
24+
1625

1726
jobs:
1827
lambda:

integration-tests/init.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ const fs = require('fs')
1414
const DD_INJECTION_ENABLED = 'tracing'
1515
const DD_INJECT_FORCE = 'true'
1616
const DD_TRACE_DEBUG = 'true'
17+
const { NODE_VERSION } = require('../version')
1718

1819
const telemetryAbort = ['abort', 'reason:incompatible_runtime', 'abort.runtime', '']
1920
const telemetryForced = ['complete', 'injection_forced:true']
2021
const telemetryGood = ['complete', 'injection_forced:false']
2122

2223
const { engines } = require('../package.json')
2324
const supportedRange = engines.node
24-
const currentVersionIsSupported = semver.satisfies(process.versions.node, supportedRange)
25-
25+
const currentVersionIsSupported = semver.satisfies(NODE_VERSION, supportedRange)
2626
// These are on by default in release tests, so we'll turn them off for
2727
// more fine-grained control of these variables in these tests.
2828
delete process.env.DD_INJECTION_ENABLED

0 commit comments

Comments
 (0)