diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7cf70d7..3bac3f6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: strategy: max-parallel: 4 matrix: - node-version: [18.12, 20.9, 22.11] + node-version: [18.12, 20.19, 22.11] steps: - name: Checkout uses: actions/checkout@v3 @@ -67,7 +67,7 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - name: Install NodeGYP - if: matrix.node-version == '20.9' || matrix.node-version == '22.11' + if: matrix.node-version == '20.19' || matrix.node-version == '22.11' run: yarn global add node-gyp - name: Install dependencies diff --git a/.gitlab/datasources/runtimes.yaml b/.gitlab/datasources/runtimes.yaml index f4b0be37..351cbfb6 100644 --- a/.gitlab/datasources/runtimes.yaml +++ b/.gitlab/datasources/runtimes.yaml @@ -3,7 +3,7 @@ runtimes: node_version: "18.12" node_major_version: "18" - name: "node20" - node_version: "20.9" + node_version: "20.19" node_major_version: "20" - name: "node22" node_version: "22.11" diff --git a/.gitlab/scripts/publish_layers.sh b/.gitlab/scripts/publish_layers.sh index 97a38f17..e8f922a1 100755 --- a/.gitlab/scripts/publish_layers.sh +++ b/.gitlab/scripts/publish_layers.sh @@ -5,15 +5,15 @@ # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2023 Datadog, Inc. -# NODE_VERSION=20.9 REGION=us-east-1 +# NODE_VERSION=20.19 REGION=us-east-1 set -e # Available runtimes: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html AWS_CLI_NODE_VERSIONS=("nodejs18.x" "nodejs20.x" "nodejs22.x") -LAYER_PATHS=(".layers/datadog_lambda_node18.12.zip" ".layers/datadog_lambda_node20.9.zip" ".layers/datadog_lambda_node22.11.zip") +LAYER_PATHS=(".layers/datadog_lambda_node18.12.zip" ".layers/datadog_lambda_node20.19.zip" ".layers/datadog_lambda_node22.11.zip") LAYERS=("Datadog-Node18-x" "Datadog-Node20-x" "Datadog-Node22-x") -NODE_VERSIONS=("18.12" "20.9" "22.11") +NODE_VERSIONS=("18.12" "20.19" "22.11") STAGES=('prod', 'sandbox', 'staging') printf "Starting script...\n\n" diff --git a/scripts/build_layers.sh b/scripts/build_layers.sh index d6034fc1..ee3664e5 100755 --- a/scripts/build_layers.sh +++ b/scripts/build_layers.sh @@ -11,7 +11,7 @@ set -e LAYER_DIR=".layers" LAYER_FILES_PREFIX="datadog_lambda_node" -export NODE_VERSIONS=("18.12" "20.9" "22.11") +export NODE_VERSIONS=("18.12" "20.19" "22.11") if [ -z "$NODE_VERSION" ]; then echo "Node version not specified, running for all node versions." diff --git a/scripts/publish_govcloud_layers.sh b/scripts/publish_govcloud_layers.sh index 68e1725e..30c73f4e 100755 --- a/scripts/publish_govcloud_layers.sh +++ b/scripts/publish_govcloud_layers.sh @@ -16,7 +16,7 @@ set -e -NODE_VERSIONS=("18.12" "20.9" "22.11") +NODE_VERSIONS=("18.12" "20.19" "22.11") LAYER_PACKAGE=$1 diff --git a/scripts/publish_layers.sh b/scripts/publish_layers.sh index 472abe8e..ad27d1a1 100755 --- a/scripts/publish_layers.sh +++ b/scripts/publish_layers.sh @@ -11,7 +11,7 @@ set -e NODE_VERSIONS_FOR_AWS_CLI=("nodejs18.x" "nodejs20.x" "nodejs22.x") -LAYER_PATHS=(".layers/datadog_lambda_node18.12.zip" ".layers/datadog_lambda_node20.9.zip" ".layers/datadog_lambda_node22.11.zip") +LAYER_PATHS=(".layers/datadog_lambda_node18.12.zip" ".layers/datadog_lambda_node20.19.zip" ".layers/datadog_lambda_node22.11.zip") AVAILABLE_LAYERS=("Datadog-Node18-x" "Datadog-Node20-x" "Datadog-Node22-x") AVAILABLE_REGIONS=$(aws ec2 describe-regions | jq -r '.[] | .[] | .RegionName') BATCH_SIZE=60 diff --git a/scripts/run_integration_tests.sh b/scripts/run_integration_tests.sh index af06a0b3..0a7ca27b 100755 --- a/scripts/run_integration_tests.sh +++ b/scripts/run_integration_tests.sh @@ -30,7 +30,7 @@ mismatch_found=false # [1]: nodejs version # [2]: random 8-character ID to avoid collisions with other runs node18=("nodejs18.x" "18.12" $(xxd -l 4 -c 4 -p < /dev/random)) -node20=("nodejs20.x" "20.9" $(xxd -l 4 -c 4 -p < /dev/random)) +node20=("nodejs20.x" "20.19" $(xxd -l 4 -c 4 -p < /dev/random)) node22=("nodejs22.x" "22.11" $(xxd -l 4 -c 4 -p < /dev/random)) PARAMETERS_SETS=("node18" "node20" "node22") diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 507fcae6..0712926c 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -9,7 +9,7 @@ # For local use only set -e -NODE_VERSIONS=("18.12" "20.9" "22.11") +NODE_VERSIONS=("18.12" "20.19" "22.11") for node_version in "${NODE_VERSIONS[@]}" do diff --git a/scripts/sign_layers.sh b/scripts/sign_layers.sh index 14f0128b..a98b9b8a 100755 --- a/scripts/sign_layers.sh +++ b/scripts/sign_layers.sh @@ -8,7 +8,7 @@ set -e LAYER_DIR=".layers" -LAYER_FILES=("datadog_lambda_node18.12.zip" "datadog_lambda_node20.9.zip" "datadog_lambda_node22.11.zip") +LAYER_FILES=("datadog_lambda_node18.12.zip" "datadog_lambda_node20.19.zip" "datadog_lambda_node22.11.zip") SIGNING_PROFILE_NAME="DatadogLambdaSigningProfile" if [ -z "$LAYER_FILE" ]; then diff --git a/src/metrics/enhanced-metrics.spec.ts b/src/metrics/enhanced-metrics.spec.ts index c73923f0..ee438d0a 100644 --- a/src/metrics/enhanced-metrics.spec.ts +++ b/src/metrics/enhanced-metrics.spec.ts @@ -29,8 +29,8 @@ describe("getRuntimeTag", () => { expect(getRuntimeTag()).toBe("runtime:nodejs18.x"); }); - it("returns the right tag for v20.9.0", () => { - mockedGetProcessVersion.mockReturnValue("v20.9.0"); + it("returns the right tag for v20.19.0", () => { + mockedGetProcessVersion.mockReturnValue("v20.19.0"); expect(getRuntimeTag()).toBe("runtime:nodejs20.x"); }); @@ -49,7 +49,7 @@ describe("getEnhancedMetricTags", () => { }); it("generates tag list with runtime", () => { - mockedGetProcessVersion.mockReturnValue("v20.9.0"); + mockedGetProcessVersion.mockReturnValue("v20.19.0"); expect(getEnhancedMetricTags(mockContext)).toStrictEqual([ "region:us-east-1", "account_id:123497598159", @@ -63,7 +63,7 @@ describe("getEnhancedMetricTags", () => { }); it("generates tag list with local runtime", () => { - mockedGetProcessVersion.mockReturnValue("v20.9.0"); + mockedGetProcessVersion.mockReturnValue("v20.19.0"); expect(getEnhancedMetricTags(mockContextLocal)).toStrictEqual([ "functionname:my-test-lambda", "memorysize:128", @@ -87,7 +87,7 @@ describe("getEnhancedMetricTags", () => { }); it("doesn't add context-based tags when context not provided", () => { - mockedGetProcessVersion.mockReturnValue("v20.9.0"); + mockedGetProcessVersion.mockReturnValue("v20.19.0"); expect(getEnhancedMetricTags()).toStrictEqual(["cold_start:true", "datadog_lambda:vX.X.X", "runtime:nodejs20.x"]); }); });