From 0d068af45f49afcc3ab196070699a642e6f07e0f Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Mon, 6 Jul 2026 11:20:21 -0600 Subject: [PATCH 1/9] move SSI tests to node 22 --- tests/docker_ssi/test_docker_ssi.py | 10 +++--- tests/docker_ssi/test_docker_ssi_appsec.py | 2 +- tests/docker_ssi/test_docker_ssi_crash.py | 2 +- .../provision_test-app-nodejs-alpine.yml | 3 +- .../provision_test-app-nodejs-container.yml | 2 +- .../nodejs/provision_test-app-nodejs-esm.yml | 4 +-- .../nodejs/provision_test-app-nodejs.yml | 32 ++++++++++++------- .../Dockerfile.template | 2 +- .../test-app-nodejs-esm/Dockerfile.node | 2 +- .../{Dockerfile.node20 => Dockerfile.node22} | 2 +- .../test-app-nodejs-esm/docker-compose.yml | 6 ++-- .../weblogs/weblog_provision_schema.yml | 7 +++- 12 files changed, 44 insertions(+), 30 deletions(-) rename utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/{Dockerfile.node20 => Dockerfile.node22} (79%) diff --git a/tests/docker_ssi/test_docker_ssi.py b/tests/docker_ssi/test_docker_ssi.py index 93537e4c934..5242e7da8ff 100644 --- a/tests/docker_ssi/test_docker_ssi.py +++ b/tests/docker_ssi/test_docker_ssi.py @@ -42,7 +42,7 @@ def setup_install_supported_runtime(self): @irrelevant(context.library == "python" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.0") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "17.0") + @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") @irrelevant(context.library >= "python@4.0.0rc1" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") def test_install_supported_runtime(self): @@ -77,7 +77,7 @@ def test_install_weblog_running(self): ) @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.0") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "17.0") + @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") @irrelevant(context.library >= "python@4.0.0rc1" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") def test_telemetry(self): @@ -106,7 +106,7 @@ def test_telemetry(self): @irrelevant(context.library == "php" and context.installed_language_runtime >= "7.0") @bug(context.library == "nodejs" and context.installed_language_runtime < "12.17.0", reason="INPLAT-252") @bug(context.library == "java" and context.installed_language_runtime == "1.7.0-201", reason="INPLAT-427") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime >= "17.0") + @irrelevant(context.library == "nodejs" and context.installed_language_runtime >= "22.0") @irrelevant(context.library == "dotnet" and context.installed_language_runtime >= "6.0.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime >= "2.6.0") def test_telemetry_abort(self): @@ -145,7 +145,7 @@ def setup_instrumentation_source_ssi(self): @irrelevant(context.library == "python" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.1") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "17.0") + @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") @irrelevant(context.library >= "python@4.0.0.dev" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library < "python@4.0.0.dev" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") @@ -168,7 +168,7 @@ def setup_injection_metadata(self): @irrelevant(context.library == "python" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.1") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "17.0") + @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") @irrelevant(context.library >= "python@4.0.0rc1" and context.installed_language_runtime < "3.9.0") def test_injection_metadata(self): logger.info("Testing injection result variables") diff --git a/tests/docker_ssi/test_docker_ssi_appsec.py b/tests/docker_ssi/test_docker_ssi_appsec.py index 18597c58f81..e0ef1bfe6e1 100644 --- a/tests/docker_ssi/test_docker_ssi_appsec.py +++ b/tests/docker_ssi/test_docker_ssi_appsec.py @@ -17,7 +17,7 @@ def setup_telemetry_source_ssi(self): @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.1") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "17.0") + @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") @irrelevant(context.library >= "python@4.0.0.dev" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library < "python@4.0.0.dev" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0", reason="Ruby 2.6+ required") diff --git a/tests/docker_ssi/test_docker_ssi_crash.py b/tests/docker_ssi/test_docker_ssi_crash.py index 2c9a6a9df32..78eb849e7b4 100644 --- a/tests/docker_ssi/test_docker_ssi_crash.py +++ b/tests/docker_ssi/test_docker_ssi_crash.py @@ -36,7 +36,7 @@ def setup_crash(self): @features.ssi_crashtracking @irrelevant(context.library == "python" and context.installed_language_runtime < "3.7.0") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "17.0") + @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") def test_crash(self): """Validate that a crash report is generated when the application crashes""" diff --git a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-alpine.yml b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-alpine.yml index b665d6816ab..f02975e563d 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-alpine.yml +++ b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-alpine.yml @@ -1,6 +1,6 @@ weblog: name: test-app-nodejs-alpine - runtime_version: 18 + runtime_version: 22 install: - os_type: linux copy_files: @@ -15,6 +15,5 @@ weblog: - name: copy-nodejs-app-dockerfile local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-alpine/Dockerfile.template - remote_path: Dockerfile.template remote-command: sh create_and_run_app_container.sh diff --git a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-container.yml b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-container.yml index 6015b135c01..5c77e4645d9 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-container.yml +++ b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-container.yml @@ -1,6 +1,6 @@ weblog: name: test-app-nodejs-container - runtime_version: 18 + runtime_version: 22 install: - os_type: linux copy_files: diff --git a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-esm.yml b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-esm.yml index adf9f9c3fde..8af598a806e 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-esm.yml +++ b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs-esm.yml @@ -10,8 +10,8 @@ weblog: local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/docker-compose.yml - name: copy-nodejs-app local_path: lib-injection/build/docker/nodejs/sample-app - - name: copy-node20-app-dockerfile - local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node20 + - name: copy-node22-app-dockerfile + local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node22 - name: copy-nodejs-app-dockerfile local_path: utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node - name: copy-reverseproxy-dockerfile diff --git a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs.yml b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs.yml index b2cb2353adc..26eb02b2379 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs.yml +++ b/utils/build/virtual_machine/weblogs/nodejs/provision_test-app-nodejs.yml @@ -5,25 +5,35 @@ lang_variant: install: - os_type: linux os_distro: deb - remote-command: sudo apt-get update && sudo apt-get install -y nodejs + remote-command: | + sudo apt-get update + sudo apt-get install -y ca-certificates curl gnupg + curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - + sudo apt-get install -y nodejs - os_type: linux os_distro: rpm os_branch: redhat remote-command: | - sudo dnf -y module enable nodejs:20 - sudo dnf -y module switch-to nodejs:20 - sudo dnf install -y nodejs + sudo yum install tar -y || sudo dnf install tar -y || true + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + nvm install --no-progress 22.11.0 + nvm use 22.11.0 + n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local - os_type: linux os_distro: rpm os_branch: centos_8_amd64 remote-command: | - #one of the default method for centos 8 - #https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-centos-8 - sudo dnf -y module enable nodejs:20 - sudo dnf -y module switch-to nodejs:20 - sudo dnf install -y nodejs + sudo yum install tar -y || sudo dnf install tar -y || true + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + nvm install --no-progress 22.11.0 + nvm use 22.11.0 + n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local - os_type: linux os_distro: rpm @@ -35,8 +45,8 @@ lang_variant: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - nvm install --lts - nvm use node + nvm install --no-progress 22.11.0 + nvm use 22.11.0 n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local weblog: diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-container/Dockerfile.template b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-container/Dockerfile.template index 38bf8e93c1b..66c16e00e3e 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-container/Dockerfile.template +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-container/Dockerfile.template @@ -1,4 +1,4 @@ -FROM public.ecr.aws/docker/library/node:18 +FROM public.ecr.aws/docker/library/node:22 # Create app directory WORKDIR /usr/src/app diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node index a8b385644b3..ec68fe6d63a 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node @@ -1,4 +1,4 @@ -FROM public.ecr.aws/docker/library/node:20-slim +FROM public.ecr.aws/docker/library/node:22-slim # Create app directory WORKDIR /usr/src/app diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node20 b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node22 similarity index 79% rename from utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node20 rename to utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node22 index a8b385644b3..ec68fe6d63a 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node20 +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/Dockerfile.node22 @@ -1,4 +1,4 @@ -FROM public.ecr.aws/docker/library/node:20-slim +FROM public.ecr.aws/docker/library/node:22-slim # Create app directory WORKDIR /usr/src/app diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/docker-compose.yml b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/docker-compose.yml index c9c1d9a476f..b6741f39980 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/docker-compose.yml +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/docker-compose.yml @@ -12,13 +12,13 @@ services: healthcheck: test: "curl -f http://localhost:8080" - node_20: + node_22: env_file: "scenario_app.env" - image: system-tests/node_20:latest + image: system-tests/node_22:latest restart: always build: context: . - dockerfile: Dockerfile.node20 + dockerfile: Dockerfile.node22 healthcheck: test: "node health" diff --git a/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml b/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml index 9ce3dd07aab..c1569a8eec1 100644 --- a/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml +++ b/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml @@ -52,6 +52,11 @@ properties: type: [string, number] description: Runtime version for container-based applications examples: ["18", "6", "default"] + + nginx_config: + type: string + description: Nginx configuration file used by multicontainer weblogs + pattern: "^[a-zA-Z0-9_/.-]+$" install: type: array @@ -159,4 +164,4 @@ examples: copy_files: - name: "copy-container-run-script" local_path: "utils/build/virtual_machine/weblogs/common/create_and_run_app_container.sh" - remote-command: "sh create_and_run_app_container.sh" \ No newline at end of file + remote-command: "sh create_and_run_app_container.sh" From fddcbfc6e6d6202f75319a15c922e2fb29b8bc5e Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Mon, 6 Jul 2026 11:42:06 -0600 Subject: [PATCH 2/9] resolve to v6 instead of v5 --- utils/build/ssi/base/install_script_ssi.sh | 4 ++-- .../provisions/auto-inject/auto-inject_installer_manual.yml | 4 ++-- .../repositories/autoinstall/execute_install_script.sh | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/build/ssi/base/install_script_ssi.sh b/utils/build/ssi/base/install_script_ssi.sh index 7a694ff75fc..03fdb896889 100755 --- a/utils/build/ssi/base/install_script_ssi.sh +++ b/utils/build/ssi/base/install_script_ssi.sh @@ -30,8 +30,8 @@ if [ -n "${DD_INSTALLER_LIBRARY_VERSION}" ]; then fi if [ "${DD_LANG}" == "js" ] && [ "${SSI_ENV}" == "dev" ] && [ -z "${DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS}" ]; then - # Special case for Node.js, the staging major version is 1 above the prod major (6 here) - export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="6" + # Special case for Node.js, the staging major version is 1 above the prod major (7 here) + export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="7" fi #We want specfic injector version (to run on auto_inject pipelines) diff --git a/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml b/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml index d74b3c540d1..be314da7d63 100644 --- a/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml +++ b/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml @@ -75,8 +75,8 @@ fi if [ "${DD_LANG}" == "js" ] && [ "${DD_env}" == "dev" ] && [ -z "${DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS}" ]; then - # Special case for Node.js, the staging major version is 1 above the prod major (6 here) - export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="6" + # Special case for Node.js, the staging major version is 1 above the prod major (7 here) + export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="7" fi if [ -n "${DD_INSTALLER_INJECTOR_VERSION}" ]; then diff --git a/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh b/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh index 7ee737d7fd0..be84db112a1 100755 --- a/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh +++ b/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh @@ -41,8 +41,8 @@ if [ -n "${DD_INSTALLER_LIBRARY_VERSION}" ]; then fi if [ "${DD_LANG}" == "js" ] && [ "${DD_env}" == "dev" ] && [ -z "${DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS}" ]; then - # Special case for Node.js, the staging major version is 1 above the prod major (6 here) - export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="6" + # Special case for Node.js, the staging major version is 1 above the prod major (7 here) + export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="7" fi if [ -n "${DD_INSTALLER_INJECTOR_VERSION}" ]; then From f724aaab01f303c94a31697cfa7040dd65afbeae Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Mon, 6 Jul 2026 12:12:55 -0600 Subject: [PATCH 3/9] move to node 22 --- utils/build/docker/nodejs/express4-typescript.base.Dockerfile | 2 +- utils/build/docker/nodejs/express4.base.Dockerfile | 2 +- utils/build/docker/nodejs/express5.base.Dockerfile | 2 +- utils/build/docker/nodejs/nextjs.base.Dockerfile | 2 +- utils/build/docker/nodejs/parametric/Dockerfile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/build/docker/nodejs/express4-typescript.base.Dockerfile b/utils/build/docker/nodejs/express4-typescript.base.Dockerfile index 2396c0ca98a..ad41c8b6652 100644 --- a/utils/build/docker/nodejs/express4-typescript.base.Dockerfile +++ b/utils/build/docker/nodejs/express4-typescript.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:22-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/express4.base.Dockerfile b/utils/build/docker/nodejs/express4.base.Dockerfile index 8c24260b4e5..b1eb162e929 100644 --- a/utils/build/docker/nodejs/express4.base.Dockerfile +++ b/utils/build/docker/nodejs/express4.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:22-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/express5.base.Dockerfile b/utils/build/docker/nodejs/express5.base.Dockerfile index 9eee044cbab..35184384ab5 100644 --- a/utils/build/docker/nodejs/express5.base.Dockerfile +++ b/utils/build/docker/nodejs/express5.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:22-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/nextjs.base.Dockerfile b/utils/build/docker/nodejs/nextjs.base.Dockerfile index 7aae00023a5..973947ac47b 100644 --- a/utils/build/docker/nodejs/nextjs.base.Dockerfile +++ b/utils/build/docker/nodejs/nextjs.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:22-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/parametric/Dockerfile b/utils/build/docker/nodejs/parametric/Dockerfile index 31950eee7c4..3bf27604810 100644 --- a/utils/build/docker/nodejs/parametric/Dockerfile +++ b/utils/build/docker/nodejs/parametric/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18.10-slim +FROM node:22-slim COPY --from=oven/bun:1.3.13 /usr/local/bin/bun /usr/local/bin/bun From 4b7be779b0ed5da6875b9f4454114dd680da4eff Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Mon, 6 Jul 2026 13:20:50 -0600 Subject: [PATCH 4/9] Handle Node.js SSI runtime support by tracer major --- tests/docker_ssi/test_docker_ssi.py | 18 +++++++++++++----- tests/docker_ssi/test_docker_ssi_appsec.py | 9 ++++++++- tests/docker_ssi/test_docker_ssi_crash.py | 9 ++++++++- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/tests/docker_ssi/test_docker_ssi.py b/tests/docker_ssi/test_docker_ssi.py index 5242e7da8ff..5e0c79d741a 100644 --- a/tests/docker_ssi/test_docker_ssi.py +++ b/tests/docker_ssi/test_docker_ssi.py @@ -14,6 +14,14 @@ ) +_NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 +_NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( + (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") + or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "12.17.0") +) +_NODEJS_ABORT_IRRELEVANT = context.library == "nodejs" and not _NODEJS_UNSUPPORTED_RUNTIME + + @scenarios.docker_ssi class TestDockerSSIFeatures: """Test the ssi in a simulated host injection environment (docker container + test agent) @@ -42,7 +50,7 @@ def setup_install_supported_runtime(self): @irrelevant(context.library == "python" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.0") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") + @irrelevant(_NODEJS_UNSUPPORTED_RUNTIME) @irrelevant(context.library >= "python@4.0.0rc1" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") def test_install_supported_runtime(self): @@ -77,7 +85,7 @@ def test_install_weblog_running(self): ) @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.0") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") + @irrelevant(_NODEJS_UNSUPPORTED_RUNTIME) @irrelevant(context.library >= "python@4.0.0rc1" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") def test_telemetry(self): @@ -106,7 +114,7 @@ def test_telemetry(self): @irrelevant(context.library == "php" and context.installed_language_runtime >= "7.0") @bug(context.library == "nodejs" and context.installed_language_runtime < "12.17.0", reason="INPLAT-252") @bug(context.library == "java" and context.installed_language_runtime == "1.7.0-201", reason="INPLAT-427") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime >= "22.0") + @irrelevant(_NODEJS_ABORT_IRRELEVANT) @irrelevant(context.library == "dotnet" and context.installed_language_runtime >= "6.0.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime >= "2.6.0") def test_telemetry_abort(self): @@ -145,7 +153,7 @@ def setup_instrumentation_source_ssi(self): @irrelevant(context.library == "python" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.1") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") + @irrelevant(_NODEJS_UNSUPPORTED_RUNTIME) @irrelevant(context.library >= "python@4.0.0.dev" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library < "python@4.0.0.dev" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") @@ -168,7 +176,7 @@ def setup_injection_metadata(self): @irrelevant(context.library == "python" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.1") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") + @irrelevant(_NODEJS_UNSUPPORTED_RUNTIME) @irrelevant(context.library >= "python@4.0.0rc1" and context.installed_language_runtime < "3.9.0") def test_injection_metadata(self): logger.info("Testing injection result variables") diff --git a/tests/docker_ssi/test_docker_ssi_appsec.py b/tests/docker_ssi/test_docker_ssi_appsec.py index e0ef1bfe6e1..4eff5e763a7 100644 --- a/tests/docker_ssi/test_docker_ssi_appsec.py +++ b/tests/docker_ssi/test_docker_ssi_appsec.py @@ -4,6 +4,13 @@ from utils import scenarios, interfaces, weblog, features, irrelevant, context +_NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 +_NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( + (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") + or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "12.17.0") +) + + @features.appsec_service_activation_origin_metric @scenarios.docker_ssi_appsec class TestDockerSSIAppsecFeatures: @@ -17,7 +24,7 @@ def setup_telemetry_source_ssi(self): @irrelevant(context.library == "java" and context.installed_language_runtime < "1.8.0_0") @irrelevant(context.library == "php" and context.installed_language_runtime < "7.1") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") + @irrelevant(_NODEJS_UNSUPPORTED_RUNTIME) @irrelevant(context.library >= "python@4.0.0.dev" and context.installed_language_runtime < "3.9.0") @irrelevant(context.library < "python@4.0.0.dev" and context.installed_language_runtime < "3.8.0") @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0", reason="Ruby 2.6+ required") diff --git a/tests/docker_ssi/test_docker_ssi_crash.py b/tests/docker_ssi/test_docker_ssi_crash.py index 78eb849e7b4..35d58a71b54 100644 --- a/tests/docker_ssi/test_docker_ssi_crash.py +++ b/tests/docker_ssi/test_docker_ssi_crash.py @@ -10,6 +10,13 @@ from utils import weblog, logger +_NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 +_NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( + (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") + or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "12.17.0") +) + + @scenarios.docker_ssi_crashtracking class TestDockerSSICrash: """Test the ssi in a simulated host injection environment (docker container + test agent) @@ -36,7 +43,7 @@ def setup_crash(self): @features.ssi_crashtracking @irrelevant(context.library == "python" and context.installed_language_runtime < "3.7.0") - @irrelevant(context.library == "nodejs" and context.installed_language_runtime < "22.0") + @irrelevant(_NODEJS_UNSUPPORTED_RUNTIME) @irrelevant(context.library == "ruby" and context.installed_language_runtime < "2.6.0") def test_crash(self): """Validate that a crash report is generated when the application crashes""" From 5d7788a441391ad081e61d69b381b38a2186530e Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Mon, 6 Jul 2026 13:31:24 -0600 Subject: [PATCH 5/9] fix floor --- tests/docker_ssi/test_docker_ssi.py | 2 +- tests/docker_ssi/test_docker_ssi_appsec.py | 2 +- tests/docker_ssi/test_docker_ssi_crash.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/docker_ssi/test_docker_ssi.py b/tests/docker_ssi/test_docker_ssi.py index 5e0c79d741a..dc423cada72 100644 --- a/tests/docker_ssi/test_docker_ssi.py +++ b/tests/docker_ssi/test_docker_ssi.py @@ -17,7 +17,7 @@ _NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 _NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") - or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "12.17.0") + or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "17.0") ) _NODEJS_ABORT_IRRELEVANT = context.library == "nodejs" and not _NODEJS_UNSUPPORTED_RUNTIME diff --git a/tests/docker_ssi/test_docker_ssi_appsec.py b/tests/docker_ssi/test_docker_ssi_appsec.py index 4eff5e763a7..5db9d16ac3b 100644 --- a/tests/docker_ssi/test_docker_ssi_appsec.py +++ b/tests/docker_ssi/test_docker_ssi_appsec.py @@ -7,7 +7,7 @@ _NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 _NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") - or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "12.17.0") + or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "17.0") ) diff --git a/tests/docker_ssi/test_docker_ssi_crash.py b/tests/docker_ssi/test_docker_ssi_crash.py index 35d58a71b54..fe91b970d2d 100644 --- a/tests/docker_ssi/test_docker_ssi_crash.py +++ b/tests/docker_ssi/test_docker_ssi_crash.py @@ -13,7 +13,7 @@ _NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 _NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") - or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "12.17.0") + or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "17.0") ) From 8dcd493271ccf51a269d4aa24dac72d4e0679b62 Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Mon, 6 Jul 2026 14:12:23 -0600 Subject: [PATCH 6/9] remove unrelated changes --- .../docker/nodejs/express4-typescript.base.Dockerfile | 2 +- utils/build/docker/nodejs/express4.base.Dockerfile | 2 +- utils/build/docker/nodejs/express5.base.Dockerfile | 2 +- utils/build/docker/nodejs/nextjs.base.Dockerfile | 2 +- utils/build/docker/nodejs/parametric/Dockerfile | 2 +- .../virtual_machine/weblogs/weblog_provision_schema.yml | 7 +------ 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/utils/build/docker/nodejs/express4-typescript.base.Dockerfile b/utils/build/docker/nodejs/express4-typescript.base.Dockerfile index ad41c8b6652..2396c0ca98a 100644 --- a/utils/build/docker/nodejs/express4-typescript.base.Dockerfile +++ b/utils/build/docker/nodejs/express4-typescript.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:22-alpine +FROM node:18-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/express4.base.Dockerfile b/utils/build/docker/nodejs/express4.base.Dockerfile index b1eb162e929..8c24260b4e5 100644 --- a/utils/build/docker/nodejs/express4.base.Dockerfile +++ b/utils/build/docker/nodejs/express4.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:22-alpine +FROM node:18-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/express5.base.Dockerfile b/utils/build/docker/nodejs/express5.base.Dockerfile index 35184384ab5..9eee044cbab 100644 --- a/utils/build/docker/nodejs/express5.base.Dockerfile +++ b/utils/build/docker/nodejs/express5.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:22-alpine +FROM node:18-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/nextjs.base.Dockerfile b/utils/build/docker/nodejs/nextjs.base.Dockerfile index 973947ac47b..7aae00023a5 100644 --- a/utils/build/docker/nodejs/nextjs.base.Dockerfile +++ b/utils/build/docker/nodejs/nextjs.base.Dockerfile @@ -1,4 +1,4 @@ -FROM node:22-alpine +FROM node:20-alpine COPY --from=oven/bun:1.3.13-alpine /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/docker/nodejs/parametric/Dockerfile b/utils/build/docker/nodejs/parametric/Dockerfile index 3bf27604810..31950eee7c4 100644 --- a/utils/build/docker/nodejs/parametric/Dockerfile +++ b/utils/build/docker/nodejs/parametric/Dockerfile @@ -1,4 +1,4 @@ -FROM node:22-slim +FROM node:18.10-slim COPY --from=oven/bun:1.3.13 /usr/local/bin/bun /usr/local/bin/bun diff --git a/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml b/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml index c1569a8eec1..9ce3dd07aab 100644 --- a/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml +++ b/utils/build/virtual_machine/weblogs/weblog_provision_schema.yml @@ -52,11 +52,6 @@ properties: type: [string, number] description: Runtime version for container-based applications examples: ["18", "6", "default"] - - nginx_config: - type: string - description: Nginx configuration file used by multicontainer weblogs - pattern: "^[a-zA-Z0-9_/.-]+$" install: type: array @@ -164,4 +159,4 @@ examples: copy_files: - name: "copy-container-run-script" local_path: "utils/build/virtual_machine/weblogs/common/create_and_run_app_container.sh" - remote-command: "sh create_and_run_app_container.sh" + remote-command: "sh create_and_run_app_container.sh" \ No newline at end of file From b681291aeb960e380b2f0a45b69ea81f9e792fac Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Mon, 6 Jul 2026 15:15:59 -0600 Subject: [PATCH 7/9] update nginx --- .../weblogs/nodejs/test-app-nodejs-esm/nginx.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/nginx.conf b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/nginx.conf index f7c3522ab52..0b3e5c184cb 100644 --- a/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/nginx.conf +++ b/utils/build/virtual_machine/weblogs/nodejs/test-app-nodejs-esm/nginx.conf @@ -8,8 +8,8 @@ http { '"$request" $status $upstream_addr ' '"$http_referer" "$http_user_agent" "$gzip_ratio"'; - upstream node_20_app { - server node_20:18080; + upstream node_22_app { + server node_22:18080; } upstream node_app { server node:18080; @@ -24,9 +24,9 @@ http { return 200 "{ 'app_type':'multicontainer', 'apps':[{ - 'runtime':'20', + 'runtime':'22', 'type':'container', - 'url':'/node_20/' + 'url':'/node_22/' },{ 'runtime':'latest', 'type':'container', @@ -35,8 +35,8 @@ http { }"; } - location /node_20/ { - proxy_pass http://node_20_app/; + location /node_22/ { + proxy_pass http://node_22_app/; proxy_redirect off; } location /node/ { From 5a1d4e3f023488d667b145ed9f1d860119b604f2 Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Tue, 7 Jul 2026 09:22:15 -0600 Subject: [PATCH 8/9] revert bump to 7 --- utils/build/ssi/base/install_script_ssi.sh | 2 +- .../auto-inject_installer_manual.yml | 20 +++++++++---------- .../autoinstall/execute_install_script.sh | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/utils/build/ssi/base/install_script_ssi.sh b/utils/build/ssi/base/install_script_ssi.sh index 03fdb896889..da3f575bf3e 100755 --- a/utils/build/ssi/base/install_script_ssi.sh +++ b/utils/build/ssi/base/install_script_ssi.sh @@ -31,7 +31,7 @@ fi if [ "${DD_LANG}" == "js" ] && [ "${SSI_ENV}" == "dev" ] && [ -z "${DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS}" ]; then # Special case for Node.js, the staging major version is 1 above the prod major (7 here) - export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="7" + export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="6" fi #We want specfic injector version (to run on auto_inject pipelines) diff --git a/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml b/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml index be314da7d63..6e665d9b8d0 100644 --- a/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml +++ b/utils/build/virtual_machine/provisions/auto-inject/auto-inject_installer_manual.yml @@ -16,11 +16,11 @@ if command -v docker >/dev/null 2>&1; then echo "Docker is installed, ensuring service is enabled and running..." sudo systemctl enable docker.service docker.socket - + if ! sudo systemctl is-active --quiet docker.service; then echo "Docker service is not running, starting it..." sudo systemctl start docker.service docker.socket - + # Wait for Docker to be fully ready echo "Waiting for Docker service to be ready..." MAX_WAIT=20 @@ -34,7 +34,7 @@ sleep 1 ((COUNTER++)) done - + if [ $COUNTER -eq $MAX_WAIT ]; then echo "WARNING: Docker service did not become ready after $MAX_WAIT seconds" fi @@ -56,8 +56,8 @@ export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_PYTHON=4 fi - else - export DD_SITE="datadoghq.com" + else + export DD_SITE="datadoghq.com" #The latest release of python tracer version is 2.x we want to use 3.x. Get from repo tags v3* and not rc*. We get the SHA of the tag. #more details: https://datadoghq.atlassian.net/browse/APMSP-2259 if [ "${DD_LANG}" == "python" ]; then @@ -76,7 +76,7 @@ if [ "${DD_LANG}" == "js" ] && [ "${DD_env}" == "dev" ] && [ -z "${DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS}" ]; then # Special case for Node.js, the staging major version is 1 above the prod major (7 here) - export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="7" + export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="6" fi if [ -n "${DD_INSTALLER_INJECTOR_VERSION}" ]; then @@ -156,10 +156,10 @@ sudo cp debug_config.yaml /etc/datadog-agent/inject/debug_config.yaml for i in 1 2 3 4 5; do sudo datadog-installer apm instrument docker && break || sleep 1; done - + # Add dd-agent user to docker group for docker socket access sudo usermod -aG docker dd-agent || echo "Warning: Could not add dd-agent to docker group" - + # Restart datadog-agent so the new group membership takes effect sudo systemctl restart datadog-agent || echo "Warning: Could not restart datadog-agent" - os_type: windows @@ -201,7 +201,7 @@ [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; $env:DD_SITE = "datadoghq.com"; $env:DD_APM_INSTRUMENTATION_ENABLED = "iis" - + # Check if Install-Datadog.ps1 exists locally in binaries folder if (Test-Path "Install-Datadog.ps1") { Write-Host "*** Execute installation script from provided binaries ***" @@ -210,5 +210,5 @@ Write-Host "Download installation script from datadoghq.com" (New-Object System.Net.WebClient).DownloadFile('https://install.datadoghq.com/Install-Datadog.ps1', 'C:\Windows\SystemTemp\Install-Datadog.ps1'); } - + C:\Windows\SystemTemp\Install-Datadog.ps1 diff --git a/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh b/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh index be84db112a1..b7f9ab5d144 100755 --- a/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh +++ b/utils/build/virtual_machine/provisions/auto-inject/repositories/autoinstall/execute_install_script.sh @@ -23,8 +23,8 @@ if [ "${DD_env}" == "dev" ]; then if [ "${DD_LANG}" == "python" ]; then export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_PYTHON=4 fi -else - export DD_SITE="datadoghq.com" +else + export DD_SITE="datadoghq.com" #The latest release of python tracer version is 2.x we want to use 4.x. Get from repo tags v3* and not rc*. We get the SHA of the tag. #more details: https://datadoghq.atlassian.net/browse/APMSP-2259 if [ "${DD_LANG}" == "python" ]; then @@ -37,12 +37,12 @@ export DD_APM_INSTRUMENTATION_LIBRARIES="${DD_LANG}" if [ -n "${DD_INSTALLER_LIBRARY_VERSION}" ]; then export "DD_INSTALLER_REGISTRY_URL_APM_LIBRARY_$(echo "$DD_LANG" | tr "[:lower:]" "[:upper:]")_PACKAGE"='installtesting.datad0g.com' - export "DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_$(echo "$DD_LANG" | tr "[:lower:]" "[:upper:]")"="${DD_INSTALLER_LIBRARY_VERSION}" + export "DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_$(echo "$DD_LANG" | tr "[:lower:]" "[:upper:]")"="${DD_INSTALLER_LIBRARY_VERSION}" fi if [ "${DD_LANG}" == "js" ] && [ "${DD_env}" == "dev" ] && [ -z "${DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS}" ]; then # Special case for Node.js, the staging major version is 1 above the prod major (7 here) - export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="7" + export DD_INSTALLER_DEFAULT_PKG_VERSION_DATADOG_APM_LIBRARY_JS="6" fi if [ -n "${DD_INSTALLER_INJECTOR_VERSION}" ]; then From d068d5e574a977ca9ac4fa325d4dfe7bfd76c506 Mon Sep 17 00:00:00 2001 From: Pablo Erhard Date: Tue, 7 Jul 2026 14:03:26 -0600 Subject: [PATCH 9/9] add support for stale v6. --- tests/docker_ssi/test_docker_ssi.py | 9 ++++++--- tests/docker_ssi/test_docker_ssi_appsec.py | 9 ++++++--- tests/docker_ssi/test_docker_ssi_crash.py | 9 ++++++--- utils/_context/_scenarios/docker_ssi.py | 1 + 4 files changed, 19 insertions(+), 9 deletions(-) diff --git a/tests/docker_ssi/test_docker_ssi.py b/tests/docker_ssi/test_docker_ssi.py index dc423cada72..8a70b122fce 100644 --- a/tests/docker_ssi/test_docker_ssi.py +++ b/tests/docker_ssi/test_docker_ssi.py @@ -14,10 +14,13 @@ ) -_NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 +_NODEJS_STALE_DEV_V6 = ( + context.library == "nodejs" and context.library.version.major == 6 and context.configuration.get("env") == "dev" +) +_NODEJS_REQUIRES_NODE_22 = context.library == "nodejs" and context.library.version.major >= 6 and not _NODEJS_STALE_DEV_V6 _NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( - (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") - or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "17.0") + (_NODEJS_REQUIRES_NODE_22 and context.installed_language_runtime < "22.0") + or (not _NODEJS_REQUIRES_NODE_22 and context.installed_language_runtime < "17.0") ) _NODEJS_ABORT_IRRELEVANT = context.library == "nodejs" and not _NODEJS_UNSUPPORTED_RUNTIME diff --git a/tests/docker_ssi/test_docker_ssi_appsec.py b/tests/docker_ssi/test_docker_ssi_appsec.py index 5db9d16ac3b..5e061113c2a 100644 --- a/tests/docker_ssi/test_docker_ssi_appsec.py +++ b/tests/docker_ssi/test_docker_ssi_appsec.py @@ -4,10 +4,13 @@ from utils import scenarios, interfaces, weblog, features, irrelevant, context -_NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 +_NODEJS_STALE_DEV_V6 = ( + context.library == "nodejs" and context.library.version.major == 6 and context.configuration.get("env") == "dev" +) +_NODEJS_REQUIRES_NODE_22 = context.library == "nodejs" and context.library.version.major >= 6 and not _NODEJS_STALE_DEV_V6 _NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( - (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") - or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "17.0") + (_NODEJS_REQUIRES_NODE_22 and context.installed_language_runtime < "22.0") + or (not _NODEJS_REQUIRES_NODE_22 and context.installed_language_runtime < "17.0") ) diff --git a/tests/docker_ssi/test_docker_ssi_crash.py b/tests/docker_ssi/test_docker_ssi_crash.py index fe91b970d2d..8c12c3e2921 100644 --- a/tests/docker_ssi/test_docker_ssi_crash.py +++ b/tests/docker_ssi/test_docker_ssi_crash.py @@ -10,10 +10,13 @@ from utils import weblog, logger -_NODEJS_V6_OR_LATER = context.library == "nodejs" and context.library.version.major >= 6 +_NODEJS_STALE_DEV_V6 = ( + context.library == "nodejs" and context.library.version.major == 6 and context.configuration.get("env") == "dev" +) +_NODEJS_REQUIRES_NODE_22 = context.library == "nodejs" and context.library.version.major >= 6 and not _NODEJS_STALE_DEV_V6 _NODEJS_UNSUPPORTED_RUNTIME = context.library == "nodejs" and ( - (_NODEJS_V6_OR_LATER and context.installed_language_runtime < "22.0") - or (not _NODEJS_V6_OR_LATER and context.installed_language_runtime < "17.0") + (_NODEJS_REQUIRES_NODE_22 and context.installed_language_runtime < "22.0") + or (not _NODEJS_REQUIRES_NODE_22 and context.installed_language_runtime < "17.0") ) diff --git a/utils/_context/_scenarios/docker_ssi.py b/utils/_context/_scenarios/docker_ssi.py index 8467997cbd8..fdbd539ec27 100644 --- a/utils/_context/_scenarios/docker_ssi.py +++ b/utils/_context/_scenarios/docker_ssi.py @@ -70,6 +70,7 @@ def configure(self, config: pytest.Config): self._arch = config.option.ssi_arch self._env = "prod" if config.option.ssi_env is None or config.option.ssi_env == "prod" else "dev" + self.configuration["env"] = self._env self._custom_library_version = config.option.ssi_library_version self._custom_injector_version = config.option.ssi_injector_version