Skip to content

Commit e136ea9

Browse files
authored
Merge branch 'master' into grainrigi/dd-profiler-https-agent
2 parents 34677f4 + 58d2e20 commit e136ea9

File tree

332 files changed

+16063
-2798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+16063
-2798
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ node_modules
66
versions
77
acmeair-nodejs
88
vendor
9+
integration-tests/esbuild/out.js

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"mocha/no-global-tests": 0,
3434
"mocha/no-exports": 0,
3535
"mocha/no-skipped-tests": 0,
36-
"n/no-restricted-require": [2, ["diagnostics_channel"]]
36+
"n/no-restricted-require": [2, ["diagnostics_channel"]],
37+
"object-curly-newline": ["error", {"multiline": true, "consistent": true }]
3738
}
3839
}

.github/workflows/appsec.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,18 @@ jobs:
130130
- uses: ./.github/actions/node/latest
131131
- run: yarn test:appsec:plugins:ci
132132
- uses: codecov/codecov-action@v2
133+
134+
sourcing:
135+
runs-on: ubuntu-latest
136+
env:
137+
PLUGINS: cookie
138+
steps:
139+
- uses: actions/checkout@v2
140+
- uses: ./.github/actions/node/setup
141+
- run: yarn install
142+
- uses: ./.github/actions/node/16
143+
- run: yarn test:appsec:plugins:ci
144+
- uses: ./.github/actions/node/18
145+
- run: yarn test:appsec:plugins:ci
146+
- uses: ./.github/actions/node/latest
147+
- run: yarn test:appsec:plugins:ci

.github/workflows/plugins.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,23 @@ jobs:
330330
uses: ./.github/actions/testagent/logs
331331
- uses: codecov/codecov-action@v2
332332

333+
fetch:
334+
runs-on: ubuntu-latest
335+
env:
336+
PLUGINS: fetch
337+
steps:
338+
- uses: actions/checkout@v2
339+
- uses: ./.github/actions/testagent/start
340+
- uses: ./.github/actions/node/setup
341+
- run: yarn install
342+
- uses: ./.github/actions/node/oldest
343+
- run: yarn test:plugins:ci
344+
- uses: ./.github/actions/node/latest
345+
- run: yarn test:plugins:ci
346+
- if: always()
347+
uses: ./.github/actions/testagent/logs
348+
- uses: codecov/codecov-action@v2
349+
333350
generic-pool:
334351
runs-on: ubuntu-latest
335352
env:
@@ -802,7 +819,7 @@ jobs:
802819
- 5500:5500
803820
testagent:
804821
image: ghcr.io/datadog/dd-apm-test-agent/ddapm-test-agent:latest
805-
env:
822+
env:
806823
LOG_LEVEL: DEBUG
807824
TRACE_LANGUAGE: javascript
808825
DISABLED_CHECKS: trace_content_length
@@ -816,7 +833,7 @@ jobs:
816833
steps:
817834
- uses: actions/checkout@v2
818835
- uses: ./.github/actions/node/setup
819-
- run: yarn install --ignore-engine
836+
- run: yarn install --ignore-engines
820837
- run: yarn services
821838
- run: yarn test:plugins
822839
- uses: codecov/codecov-action@v2

.github/workflows/project.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches: [master]
77
schedule:
8-
- cron: '0 4 * * *'
8+
- cron: "0 4 * * *"
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
@@ -22,29 +22,56 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v3
25-
- uses: ./.github/actions/node/setup
26-
- run: yarn install
2725
- uses: actions/setup-node@v3
2826
with:
2927
node-version: ${{ matrix.version }}
3028
# Disable core dumps since some integration tests intentionally abort and core dump generation takes around 5-10s
29+
- run: yarn install
3130
- run: sudo sysctl -w kernel.core_pattern='|/bin/false'
3231
- run: yarn test:integration
3332

3433
integration-ci:
3534
strategy:
3635
matrix:
3736
version: [16, latest]
38-
framework: [cucumber, cypress, playwright]
37+
framework: [cucumber, playwright]
38+
runs-on: ubuntu-latest
39+
env:
40+
DD_SERVICE: dd-trace-js-integration-tests
41+
DD_CIVISIBILITY_AGENTLESS_ENABLED: 1
42+
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
43+
steps:
44+
- uses: actions/checkout@v3
45+
- uses: actions/setup-node@v3
46+
with:
47+
node-version: ${{ matrix.version }}
48+
- run: yarn install
49+
- run: yarn test:integration:${{ matrix.framework }}
50+
env:
51+
NODE_OPTIONS: '-r ./ci/init'
52+
53+
integration-cypress:
54+
strategy:
55+
matrix:
56+
version: [16, latest]
57+
# 6.7.0 is the minimum version we support
58+
cypress-version: [6.7.0, latest]
3959
runs-on: ubuntu-latest
60+
env:
61+
DD_SERVICE: dd-trace-js-integration-tests
62+
DD_CIVISIBILITY_AGENTLESS_ENABLED: 1
63+
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
4064
steps:
4165
- uses: actions/checkout@v3
4266
- uses: ./.github/actions/node/setup
4367
- run: yarn install
4468
- uses: actions/setup-node@v3
4569
with:
4670
node-version: ${{ matrix.version }}
47-
- run: yarn test:integration:${{ matrix.framework }}
71+
- run: yarn test:integration:cypress
72+
env:
73+
CYPRESS_VERSION: ${{ matrix.cypress-version }}
74+
NODE_OPTIONS: '-r ./ci/init'
4875

4976
lint:
5077
runs-on: ubuntu-latest

.github/workflows/release-dev.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,26 @@ jobs:
2323
echo "::set-output name=json::$content"
2424
- run: npm version --no-git-tag-version ${{ fromJson(steps.pkg.outputs.json).version }}-$(git rev-parse --short HEAD)+${{ github.run_id }}.${{ github.run_attempt }}
2525
- run: npm publish --tag dev
26+
- run: |
27+
git tag --force dev
28+
git push origin :refs/tags/dev
29+
git push origin --tags
30+
31+
injection-image-publish:
32+
runs-on: ubuntu-latest
33+
needs: ['dev_release']
34+
steps:
35+
- uses: actions/checkout@v3
36+
- uses: actions/setup-node@v3
37+
- name: Log in to the Container registry
38+
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
39+
with:
40+
registry: ghcr.io
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
- name: npm pack for injection image
44+
run: |
45+
npm pack dd-trace@dev
46+
- uses: ./.github/actions/injection
47+
with:
48+
init-image-version: dev

.github/workflows/system-tests.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
parametric:
5959
runs-on: ubuntu-latest
6060
env:
61-
CLIENTS_ENABLED: nodejs
61+
TEST_LIBRARY: nodejs
6262
NODEJS_DDTRACE_MODULE: datadog/dd-trace-js#${{ github.sha }}
6363
steps:
6464
- name: Checkout system tests
@@ -68,9 +68,17 @@ jobs:
6868
- uses: actions/setup-python@v4
6969
with:
7070
python-version: '3.9'
71+
- name: Build
72+
run: ./build.sh -i runner
7173
- name: Run
72-
run: |
73-
cd parametric
74-
pip install wheel
75-
pip install -r requirements.txt
76-
./run.sh
74+
run: ./run.sh PARAMETRIC
75+
76+
- name: Compress artifact
77+
if: ${{ always() }}
78+
run: tar -czvf artifact.tar.gz $(ls | grep logs)
79+
- name: Upload artifact
80+
uses: actions/upload-artifact@v3
81+
if: ${{ always() }}
82+
with:
83+
name: logs_parametric
84+
path: artifact.tar.gz

.gitlab-ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ package:
2929
stage: deploy
3030
variables:
3131
PRODUCT_NAME: auto_inject-node
32+
PACKAGE_FILTER: js # product name is "node" but package name ends "js"
3233

3334
deploy_to_reliability_env:
3435
stage: deploy
@@ -48,7 +49,7 @@ deploy_to_reliability_env:
4849
deploy_to_docker_registries:
4950
stage: deploy
5051
rules:
51-
- if: '$CI_COMMIT_TAG =~ /^v.*/'
52+
- if: '$CI_COMMIT_TAG =~ /^v.*/ || $CI_COMMIT_TAG == "dev"'
5253
when: on_success
5354
- when: manual
5455
allow_failure: true
@@ -78,3 +79,5 @@ deploy_latest_to_docker_registries:
7879
IMG_SOURCES: ghcr.io/datadog/dd-trace-js/dd-lib-js-init:$CI_COMMIT_TAG
7980
IMG_DESTINATIONS: dd-lib-js-init:latest
8081
IMG_SIGNING: "false"
82+
RETRY_COUNT: 5
83+
RETRY_DELAY: 300

LICENSE-3rdparty.csv

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ require,crypto-randomuuid,MIT,Copyright 2021 Node.js Foundation and contributors
1111
require,diagnostics_channel,MIT,Copyright 2021 Simon D.
1212
require,ignore,MIT,Copyright 2013 Kael Zhang and contributors
1313
require,import-in-the-middle,Apache license 2.0,Copyright 2021 Datadog Inc.
14+
require,int64-buffer,MIT,Copyright 2015-2016 Yusuke Kawasaki
1415
require,ipaddr.js,MIT,Copyright 2011-2017 whitequark
1516
require,istanbul-lib-coverage,BSD-3-Clause,Copyright 2012-2015 Yahoo! Inc.
1617
require,koalas,MIT,Copyright 2013-2017 Brian Woodward
@@ -22,6 +23,7 @@ require,lodash.uniq,MIT,Copyright JS Foundation and other contributors
2223
require,lru-cache,ISC,Copyright (c) 2010-2022 Isaac Z. Schlueter and Contributors
2324
require,methods,MIT,Copyright 2013-2014 TJ Holowaychuk
2425
require,module-details-from-path,MIT,Copyright 2016 Thomas Watson Steen
26+
require,msgpack-lite,MIT,Copyright 2015 Yusuke Kawasaki
2527
require,node-abort-controller,MIT,Copyright (c) 2019 Steve Faulkner
2628
require,opentracing,MIT,Copyright 2016 Resonance Labs Inc
2729
require,path-to-regexp,MIT,Copyright 2014 Blake Embrey
@@ -51,13 +53,11 @@ dev,express,MIT,Copyright 2009-2014 TJ Holowaychuk 2013-2014 Roman Shtylman 2014
5153
dev,get-port,MIT,Copyright Sindre Sorhus
5254
dev,glob,ISC,Copyright Isaac Z. Schlueter and Contributors
5355
dev,graphql,MIT,Copyright 2015 Facebook Inc.
54-
dev,int64-buffer,MIT,Copyright 2015-2016 Yusuke Kawasaki
5556
dev,jszip,MIT,Copyright 2015-2016 Stuart Knightley and contributors
5657
dev,knex,MIT,Copyright (c) 2013-present Tim Griesser
5758
dev,mkdirp,MIT,Copyright 2010 James Halliday
5859
dev,mocha,MIT,Copyright 2011-2018 JS Foundation and contributors https://js.foundation
5960
dev,multer,MIT,Copyright 2014 Hage Yaapa
60-
dev,msgpack-lite,MIT,Copyright 2015 Yusuke Kawasaki
6161
dev,nock,MIT,Copyright 2017 Pedro Teixeira and other contributors
6262
dev,nyc,ISC,Copyright 2015 Contributors
6363
dev,pprof-format,MIT,Copyright 2022 Stephen Belanger
@@ -67,5 +67,6 @@ dev,sinon,BSD-3-Clause,Copyright 2010-2017 Christian Johansen
6767
dev,sinon-chai,WTFPL and BSD-2-Clause,Copyright 2004 Sam Hocevar 2012–2017 Domenic Denicola
6868
dev,tap,ISC,Copyright 2011-2022 Isaac Z. Schlueter and Contributors
6969
dev,tape,MIT,Copyright James Halliday
70-
file,aws-lambda-nodejs-runtime-interface-client,Apache 2.0,Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
70+
file,aws-lambda-nodejs-runtime-interface-client,Apache 2.0,Copyright 2019 Amazon.com Inc. or its affiliates. All Rights Reserved.
7171
file,profile.proto,Apache license 2.0,Copyright 2016 Google Inc.
72+
file,is-git-url,MIT,Copyright (c) 2017 Jon Schlinkert.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ $ yarn leak:plugins
143143

144144
### Linting
145145

146-
We use [ESLint](https://eslint.org) to make sure that new code is
147-
conform to our coding standards.
146+
We use [ESLint](https://eslint.org) to make sure that new code
147+
conforms to our coding standards.
148148

149149
To run the linter, use:
150150

0 commit comments

Comments
 (0)