Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
d46edde
[test optimization] Use duration buckets for playwright EFD retries (…
juan-fernandez May 8, 2026
9640cc9
[test-optimization] Propagate ITR skipping enabled tag to suites and …
anmarchenko May 8, 2026
32a0e2c
fix(config): disable OTLP only when protocolVersion is explicitly set…
BridgeAR May 8, 2026
6207fcb
[test optimization] Support Jest 30.4.1 (#8361)
juan-fernandez May 8, 2026
10b675e
[test optimization] Bump cucumber latest version (#8364)
juan-fernandez May 8, 2026
2a23d22
[test optimization] Bump playwright support to 1.59 (#8363)
juan-fernandez May 8, 2026
cfc1aca
fix(plugin-mysql): destructure CLIENT_PORT_KEY from the constants mod…
BridgeAR May 8, 2026
6869ab6
fix(aws-sdk): global crypto error (#8368)
pabloerhard May 8, 2026
d1e8502
test: add a few database tests to cover recent reports better (#7534)
BridgeAR May 8, 2026
e6ab534
chore(couchbase): drop SDK 2.x instrumentation hook (#8362)
BridgeAR May 8, 2026
96e9535
docs(plugins): drop deprecated whitelist/blacklist plugin types from …
BridgeAR May 8, 2026
c923a74
refactor(azure-metadata): parse WEBSITE_OWNER_NAME without regex (#8348)
BridgeAR May 8, 2026
8f22819
fix(grpc): require a colon and a strictly numeric tail before tagging…
BridgeAR May 8, 2026
f6a9813
perf(mongodb): fold limit-depth and bigint sanitisation into one pass…
BridgeAR May 8, 2026
912dbb1
perf(pubsub): trim per-message allocations in publish hot path (#8374)
BridgeAR May 8, 2026
24cafd2
chore(deps): bump dc-polyfill from 0.1.10 to 0.1.11 (#8369)
bm1549 May 8, 2026
d292fe0
perf(grpc): cache method metadata, drop banned for-in walks (#8377)
BridgeAR May 9, 2026
fda53fa
perf(database): cache the DBM SQL injection comment per connection (#…
BridgeAR May 9, 2026
d65513c
perf(mongodb): cache the per-connection topology shape (#8370)
BridgeAR May 9, 2026
4747e93
perf(aws-sdk): trim per-response allocations (#8328)
BridgeAR May 9, 2026
9479c71
ci: replace CodeQL workflow with default setup configuration (#8380)
rochdev May 9, 2026
7284dcc
chore(deps-dev): bump nock from 13.5.6 to 14.0.14 (#8280)
dependabot[bot] May 9, 2026
cd06c76
test(ws): refactor lifecycle hooks to use dynamic ports and separate …
rochdev May 9, 2026
fa66354
fix(stacktrace): filter dd-trace instrumentation frames for any repo …
rochdev May 9, 2026
d687f26
fix(tracing): fix TypeError in ritm.js when requiring node:-prefixed …
yuichi0301 May 9, 2026
d592b61
chore(deps): bump openai (#8360)
dependabot[bot] May 9, 2026
73ba2d1
chore(deps): bump the test-versions group across 1 directory with 2 u…
dependabot[bot] May 11, 2026
26039a2
docs(iast): drop deprecated securityControls type (#8315)
BridgeAR May 11, 2026
c8bf4cd
[test optimization] Use duration buckets for cypress EFD retries (#8290)
juan-fernandez May 11, 2026
9b3a2a3
chore: key the cache on DD_TRACE_GIT_METADATA_ENABLED (#8395)
BridgeAR May 11, 2026
dca39f2
[test optimization] bump vitest latest version (#8383)
juan-fernandez May 11, 2026
4d71a8c
[test optimization] bump cypress latest version (#8365)
juan-fernandez May 11, 2026
dbf9e03
Send hidden tags under _dd.ci.library_configuration_error in every ev…
cbasitodx May 11, 2026
bcccba8
test(ci-visibility): disable real net access in git_metadata (#8416)
BridgeAR May 11, 2026
2fceea0
[test optimization] Mitigate jest flakiness (#8415)
juan-fernandez May 11, 2026
c21e0f3
[test optimization] Restore retries to test optimization tests (#8414)
juan-fernandez May 11, 2026
1a2fa45
[test optimization] Mitigate `vitest` flakiness (#8417)
juan-fernandez May 11, 2026
06d0ac5
fix(benchmark): restore five crashing sirun bench groups (#8307)
BridgeAR May 11, 2026
5fa730e
docs(appsec): drop deprecated extended-headers and rasp.bodyCollectio…
BridgeAR May 11, 2026
cc1385a
fix(llmobs): bound Bedrock token-headers cache (#8161)
BridgeAR May 11, 2026
0c5ad82
ci: activate codecov coverage minimum for PRs (#8209)
BridgeAR May 11, 2026
1ee7253
perf(encode): emit span fields and event attributes as compact msgpac…
BridgeAR May 11, 2026
32840f4
chore(benchmark): drop Node 18 from sirun matrix and add Node 26 (#8423)
BridgeAR May 11, 2026
105fe56
chore(ci) update one-pipeline (#8424)
gh-worker-campaigns-3e9aa4[bot] May 11, 2026
6321200
test(http): cover server-side request hook resource.name override (#8…
BridgeAR May 11, 2026
d471b21
perf(redis): tighten per-command instrumentation (#8310)
BridgeAR May 11, 2026
3fbc3e9
fix(fetch): rename globalThis.fetch wrapper from "value" to "fetch" (…
BridgeAR May 11, 2026
227e643
perf(pg): assign the injectable text directly when configurable (#8372)
BridgeAR May 11, 2026
cee68eb
chore: support re-runs in the community PR CI script (#8385)
BridgeAR May 11, 2026
3ec972b
test(pg): pin prepared-statement reuse under DBM full mode (#8398)
BridgeAR May 11, 2026
4d07891
refactor(config)!: gate experimental.iast aliases off in v6 (#8320)
BridgeAR May 11, 2026
b9ce28f
perf(graphql): trim per-resolver allocations (#8309)
BridgeAR May 11, 2026
0662eaa
fix(llmobs): avoid malformed x-datadog-tags when carrier header is un…
heyitsgrace996 May 11, 2026
2f65139
docs: fix legacyBaggageEnabled default value and MIGRATING.md (#8317)
BridgeAR May 11, 2026
710b176
perf(couchbase): cache the per-operation channel bag (#8373)
BridgeAR May 11, 2026
9f26f9c
ci(benchmarks): fail sirun job when individual variants crash (#8292)
faydef May 11, 2026
a56ab74
refactor(lambda): collapse runtime/ritm.js into index.js (#8397)
BridgeAR May 11, 2026
ac6c554
test(setup): isolate getInstrumentation from production addHook (#8396)
BridgeAR May 11, 2026
d0d9c88
fix(kafka): stop mutating caller-owned message.headers (#8388)
BridgeAR May 11, 2026
f5f2df5
bench: fix benchmarks running unsupported Node.js 26 (#8430)
BridgeAR May 12, 2026
48e31d3
refactor(config)!: gate experimental b3, profiling, and b3 single hea…
BridgeAR May 12, 2026
4f5ada1
[test optimization] propagate DD_CUSTOM_PARENT_ID for Jenkins (#8433)
DaniFdz May 12, 2026
d2535b8
refactor(config)!: gate experimental.appsec, plugins, ingestion shape…
BridgeAR May 12, 2026
f577324
implement ai guard telemetry metrics (#8093)
IlyasShabi May 12, 2026
1a60969
refactor: drop JSDoc @param defaults (#8350)
BridgeAR May 12, 2026
2e086d6
fix(pg): stop accumulating DBM comments on reused query objects (#8400)
BridgeAR May 12, 2026
c84f379
fix(ci): prevent Buildkite non-PR builds from being tagged as PRs (#8…
juan-fernandez May 12, 2026
688df33
test(ci-visibility): gather payloads until child exits (#8419)
BridgeAR May 12, 2026
86e2244
fix(kafkajs): read clusterId from existing metadata (#8389)
BridgeAR May 12, 2026
a2a4936
test(ci-visibility): wait for cypress child exit before next test (#8…
BridgeAR May 12, 2026
769fc01
perf(graphql): memoize the apollo signature pipeline (#8308)
BridgeAR May 12, 2026
b47cfa0
ci: update playwright-tools image to 1.54.1-5 (#8440)
rochdev May 12, 2026
865451b
ci: add dd-octo-sts policies for upcoming workflow rate-limit changes…
rochdev May 12, 2026
07c73b8
Revert "ci: replace CodeQL workflow with default setup configuration …
rochdev May 12, 2026
dced9fa
chore(deps-dev): bump the dev-minor-and-patch-dependencies group acro…
dependabot[bot] May 13, 2026
be942a2
chore(deps): bump the gh-actions-packages group across 2 directories …
dependabot[bot] May 13, 2026
33c9214
fix: pin specific @datadog/openfeature-node-server version (#8456)
May 13, 2026
17e8473
fix(mocha): report test_suite_end for files with no describe wrapper …
cbasitodx May 13, 2026
a6cf882
chore(deps-dev): bump eslint-plugin-n from 17.24.0 to 18.0.1 (#8448)
dependabot[bot] May 13, 2026
4d9a8fc
chore(deps-dev): bump sinon from 21.1.2 to 22.0.0 (#8447)
dependabot[bot] May 13, 2026
52a7b17
chore(deps): bump oxc-parser from 0.128.0 to 0.129.0 in the runtime-m…
dependabot[bot] May 13, 2026
e46e8b3
chore(aiguard): Fix ai guard flaky test (#8454)
May 13, 2026
276b790
refactor(config): route env reads through the config singleton (#8241)
BridgeAR May 13, 2026
1fa0426
fix(config): keep v5 IAST programmatic aliases working (#8457)
BridgeAR May 13, 2026
e86664d
ci(serverless): use tags for serverless-tools ci (#8213)
ojproductions May 13, 2026
9b6ce09
[test optimization] Fix playwright v5 tests (#8458)
juan-fernandez May 13, 2026
f0ef6b7
[test optimization] stabilize web app server lifecycle (#8444)
juan-fernandez May 13, 2026
0589708
feat(electron): add initial support (#7002)
rochdev May 13, 2026
3db8536
ci: route high-volume CI API calls through dd-octo-sts (#8391)
rochdev May 13, 2026
257cbfb
ci(llmobs): parallelize openai job by Node version (#8471)
rochdev May 13, 2026
fdad512
fix(lint): validate config names against both index.d.ts and index.d.…
rochdev May 13, 2026
7679722
bump native-metrics to 3.1.2 (#8473)
rochdev May 13, 2026
1a33416
v5.103.0
rochdev May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@ coverage:
precision: 2
status:
project: off
patch: off
patch:
default:
target: 95%
if_not_found: success
if_ci_failed: success
# PRs against `vN.x` release branches are typically backports / cherry-picks
# where the patch coverage is decided in the source PR; only enforce on master.
branches:
- master
11 changes: 11 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
/packages/dd-trace/src/lambda/ @DataDog/serverless-aws @DataDog/apm-serverless
/packages/dd-trace/test/lambda/ @DataDog/serverless-aws @DataDog/apm-serverless
/packages/dd-trace/test/azure_metadata.spec.js @DataDog/apm-serverless
/packages/dd-trace/test/serverless.spec.js @DataDog/apm-serverless
/packages/dd-trace/test/plugins/util/inferred_proxy.spec.js @DataDog/serverless-aws @DataDog/apm-serverless

# IDM
Expand All @@ -43,6 +44,7 @@
/benchmark/sirun/plugin-net/ @DataDog/apm-idm-js
/benchmark/sirun/plugin-q/ @DataDog/apm-idm-js

/integration-tests/electron/ @DataDog/apm-idm-js
/integration-tests/esbuild/ @DataDog/apm-idm-js
/integration-tests/webpack/ @DataDog/apm-idm-js
/integration-tests/pino.spec.js @DataDog/apm-idm-js
Expand All @@ -53,6 +55,7 @@
/packages/datadog-webpack @DataDog/apm-idm-js
/packages/datadog-plugin-*/ @DataDog/apm-idm-js
/packages/datadog-instrumentations/ @DataDog/apm-idm-js
/packages/dd-trace/src/exporters/electron/ @DataDog/apm-idm-js
/packages/dd-trace/src/plugins/ @DataDog/apm-idm-js
/packages/dd-trace/test/plugins/ @DataDog/apm-idm-js
/packages/dd-trace/src/service-naming/ @DataDog/apm-idm-js
Expand Down Expand Up @@ -121,6 +124,7 @@
/integration-tests/vitest/ @DataDog/ci-app-libraries
/integration-tests/vitest.config.mjs @DataDog/ci-app-libraries
/integration-tests/ci-visibility-intake.js @DataDog/ci-app-libraries
/integration-tests/ci-visibility-intake.spec.js @DataDog/ci-app-libraries
/integration-tests/CODEOWNERS @DataDog/ci-app-libraries
/integration-tests/config-jest-multiproject.js @DataDog/ci-app-libraries
/integration-tests/config-jest.js @DataDog/ci-app-libraries
Expand Down Expand Up @@ -236,7 +240,13 @@
/.github/actions/push_to_test_optimization/ @DataDog/ci-app-libraries
/.github/actions/upload-node-reports/action.yml @Datadog/lang-platform-js
/.github/chainguard @DataDog/sdlc-security
/.github/codeql_config.yml @DataDog/sdlc-security
/.github/workflows/codeql-analysis.yml @DataDog/sdlc-security
/.github/workflows/mirror-image.yml @Datadog/lang-platform-js
/.github/workflows/all-green.yml @Datadog/lang-platform-js
/.github/workflows/custom-node-version-dispatch.yml @Datadog/lang-platform-js
/.github/workflows/project.yml @Datadog/lang-platform-js
/.github/workflows/stale.yml @Datadog/lang-platform-js
/scripts/check-no-mcr-images.js @Datadog/lang-platform-js

/.github/workflows/apm-capabilities.yml @DataDog/apm-sdk-capabilities-js
Expand All @@ -245,6 +255,7 @@
/.github/workflows/appsec.yml @DataDog/asm-js
/.github/workflows/debugger.yml @DataDog/debugger-nodejs
/.github/workflows/instrumentation.yml @DataDog/apm-idm-js
/.github/workflows/electron.yml @DataDog/apm-idm-js
/.github/workflows/serverless.yml @DataDog/serverless-aws @DataDog/apm-serverless
/.github/workflows/llmobs.yml @DataDog/ml-observability
/.github/workflows/profiling.yml @DataDog/profiling-js
Expand Down
9 changes: 5 additions & 4 deletions .github/actions/node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ runs:
run: echo "version=$NODE_VERSION" >> "$GITHUB_OUTPUT"

# Cache a tiny file containing the exact Node.js version resolved by a previous run.
# Key rotates every 20 minutes (epoch / 1200) so patches are picked up regularly.
# On cache hit, install the cached patch and skip the manifest lookup.
# Key rotates every 60 minutes (epoch / 3600), capping setup-node manifest API
# calls at one per (os, arch, major) per hour. On cache hit, install the cached
# patch directly and skip the manifest lookup.
- name: Compute cache key
id: cache-key
shell: bash
run: echo "block=$(( $(date -u +%s) / 1200 ))" >> "$GITHUB_OUTPUT"
run: echo "block=$(( $(date -u +%s) / 3600 ))" >> "$GITHUB_OUTPUT"
- uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: node-version-cache
with:
Expand All @@ -50,7 +51,7 @@ runs:
check-latest: ${{ steps.cached.outputs.version == '' }}
registry-url: ${{ inputs.registry-url || 'https://registry.npmjs.org' }}

# Persist the resolved version so subsequent runs within this 20-minute window can reuse it.
# Persist the resolved version so subsequent runs within this 60-minute window can reuse it.
- name: Save resolved version
if: steps.node-version-cache.outputs.cache-hit != 'true'
shell: bash
Expand Down
11 changes: 11 additions & 0 deletions .github/chainguard/all-green.sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
issuer: https://token.actions.githubusercontent.com

subject_pattern: 'repo:DataDog/dd-trace-js:(ref:refs/heads/master|pull_request)'

claim_pattern:
event_name: (push|pull_request|schedule)
job_workflow_ref: DataDog/dd-trace-js/\.github/workflows/all-green\.yml@.*

permissions:
actions: write
contents: read
12 changes: 12 additions & 0 deletions .github/chainguard/codeql-analysis.sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
issuer: https://token.actions.githubusercontent.com

subject_pattern: 'repo:DataDog/dd-trace-js:(ref:refs/heads/(master|mq-working-branch-master-.*)|pull_request)'

claim_pattern:
event_name: (push|pull_request)
job_workflow_ref: DataDog/dd-trace-js/\.github/workflows/codeql-analysis\.yml@.*

permissions:
contents: read
actions: read
security_events: write
11 changes: 11 additions & 0 deletions .github/chainguard/custom-node-version-dispatch.sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
issuer: https://token.actions.githubusercontent.com

subject: repo:DataDog/dd-trace-js:ref:refs/heads/master

claim_pattern:
event_name: workflow_dispatch
ref: refs/heads/master
job_workflow_ref: DataDog/dd-trace-js/\.github/workflows/custom-node-version-dispatch\.yml@refs/heads/master

permissions:
actions: write
10 changes: 10 additions & 0 deletions .github/chainguard/package-size-report.sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
issuer: https://token.actions.githubusercontent.com

subject_pattern: 'repo:DataDog/dd-trace-js:(ref:refs/heads/(master|mq-working-branch-master-.*)|pull_request)'

claim_pattern:
event_name: (push|pull_request)
job_workflow_ref: DataDog/dd-trace-js/\.github/workflows/project\.yml@.*

permissions:
pull_requests: write
11 changes: 11 additions & 0 deletions .github/chainguard/stale.sts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
issuer: https://token.actions.githubusercontent.com

subject: repo:DataDog/dd-trace-js:ref:refs/heads/master

claim_pattern:
event_name: schedule
ref: refs/heads/master
job_workflow_ref: DataDog/dd-trace-js/\.github/workflows/stale\.yml@refs/heads/master

permissions:
pull_requests: write
10 changes: 7 additions & 3 deletions .github/workflows/all-green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ jobs:
all-green:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
id-token: write
steps:
- uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
id: octo-sts
with:
scope: DataDog/dd-trace-js
policy: all-green
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
sparse-checkout-cone-mode: false
Expand All @@ -32,6 +36,6 @@ jobs:
env:
DELAY: ${{ github.run_attempt == 1 && '5' || '0' }} # 5 minutes on first attempt, no delay on reruns
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
POLLING_INTERVAL: 1
RETRIES: 30
27 changes: 25 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 Expand Up @@ -442,6 +440,31 @@ jobs:
with:
dd_api_key: ${{ steps.dd-sts.outputs.api_key }}

electron:
runs-on: ubuntu-latest
env:
PLUGINS: electron
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: ./.github/actions/testagent/start
- uses: ./.github/actions/node/latest
- uses: ./.github/actions/install
# Ubuntu 24.04 tightened AppArmor defaults and now blocks unprivileged user
# namespaces, which Electron's Chromium sandbox requires to run. Setting
# this to 0 re-enables them for the duration of the job.
- run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- run: |
sudo apt-get update
# Xvfb provides a virtual X display so Electron (a GUI app) can start
# on the headless CI runner without a physical screen.
sudo apt-get install -y xvfb
# Launch the virtual display on screen :99 with a 24-bit 1024×768
# framebuffer. Output is discarded; the & backgrounds it so the step
# does not block.
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
# Point Electron at the virtual display started above.
- run: DISPLAY=:99 yarn test:plugins:ci

express:
runs-on: ubuntu-latest
env:
Expand Down
72 changes: 53 additions & 19 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
Expand All @@ -18,13 +7,23 @@ on:
# The branches below must be a subset of the branches above
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_id || github.ref }}
cancel-in-progress: true

jobs:
# dd-octo-sts is used for checkout and init to reduce GITHUB_TOKEN rate-limit
# consumption. The official analyze action uploads SARIF with github.token
# (security-events: write) so GitHub derives the correct analysis_key from the
# workflow context — raw API uploads always get "(default)" which the PR
# Security tab does not recognise. wait-for-processing is disabled on the
# action to avoid spending github.token budget on status polls; processing
# completion is checked in a separate step using the dd-octo-sts token.
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
id-token: write
security-events: write

strategy:
Expand All @@ -33,22 +32,57 @@ jobs:
language: ["javascript"]

steps:
- uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
id: octo-sts
with:
scope: DataDog/dd-trace-js
policy: codeql-analysis

- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
token: ${{ steps.octo-sts.outputs.token }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
id: init-codeql
uses: github/codeql-action/init@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
with:
languages: ${{ matrix.language }}
config-file: .github/codeql_config.yml
token: ${{ steps.octo-sts.outputs.token }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Autobuild
uses: github/codeql-action/autobuild@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@e46ed2cbd01164d986452f91f178727624ae40d7 # v4.35.3
id: analyze
uses: github/codeql-action/analyze@68bde559dea0fdcac2102bfdf6230c5f70eb485e # v4.35.4
with:
token: ${{ github.token }}
wait-for-processing: false

- name: Wait for SARIF processing
env:
TOKEN: ${{ steps.octo-sts.outputs.token }}
SARIF_ID: ${{ steps.analyze.outputs.sarif-id }}
run: |
# Poll every 10s (30x = 5 min total), matching the official action's
# timeout but halving the API calls vs its default 5s interval.
for i in $(seq 1 30); do
RESULT=$(curl -sf \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/code-scanning/sarifs/$SARIF_ID")
STATUS=$(echo "$RESULT" | jq -r '.processing_status')
echo "Processing status: $STATUS"
if [ "$STATUS" = "complete" ]; then exit 0; fi
if [ "$STATUS" = "failed" ]; then
echo "$RESULT" | jq -r '.errors // empty'
exit 1
fi
sleep 10
done
echo "SARIF processing did not complete within 5 minutes"
exit 1
10 changes: 7 additions & 3 deletions .github/workflows/custom-node-version-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ on:
type: boolean

permissions:
actions: write
contents: read
id-token: write

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
Expand All @@ -65,8 +64,13 @@ jobs:
- profiling
runs-on: ubuntu-latest
steps:
- uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
id: octo-sts
with:
scope: DataDog/dd-trace-js
policy: custom-node-version-dispatch
- name: Trigger ${{matrix.workflow }} workflow
if: ${{ inputs[matrix.workflow] }}
run: gh workflow run ${{matrix.workflow}}.yml --repo ${{ github.repository }} --ref ${{ env.BRANCH_NAME }} -f latest-version=${{ inputs.node-version }}
env:
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
39 changes: 39 additions & 0 deletions .github/workflows/electron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Electron

on:
pull_request:
push:
branches: [master]
schedule:
- cron: 0 4 * * *
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

env:
MOCHA_OPTIONS: ${{ github.ref == 'refs/heads/master' && '--retries 1' || '' }}

jobs:
macos:
runs-on: macos-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: ./.github/actions/node/latest
- uses: ./.github/actions/install
- run: yarn test:integration:electron

ubuntu:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- uses: ./.github/actions/node/latest
- uses: ./.github/actions/install
# Electron needs a display even for headless (show: false) windows.
# xvfb-run provides a virtual framebuffer so the test can run without a physical display.
- run: xvfb-run --auto-servernum yarn test:integration:electron
Loading
Loading