Skip to content

Commit dc9b260

Browse files
authored
[chore] Upgrade NodeJS instrumentation to latest (#6162)
* Upgrade NodeJS instrumentation to latest * Latest instrumentation requires node v18 or later, upgrading auto-instr tests * Update npm command to match v18 * Remove ubuntu-bionic images (EOL)
1 parent 3c0b9f9 commit dc9b260

18 files changed

+17
-87
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v2.15.0
1+
v3.1.2

packaging/tests/deployments/salt/images/Dockerfile.deb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM ${DISTRO_IMAGE}
44
ARG DISTRO_IMAGE
55
ENV DEBIAN_FRONTEND=noninteractive
66
ENV SALT_VERSION=latest
7-
ENV NODE_VERSION=16.20.2
7+
ENV NODE_VERSION=18.20.8
88

99
RUN apt-get update && apt-get upgrade -y -o DPkg::Options::=--force-confold
1010
RUN apt-get install -y software-properties-common ca-certificates wget curl apt-transport-https python3-pip vim systemd procps

packaging/tests/deployments/salt/images/Dockerfile.rpm

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ARG DISTRO_IMAGE
77
ARG PKG_MGR=dnf
88
ENV DEBIAN_FRONTEND=noninteractive
99
ENV SALT_VERSION=latest
10-
ENV NODE_VERSION=16.20.2
10+
ENV NODE_VERSION=18.20.8
1111
ENV container=docker
1212

1313
# config for centos

packaging/tests/images/deb/Dockerfile.ubuntu-bionic

-24
This file was deleted.

packaging/tests/instrumentation/images/deb/Dockerfile.debian-bookworm

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY --from=tomcat /opt/java /opt/java
2525
COPY instrumentation/setup-tomcat.sh /opt/
2626
RUN bash /opt/setup-tomcat.sh
2727

28-
ARG NODE_VERSION=v16
28+
ARG NODE_VERSION=v18
2929
COPY instrumentation/setup-express.sh /opt
3030
RUN bash /opt/setup-express.sh
3131

packaging/tests/instrumentation/images/deb/Dockerfile.debian-bullseye

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY --from=tomcat /opt/java /opt/java
2525
COPY instrumentation/setup-tomcat.sh /opt/
2626
RUN bash /opt/setup-tomcat.sh
2727

28-
ARG NODE_VERSION=v16
28+
ARG NODE_VERSION=v18
2929
COPY instrumentation/setup-express.sh /opt
3030
RUN bash /opt/setup-express.sh
3131

packaging/tests/instrumentation/images/deb/Dockerfile.ubuntu-bionic

-44
This file was deleted.

packaging/tests/instrumentation/images/deb/Dockerfile.ubuntu-focal

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY --from=tomcat /opt/java /opt/java
2525
COPY instrumentation/setup-tomcat.sh /opt/
2626
RUN bash /opt/setup-tomcat.sh
2727

28-
ARG NODE_VERSION=v16
28+
ARG NODE_VERSION=v18
2929
COPY instrumentation/setup-express.sh /opt
3030
RUN bash /opt/setup-express.sh
3131

packaging/tests/instrumentation/images/deb/Dockerfile.ubuntu-jammy

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY --from=tomcat /opt/java /opt/java
2525
COPY instrumentation/setup-tomcat.sh /opt/
2626
RUN bash /opt/setup-tomcat.sh
2727

28-
ARG NODE_VERSION=v16
28+
ARG NODE_VERSION=v18
2929
COPY instrumentation/setup-express.sh /opt
3030
RUN bash /opt/setup-express.sh
3131

packaging/tests/instrumentation/images/deb/Dockerfile.ubuntu-noble

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY --from=tomcat /opt/java /opt/java
2525
COPY instrumentation/setup-tomcat.sh /opt/
2626
RUN bash /opt/setup-tomcat.sh
2727

28-
ARG NODE_VERSION=v16
28+
ARG NODE_VERSION=v18
2929
COPY instrumentation/setup-express.sh /opt
3030
RUN bash /opt/setup-express.sh
3131

packaging/tests/instrumentation/images/rpm/Dockerfile.amazonlinux-2023

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ COPY --from=tomcat /opt/java /opt/java
2424
COPY instrumentation/setup-tomcat.sh /opt/
2525
RUN bash /opt/setup-tomcat.sh
2626

27-
ARG NODE_VERSION=v16
27+
ARG NODE_VERSION=v18
2828
COPY instrumentation/setup-express.sh /opt
2929
RUN bash /opt/setup-express.sh
3030

packaging/tests/instrumentation/images/rpm/Dockerfile.centos-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ COPY --from=tomcat /opt/java /opt/java
2727
COPY instrumentation/setup-tomcat.sh /opt/
2828
RUN bash /opt/setup-tomcat.sh
2929

30-
ARG NODE_VERSION=v16
30+
ARG NODE_VERSION=v18
3131
COPY instrumentation/setup-express.sh /opt
3232
RUN bash /opt/setup-express.sh
3333

packaging/tests/instrumentation/images/rpm/Dockerfile.centos-9

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ COPY --from=tomcat /opt/java /opt/java
2626
COPY instrumentation/setup-tomcat.sh /opt/
2727
RUN bash /opt/setup-tomcat.sh
2828

29-
ARG NODE_VERSION=v16
29+
ARG NODE_VERSION=v18
3030
COPY instrumentation/setup-express.sh /opt
3131
RUN bash /opt/setup-express.sh
3232

packaging/tests/instrumentation/images/rpm/Dockerfile.opensuse-15

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY --from=tomcat /opt/java /opt/java
2525
COPY instrumentation/setup-tomcat.sh /opt/
2626
RUN bash /opt/setup-tomcat.sh
2727

28-
ARG NODE_VERSION=v16
28+
ARG NODE_VERSION=v18
2929
COPY instrumentation/setup-express.sh /opt
3030
RUN bash /opt/setup-express.sh
3131

packaging/tests/instrumentation/images/rpm/Dockerfile.oraclelinux-8

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ COPY --from=tomcat /opt/java /opt/java
2424
COPY instrumentation/setup-tomcat.sh /opt/
2525
RUN bash /opt/setup-tomcat.sh
2626

27-
ARG NODE_VERSION=v16
27+
ARG NODE_VERSION=v18
2828
COPY instrumentation/setup-express.sh /opt
2929
RUN bash /opt/setup-express.sh
3030

packaging/tests/instrumentation/images/rpm/Dockerfile.oraclelinux-9

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ COPY --from=tomcat /opt/java /opt/java
2424
COPY instrumentation/setup-tomcat.sh /opt/
2525
RUN bash /opt/setup-tomcat.sh
2626

27-
ARG NODE_VERSION=v16
27+
ARG NODE_VERSION=v18
2828
COPY instrumentation/setup-express.sh /opt
2929
RUN bash /opt/setup-express.sh
3030

packaging/tests/instrumentation/instrumentation_test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,8 @@ def test_express_instrumentation(distro, arch):
329329
assert pkg_path, f"{PKG_NAME} package not found"
330330
pkg_base = os.path.basename(pkg_path)
331331

332-
# minimum supported node version required for profiling
333-
node_version = 16
332+
# minimum supported node version
333+
node_version = 18
334334

335335
buildargs = {"NODE_VERSION": f"v{node_version}"}
336336

packaging/tests/instrumentation/setup-express.sh

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ HOME=$NVM_HOME bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0
1111
NVM_DIR="$NVM_HOME/.nvm"
1212
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
1313

14-
nvm install --default ${NODE_VERSION:-v16}
15-
16-
npm config --global set user root
14+
nvm install --default ${NODE_VERSION:-v18} --unsafe-perm
1715

1816
NODE_PATH="$( npm root -g )"
1917

0 commit comments

Comments
 (0)