Skip to content

Commit ee8a010

Browse files
committed
Normalized version handling and added appsec and profiling tests
1 parent b52e380 commit ee8a010

File tree

16 files changed

+72
-46
lines changed

16 files changed

+72
-46
lines changed

.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' && env.NIGHTLY_VERSION || '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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@ on:
88
- cron: 0 4 * * *
99
workflow_dispatch:
1010
inputs:
11-
nightly-version:
12-
description: 'Nightly node version to use'
11+
latest-version:
12+
description: 'Node version to use'
1313
required: false
14-
default: 'false'
1514
type: string
1615

1716

1817
concurrency:
19-
group: ${{ inputs.nightly-version && format('{0}-{1}', github.workflow, inputs.nightly-version) || github.workflow }}-${{ github.ref || github.run_id }}"
18+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
2019
cancel-in-progress: true
2120

2221
env:
2322
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
24-
NIGHTLY_VERSION: ${{ inputs.nightly-version && format('{0}-{1}', inputs.nightly-version, 'nightly') }}
23+
LATEST_VERSION: ${{ inputs.latest-version }}
2524

2625
jobs:
2726
tracing-macos:

.github/workflows/apm-integrations.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@ on:
88
- cron: 0 4 * * *
99
workflow_dispatch:
1010
inputs:
11-
nightly-version:
12-
description: 'Nightly node version to run'
11+
latest-version:
12+
description: 'Node version to run'
1313
required: false
14-
default: 'false'
1514
type: string
1615

1716

1817
concurrency:
19-
group: ${{ inputs.nightly-version == 'true' && format('{0}-{1}', github.workflow, inputs.nightly-version) || github.workflow }}-${{ github.ref || github.run_id }}"
18+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
2019
cancel-in-progress: true
2120

2221
env:
2322
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
24-
NIGHTLY_VERSION: ${{ inputs.nightly-version && format('{0}-{1}', inputs.nightly-version, 'nightly') }}
23+
LATEST_VERSION: ${{ inputs.latest-version }}
2524

2625
# TODO: upstream jobs
2726

.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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,18 @@ on:
88
- cron: 0 4 * * *
99
workflow_dispatch:
1010
inputs:
11-
nightly-version:
12-
description: 'Nightly node version to use'
11+
latest-version:
12+
description: 'Node version to use'
1313
required: false
14-
default: 'false'
1514
type: string
1615

1716
concurrency:
18-
group: ${{ inputs.nightly-version && format('{0}-{1}', github.workflow, inputs.nightly-version)|| github.workflow }}-${{ github.ref || github.run_id }}"
17+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1918
cancel-in-progress: true
2019

2120
env:
2221
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
23-
NIGHTLY_VERSION: ${{ inputs.nightly-version && format('{0}-{1}', inputs.nightly-version, 'nightly') }}
22+
LATEST_VERSION: ${{ inputs.latest-version }}
2423

2524
jobs:
2625
sdk:

.github/workflows/nightly-dispatch.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ on:
3232
required: false
3333
default: true
3434
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
3545

3646
permissions:
3747
actions: write
@@ -50,10 +60,12 @@ jobs:
5060
- llmobs
5161
- platform
5262
- serverless
63+
- appsec
64+
- profiling
5365
runs-on: ubuntu-latest
5466
steps:
5567
- name: Trigger ${{matrix.workflow }} workflow
5668
if: ${{ inputs[matrix.workflow] }}
57-
run: gh workflow run ${{matrix.workflow}}.yml --repo ${{ github.repository }} --ref ${{ env.BRANCH_NAME }} -f nightly-version=${{ inputs.node-version }}
69+
run: gh workflow run ${{matrix.workflow}}.yml --repo ${{ github.repository }} --ref ${{ env.BRANCH_NAME }} -f latest-version=${{ inputs.node-version }}
5870
env:
5971
GH_TOKEN: ${{ github.token }}

.github/workflows/platform.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,18 @@ on:
88
- cron: 0 4 * * *
99
workflow_dispatch:
1010
inputs:
11-
nightly-version:
12-
description: 'Nightly node version to use'
11+
latest-version:
12+
description: 'Node version to use'
1313
required: false
14-
default: 'false'
1514
type: string
1615

1716
concurrency:
18-
group: ${{ inputs.nightly-version && format('{0}-{1}', github.workflow, inputs.nightly-version) || github.workflow }}-${{ github.ref || github.run_id }}"
17+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
1918
cancel-in-progress: true
2019

2120
env:
2221
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
23-
NIGHTLY_VERSION: ${{ inputs.nightly-version && format('{0}-{1}', inputs.nightly-version, 'nightly') }}
22+
LATEST_VERSION: ${{ inputs.latest-version }}
2423

2524
# TODO: upstream jobs
2625

.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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@ on:
88
- cron: 0 4 * * *
99
workflow_dispatch:
1010
inputs:
11-
nightly-version:
12-
description: 'Nightly node version to use'
11+
latest-version:
12+
description: 'Node version to use'
1313
required: false
14-
default: 'false'
1514
type: string
1615

1716

1817
concurrency:
19-
group: ${{ inputs.nightly-version && format('{0}-{1}', github.workflow, inputs.nightly-version) || github.workflow }}-${{ github.ref || github.run_id }}"
18+
group: ${{ github.workflow }}-${{ inputs.latest-version }}-${{ github.ref || github.run_id }}"
2019
cancel-in-progress: true
2120

2221
env:
2322
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}
24-
NIGHTLY_VERSION: ${{ inputs.nightly-version && format('{0}-{1}', inputs.nightly-version, 'nightly') }}
23+
LATEST_VERSION: ${{ inputs.latest-version }}
2524

2625

2726
jobs:

packages/datadog-plugin-avsc/test/index.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const {
1616
const sinon = require('sinon')
1717
const { loadMessage } = require('./helpers')
1818
const { SchemaBuilder } = require('../../dd-trace/src/datastreams/schemas/schema_builder')
19-
const { IS_NIGHTLY } = require('../../../version')
19+
const { NODE_MAJOR } = require('../../../version')
2020

2121
const BASIC_USER_SCHEMA_DEF = JSON.parse(
2222
fs.readFileSync(path.join(__dirname, 'schemas/expected_user_schema.json'), 'utf8')
@@ -41,7 +41,7 @@ describe('Plugin', () => {
4141
let mockTime = 0
4242

4343
// avsc version 5.0.0 currently does not support a nodeMajor version greater than major version 24
44-
withVersions('avsc', ['avsc'], IS_NIGHTLY ? '>5.0.0' : undefined, (version) => {
44+
withVersions('avsc', ['avsc'], NODE_MAJOR >= 25 ? '>5.0.0' : undefined, (version) => {
4545
before(() => {
4646
tracer = require('../../dd-trace').init()
4747
// reset sampled schemas

0 commit comments

Comments
 (0)