Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always check for the latest Node.js version being installed #5504

Merged
merged 4 commits into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ inputs:
runs:
using: composite
steps:
- uses: actions/setup-node@v4
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should do this until that the automated process for updating these hashes are expanded to also check the .github/actions directory. I think right now it's just checking the .github/workflows repo. I've been meaning to raise this as an issue. Until then, this will be stuck at this hardcoded hash which is probably not what we want

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind... #5448 will fix it

with:
node-version: ${{ inputs.version == 'eol' && '16' || inputs.version == 'oldest' && '18' || inputs.version == 'maintenance' && '20' || inputs.version == 'active' && '22' || inputs.version }}
check-latest: true
registry-url: ${{ inputs.registry-url || 'https://registry.npmjs.org' }}
6 changes: 3 additions & 3 deletions .github/workflows/appsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ jobs:
fail-fast: false
matrix:
version:
- 18
- oldest
- latest
range: ['>=10.2.0 <11', '>=11.0.0 <13', '11.1.4', '>=13.0.0 <14', '13.2.0', '>=14.0.0 <=14.2.6', '>=14.2.7 <15', '>=15.0.0']
include:
Expand All @@ -230,9 +230,9 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/testagent/start
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.version }}
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn test:appsec:plugins:ci
- if: always()
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
aerospike:
strategy:
matrix:
node-version: [16]
node-version: [eol]
range: ['>=4.0.0 <5.2.0']
aerospike-image: [ce-5.7.0.15]
test-image: [ubuntu-22.04]
Expand Down Expand Up @@ -58,9 +58,9 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/testagent/start
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.node-version }}
version: ${{ matrix.node-version }}
- run: yarn config set ignore-engines true
- name: Install dependencies
uses: ./.github/actions/install
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
aws-sdk:
strategy:
matrix:
node-version: ['18', 'latest']
node-version: [oldest, 'latest']
runs-on: ubuntu-latest
services:
localstack:
Expand Down Expand Up @@ -163,9 +163,9 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/testagent/start
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.node-version }}
version: ${{ matrix.node-version }}
- uses: ./.github/actions/install
- run: yarn test:plugins:ci
- if: always()
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
couchbase:
strategy:
matrix:
node-version: [16]
node-version: [eol]
range: ['^2.6.12', '^3.0.7', '>=4.0.0 <4.2.0']
include:
- node-version: 18
Expand All @@ -276,9 +276,9 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/testagent/start
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.node-version }}
version: ${{ matrix.node-version }}
- uses: ./.github/actions/install
- run: yarn config set ignore-engines true
- run: yarn test:plugins:ci --ignore-engines
Expand Down Expand Up @@ -475,16 +475,16 @@ jobs:
http:
strategy:
matrix:
node-version: ['18', '20', 'latest']
node-version: [oldest, maintenance, 'latest']
runs-on: ubuntu-latest
env:
PLUGINS: http
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/testagent/start
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.node-version }}
version: ${{ matrix.node-version }}
- uses: ./.github/actions/install
- run: yarn test:plugins:ci
- if: always()
Expand Down Expand Up @@ -875,9 +875,9 @@ jobs:
curl -LO https://unofficial-builds.nodejs.org/download/release/v20.9.0/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: '16'
version: eol
- uses: ./.github/actions/install
- run: yarn config set ignore-engines true
- run: yarn services --ignore-engines
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
integration-guardrails:
strategy:
matrix:
version: [14.0.0, 14, 16.0.0, 16, 18.0.0, 18.1.0, 20.0.0, 22.0.0]
version: [14.0.0, 14, 16.0.0, eol, 18.0.0, 18.1.0, 20.0.0, 22.0.0]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.version }}
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: node node_modules/.bin/mocha --colors --timeout 30000 integration-tests/init.spec.js

Expand All @@ -53,9 +53,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.version }}
version: ${{ matrix.version }}
- run: node ./init
- run: node ./init
env:
Expand All @@ -64,17 +64,17 @@ jobs:
integration-playwright:
strategy:
matrix:
version: [18, latest]
version: [oldest, latest]
runs-on: ubuntu-latest
env:
DD_SERVICE: dd-trace-js-integration-tests
DD_CIVISIBILITY_AGENTLESS_ENABLED: 1
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.version }}
version: ${{ matrix.version }}
- uses: ./.github/actions/install
# Install system dependencies for playwright
- run: npx playwright install-deps
Expand All @@ -85,7 +85,7 @@ jobs:
integration-ci:
strategy:
matrix:
version: [18, latest]
version: [oldest, latest]
framework: [cucumber, selenium, jest, mocha]
runs-on: ubuntu-latest
env:
Expand All @@ -94,9 +94,9 @@ jobs:
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.version }}
version: ${{ matrix.version }}
- name: Install Google Chrome
run: |
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
# Important: This is outside the minimum supported version of dd-trace-js
# Node > 16 does not work with [email protected] (not even without our plugin)
# TODO: figure out what to do with this: we might have to deprecate support for [email protected]
version: [16, latest]
version: [eol, latest]
# 6.7.0 is the minimum version we support
cypress-version: [6.7.0, latest]
module-type: ['commonJS', 'esm']
Expand All @@ -138,9 +138,9 @@ jobs:
DD_API_KEY: ${{ secrets.DD_API_KEY_CI_APP }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.version }}
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- run: yarn config set ignore-engines true
- run: yarn test:integration:cypress --ignore-engines
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
registry-url: 'https://registry.npmjs.org'
- uses: ./.github/actions/node
- run: npm publish --tag latest-node14 --provenance
- id: pkg
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
registry-url: 'https://registry.npmjs.org'
- uses: ./.github/actions/node
- run: npm publish --tag latest-node16 --provenance
- id: pkg
run: |
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
registry-url: 'https://registry.npmjs.org'
- uses: ./.github/actions/node
- uses: ./.github/actions/install
- id: pkg
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ jobs:
pkgjson: ${{ steps.pkg.outputs.json }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
registry-url: 'https://registry.npmjs.org'
- uses: ./.github/actions/node
- run: npm publish --provenance
- id: pkg
run: |
Expand All @@ -45,7 +43,7 @@ jobs:
needs: ['publish']
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
- id: pkg
run: |
content=`cat ./package.json | tr '\n' ' '`
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-proposal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
- run: npm i -g @bengl/branch-diff
- run: |
mkdir -p ~/.config/changelog-maker
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/serverless-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
id-token: 'write'
strategy:
matrix:
version: [18, latest]
version: [oldest, latest]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
- uses: ./.github/actions/node
with:
node-version: ${{ matrix.version }}
version: ${{ matrix.version }}
- uses: ./.github/actions/install
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f # v2.1.7
Expand Down
Loading