Skip to content

Commit 5961dd4

Browse files
committed
ci(bun): simplify migration follow-ups
## Summary Exact plugin pins and reviewed copyright attribution remain authoritative; audit and package-size jobs use current Bun behavior. ## Why Flexible latest ranges let plugin sandboxes drift above the tested pin, registry author fields overwrite reviewed copyright, and stale workarounds obscure Bun 1.3.14 behavior. Dependabot now supports bun.lock, so a scheduled wrapper duplicates upstream advisory monitoring. ## Test plan - npm run test:scripts - ./node_modules/.bin/mocha scripts/test/generate-3rdparty-licenses.spec.js packages/dd-trace/test/plugins/versions.spec.js - PLUGINS=pino npm run test:plugins - npm run lint - actionlint .github/workflows/audit.yml .github/workflows/instrumentation.yml .github/workflows/project.yml - coverage-diff.js HEAD
1 parent 73ac49a commit 5961dd4

15 files changed

Lines changed: 43 additions & 1083 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
/packages/dd-trace/src/propagation-hash/ @DataDog/apm-idm-js
111111
/packages/dd-trace/test/plugins/ @DataDog/apm-idm-js
112112
/packages/dd-trace/test/process-tags.spec.js @DataDog/apm-idm-js
113-
/versions/bunfig.toml @DataDog/apm-idm-js
113+
/versions/bunfig.toml @DataDog/lang-platform-js
114114
/packages/dd-trace/src/service-naming/ @DataDog/apm-idm-js
115115
/packages/dd-trace/test/service-naming/ @DataDog/apm-idm-js
116116
/packages/dd-trace/test/payload_tagging.spec.js @DataDog/apm-idm-js
@@ -329,7 +329,6 @@
329329
/.github/actions/upload-coverage-artifact/ @DataDog/ci-app-libraries
330330
/.github/actions/upload-junit-artifacts/ @DataDog/ci-app-libraries
331331
/.github/all-green/ @DataDog/lang-platform-js
332-
/.github/audit-allowlist.json @DataDog/lang-platform-js
333332
/.github/editorconfig-checker/ @Datadog/lang-platform-js
334333
/.github/playwright/ @DataDog/ci-app-libraries
335334
/.github/selenium/ @DataDog/ci-app-libraries

.github/audit-allowlist.json

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/audit.yml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,12 @@ name: Audit
33
on:
44
pull_request:
55
paths:
6+
- ".github/workflows/audit.yml"
67
- ".github/actions/datadog-ci/bun.lock"
78
- ".github/all-green/bun.lock"
89
- "bun.lock"
910
- "docs/bun.lock"
1011
- "vendor/bun.lock"
11-
# An advisory exemption is only as good as the run that re-checks it, so changing the policy or
12-
# the wrapper that enforces it has to trigger this workflow too.
13-
- ".github/audit-allowlist.json"
14-
- ".github/workflows/audit.yml"
15-
- "scripts/audit.js"
16-
schedule:
17-
- cron: "0 6 * * 1"
18-
workflow_dispatch:
1912

2013
concurrency:
2114
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_id || github.ref }}
@@ -27,22 +20,17 @@ permissions:
2720
jobs:
2821
dependencies:
2922
runs-on: ubuntu-latest
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
directory:
34-
- "."
35-
- ".github/actions/datadog-ci"
36-
- ".github/all-green"
37-
- "docs"
38-
- "vendor"
3923
steps:
4024
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
4125
- uses: ./.github/actions/node/latest
42-
# Severity threshold and accepted advisories both live in .github/audit-allowlist.json, per directory, each with
43-
# a written reason. The wrapper also fails once an accepted advisory stops being reported, which a bare
44-
# `--ignore` list cannot do: `bun audit` takes unknown ids without complaint, so a suppression silently outlives
45-
# the advisory it was added for.
46-
- run: node scripts/audit.js "$DIRECTORY"
47-
env:
48-
DIRECTORY: ${{ matrix.directory }}
26+
# Mocha cannot take serialize-javascript 7.x yet; the vulnerable path only serializes its own test metadata.
27+
- run: bun audit --audit-level high --ignore GHSA-5c6j-r48x-rmvq
28+
# The patched OpenTelemetry major is outside the compatibility range bundled by vendor.
29+
- run: bun audit --audit-level moderate --ignore GHSA-8988-4f7v-96qf
30+
working-directory: vendor
31+
- run: bun audit --audit-level high
32+
working-directory: docs
33+
- run: bun audit --audit-level high
34+
working-directory: .github/all-green
35+
- run: bun audit --audit-level high
36+
working-directory: .github/actions/datadog-ci

.github/workflows/instrumentation.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ jobs:
157157
with:
158158
version: ${{ matrix.node-version }}
159159
- uses: ./.github/actions/install
160-
- env:
161-
_DD_IGNORE_ENGINES: 'true'
162-
run: npm run test:instrumentations:ci
160+
- run: npm run test:instrumentations:ci
163161
- uses: ./.github/actions/coverage
164162
with:
165163
flags: instrumentations-${{ github.job }}-${{ matrix.node-version }}

.github/workflows/project.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,7 @@ jobs:
109109
# `--ignore-scripts` skips the `prepare` script (the frozen vendor install):
110110
# the packed tarball ships pre-built `vendor/dist/**` artifacts but not
111111
# `vendor/bun.lock`, so a fresh consumer install can't rebuild vendor.
112-
# Bun applies the release-age gate while resolving omitted dev dependencies.
113-
# Remove them for the consumer install, then restore the shipped manifest for the size report.
114-
- run: |
115-
cp package.json /tmp/dd-trace-package.json
116-
npm pkg delete devDependencies
117-
bun --config=/tmp/dd-trace-bunfig.toml install --production --omit=optional --ignore-scripts
118-
mv /tmp/dd-trace-package.json package.json
112+
- run: bun --config=/tmp/dd-trace-bunfig.toml install --production --omit=optional --ignore-scripts
119113
- run: ls -lisa
120114
- uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
121115
id: octo-sts

LICENSE-3rdparty.csv

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"component","origin","license","copyright"
2-
"@apm-js-collab/code-transformer","https://github.com/nodejs/orchestrion-js","['Apache-2.0']","[]"
3-
"@datadog/flagging-core","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","[]"
2+
"@apm-js-collab/code-transformer","https://github.com/nodejs/orchestrion-js","['Apache-2.0']","['nodejs']"
3+
"@datadog/flagging-core","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
44
"@datadog/libdatadog","https://github.com/DataDog/libdatadog-nodejs","['Apache-2.0']","['Datadog Inc.']"
55
"@datadog/native-appsec","https://github.com/DataDog/dd-native-appsec-js","['Apache-2.0']","['Datadog Inc.']"
66
"@datadog/native-iast-taint-tracking","https://github.com/DataDog/dd-native-iast-taint-tracking-js","['Apache-2.0']","['Datadog Inc.']"
77
"@datadog/native-metrics","https://github.com/DataDog/dd-native-metrics-js","['Apache-2.0']","['Datadog Inc.']"
8-
"@datadog/openfeature-node-server","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","[]"
8+
"@datadog/openfeature-node-server","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
99
"@datadog/pprof","https://github.com/DataDog/pprof-nodejs","['Apache-2.0']","['Google Inc.']"
10-
"@datadog/sketches-js","https://github.com/DataDog/sketches-js","['Apache-2.0']","[]"
10+
"@datadog/sketches-js","https://github.com/DataDog/sketches-js","['Apache-2.0']","['DataDog']"
1111
"@datadog/wasm-js-rewriter","https://github.com/DataDog/dd-wasm-js-rewriter","['Apache-2.0']","['Datadog Inc.']"
1212
"@emnapi/core","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
1313
"@emnapi/runtime","https://github.com/toyobayashi/emnapi","['MIT']","['toyobayashi']"
@@ -45,8 +45,8 @@
4545
"@oxc-parser/binding-win32-x64-msvc","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
4646
"@oxc-project/types","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
4747
"@tybys/wasm-util","https://github.com/toyobayashi/wasm-util","['MIT']","['toyobayashi']"
48-
"@types/estree","https://github.com/DefinitelyTyped/DefinitelyTyped","['MIT']","['RReverser']"
49-
"argparse","https://github.com/nodeca/argparse","['Python-2.0']","[]"
48+
"@types/estree","https://github.com/DefinitelyTyped/DefinitelyTyped","['MIT']","['DefinitelyTyped']"
49+
"argparse","https://github.com/nodeca/argparse","['Python-2.0']","['nodeca']"
5050
"astring","https://github.com/davidbonnet/astring","['MIT']","['David Bonnet']"
5151
"cjs-module-lexer","https://github.com/nodejs/cjs-module-lexer","['MIT']","['Guy Bedford']"
5252
"crypto-randomuuid","npm:crypto-randomuuid","['MIT']","['Stephen Belanger']"
@@ -56,24 +56,24 @@
5656
"es-module-lexer","https://github.com/guybedford/es-module-lexer","['MIT']","['Guy Bedford']"
5757
"escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp","['MIT']","['Sindre Sorhus']"
5858
"esquery","https://github.com/estools/esquery","['BSD-3-Clause']","['Joel Feenstra']"
59-
"estraverse","https://github.com/estools/estraverse","['BSD-2-Clause']","[]"
59+
"estraverse","https://github.com/estools/estraverse","['BSD-2-Clause']","['estools']"
6060
"fast-fifo","https://github.com/mafintosh/fast-fifo","['MIT']","['Mathias Buus']"
6161
"import-in-the-middle","https://github.com/nodejs/import-in-the-middle","['Apache-2.0']","['Bryan English']"
6262
"istanbul-lib-coverage","https://github.com/istanbuljs/istanbuljs","['BSD-3-Clause']","['Krishnan Anantheswaran']"
63-
"jest-docblock","https://github.com/jestjs/jest","['MIT']","[]"
64-
"js-yaml","https://github.com/nodeca/js-yaml","['MIT']","['Vladimir Zapparov', 'Aleksey V Zapparov', 'Vitaly Puzrin', 'Martin Grenfell']"
63+
"jest-docblock","https://github.com/jestjs/jest","['MIT']","['jestjs']"
64+
"js-yaml","https://github.com/nodeca/js-yaml","['MIT']","['Vladimir Zapparov']"
6565
"jsep","https://github.com/EricSmekens/jsep","['MIT']","['Stephen Oney']"
66-
"jsonpath-plus","https://github.com/s3u/JSONPath","['MIT']","['Stefan Goessner', 'Prof. Gössner', 'Subbu Allamaraju', 'Mike Brevoort', 'Robert Krahn', 'Brett Zamir', 'Richard Schneider']"
66+
"jsonpath-plus","https://github.com/s3u/JSONPath","['MIT']","['Stefan Goessner']"
6767
"limiter","https://github.com/jhurliman/node-rate-limiter","['MIT']","['John Hurliman']"
68-
"lodash.sortby","https://github.com/lodash/lodash","['MIT']","['John-David Dalton', 'Blaine Bublitz', 'Mathias Bynens']"
68+
"lodash.sortby","https://github.com/lodash/lodash","['MIT']","['John-David Dalton']"
6969
"long","https://github.com/dcodeIO/long.js","['Apache-2.0']","['Daniel Wirtz']"
7070
"lru-cache","https://github.com/isaacs/node-lru-cache","['ISC']","['Isaac Z. Schlueter']"
71-
"meriyah","https://github.com/meriyah/meriyah","['ISC']","['Kenny F.', 'Chunpeng Huo']"
71+
"meriyah","https://github.com/meriyah/meriyah","['ISC']","['Kenny F.']"
7272
"module-details-from-path","https://github.com/watson/module-details-from-path","['MIT']","['Thomas Watson']"
7373
"mutexify","https://github.com/mafintosh/mutexify","['MIT']","['Mathias Buus']"
74-
"node-addon-api","https://github.com/nodejs/node-addon-api","['MIT']","['Abhishek Kumar Singh', 'Alba Mendez', 'Alexander Floh', 'Ammar Faizi', 'András Timár, Dr', 'Andrew Petersen', 'Anisha Rohra', 'Anna Henningsen', 'Arnaud Botella', 'Arunesh Chandra', 'Azlan Mukhtar', 'Ben Berman', 'Benjamin Byholm', 'Bill Gallafent', 'blagoev', 'Bruce A. MacNaughton', 'Cory Mickelson', 'Daniel Bevenius', 'Dante Calderón', 'Darshan Sen', 'David Halls', 'Deepak Rajamohan', 'Dmitry Ashkadov', 'Dongjin Na', 'Doni Rubiagatra', 'Eric Bickle', 'extremeheat', 'Feng Yu', 'Ferdinand Holzer', 'Gabriel Schulhof', 'Guenter Sandner', 'Gus Caplan', 'Helio Frota', 'Hitesh Kanwathirtha', 'ikokostya', 'Jack Xia', 'Jake Barnes', 'Jake Yoon', 'Jason Ginchereau', 'Jenny', 'Jeroen Janssen', 'Jim Schlight', 'Jinho Bang', 'José Expósito', 'joshgarde', 'Julian Mesa', 'Kasumi Hanazuki', 'Kelvin', 'Kevin Eady', 'Kévin VOYER', 'kidneysolo', 'Koki Nishihara', 'Konstantin Tarkus', 'Kyle Farnung', 'Kyle Kovacs', 'legendecas', 'LongYinan', 'Lovell Fuller', 'Luciano Martorella', 'mastergberry', 'Mathias Küsel', 'Mathias Stearn', 'Matteo Collina', 'Michael Dawson', 'Michael Price', 'Michele Campus', 'Mikhail Cheshkov', 'nempoBu4', 'Nicola Del Gobbo', 'Nick Soggin', 'Nikolai Vavilov', 'Nurbol Alpysbayev', 'pacop', 'Peter Šándor', 'Philipp Renoth', 'rgerd', 'Richard Lau', 'Rolf Timmermans', 'Ross Weir', 'Ryuichi Okumura', 'Saint Gabriel', 'Sampson Gao', 'Sam Roberts', 'strager', 'Taylor Woll', 'Thomas Gentilhomme', 'Tim Rach', 'Tobias Nießen', 'todoroff', 'Toyo Li', 'Tux3', 'Vlad Velmisov', 'Vladimir Morozov', 'WenheLI', 'Xuguang Mei', 'Yohei Kishimoto', 'Yulong Wang', 'Ziqiu Zhao']"
74+
"node-addon-api","https://github.com/nodejs/node-addon-api","['MIT']","['nodejs']"
7575
"node-gyp-build","https://github.com/prebuild/node-gyp-build","['MIT']","['Mathias Buus']"
76-
"opentracing","https://github.com/opentracing/opentracing-javascript","['Apache-2.0']","[]"
76+
"opentracing","https://github.com/opentracing/opentracing-javascript","['Apache-2.0']","['opentracing']"
7777
"oxc-parser","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
7878
"pprof-format","https://github.com/DataDog/pprof-format","['MIT']","['Datadog Inc.']"
7979
"protobufjs","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
@@ -82,7 +82,7 @@
8282
"rfdc","https://github.com/davidmarkclements/rfdc","['MIT']","['David Mark Clements']"
8383
"semifies","https://github.com/holepunchto/semifies","['Apache-2.0']","['Holepunch Inc']"
8484
"shell-quote","https://github.com/ljharb/shell-quote","['MIT']","['James Halliday']"
85-
"source-map","https://github.com/mozilla/source-map","['BSD-3-Clause']","['Nick Fitzgerald', 'Tobias Koppers', 'Duncan Beevers', 'Stephen Crane', 'Ryan Seddon', 'Miles Elam', 'Mihai Bazon', 'Michael Ficarra', 'Todd Wolfson', 'Alexander Solovyov', 'Felix Gnass', 'Conrad Irwin', 'usrbincc', 'David Glasser', 'Chase Douglas', 'Evan Wallace', 'Heather Arthur', 'Hugh Kennedy', 'Simon Lydell', 'Jmeas Smith', 'Michael Z Goddard', 'azu', 'John Gozde', 'Adam Kirkton', 'Chris Montgomery', 'J. Ryan Stinnett', 'Jack Herrington', 'Chris Truter', 'Daniel Espeset', 'Jamie Wong', 'Eddy Bruël', 'Hawken Rives', 'Gilad Peleg', 'djchie', 'Gary Ye', 'Nicolas Lalevée']"
85+
"source-map","https://github.com/mozilla/source-map","['BSD-3-Clause']","['Nick Fitzgerald']"
8686
"spark-md5","https://github.com/satazor/js-spark-md5","['(WTFPL OR MIT)']","['André Cruz']"
8787
"tlhunter-sorted-set","https://github.com/tlhunter/node-sorted-set","['MIT']","['Thomas Hunter II']"
8888
"tslib","https://github.com/Microsoft/tslib","['0BSD']","['Microsoft Corp.']"

packages/dd-trace/test/plugins/versions.spec.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ const { coerce, major, maxSatisfying } = require('semver')
77

88
const {
99
brokenVersionReason,
10-
getCappedRange,
1110
getVersionList,
1211
resolvePluginVersions,
1312
} = require('./versions')
@@ -19,17 +18,6 @@ const keys = (name, versions, nonConsecutive) =>
1918

2019
const latestMajorKey = name => String(major(coerce(latests[name])))
2120

22-
describe('getCappedRange', () => {
23-
it('keeps latest requests flexible below the pinned ceiling', () => {
24-
assert.equal(getCappedRange('mongodb', 'latest'), `<=${latests.mongodb}`)
25-
assert.equal(getCappedRange('mongodb', ''), `<=${latests.mongodb}`)
26-
})
27-
28-
it('keeps exact requests pinned so the release-age gate can reject them', () => {
29-
assert.equal(getCappedRange('mongodb', '1.2.3'), '1.2.3')
30-
})
31-
})
32-
3321
describe('getVersionList', () => {
3422
it('collapses the wildcard to the latest major', () => {
3523
assert.deepEqual(keys('mongodb', ['*']), [latestMajorKey('mongodb')])

packages/dd-trace/test/plugins/versions/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function capSubrange (name, subrange) {
5555
)
5656
}
5757

58-
if (!subrange || subrange === 'latest') return `<=${latests[name]}`
58+
if (!subrange || subrange === 'latest') return latests[name]
5959
if (subset(subrange, `<=${latests[name]}`)) return subrange
6060
if (subrange.includes(' - ')) {
6161
const minRange = subrange.split(' - ')[0].trim()

0 commit comments

Comments
 (0)