From 9e6f9aa1726bee3a795fa272ed8a8cba24940990 Mon Sep 17 00:00:00 2001 From: Ayush Ranjan Date: Tue, 14 May 2024 08:32:01 -0700 Subject: [PATCH] Bump Nodejs runtime tests to Node.js 22. PiperOrigin-RevId: 633594727 --- .buildkite/pipeline.yaml | 4 ++-- .../Dockerfile.x86_64 | 14 +++++++------- test/runtimes/BUILD | 4 ++-- test/runtimes/README.md | 4 ++-- test/runtimes/exclude/nodejs16.13.2.csv | 15 --------------- test/runtimes/exclude/nodejs22.2.0.csv | 13 +++++++++++++ test/runtimes/proctor/lib/nodejs.go | 2 +- 7 files changed, 27 insertions(+), 29 deletions(-) rename images/runtimes/{nodejs16.13.2 => nodejs22.2.0}/Dockerfile.x86_64 (66%) delete mode 100644 test/runtimes/exclude/nodejs16.13.2.csv create mode 100644 test/runtimes/exclude/nodejs22.2.0.csv diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 06fec84ad4..406621f037 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -526,7 +526,7 @@ steps: - <<: *common <<: *docker label: ":node: NodeJS runtime tests" - command: make nodejs16.13.2-runtime-tests RUNTIME_ARGS=--directfs + command: make nodejs22.2.0-runtime-tests RUNTIME_ARGS=--directfs parallelism: 10 agents: <<: *platform_specific_agents @@ -571,7 +571,7 @@ steps: - <<: *common <<: *docker label: ":node: NodeJS runtime tests (goferfs)" - command: make nodejs16.13.2-runtime-tests RUNTIME_ARGS=--directfs=false + command: make nodejs22.2.0-runtime-tests RUNTIME_ARGS=--directfs=false parallelism: 10 if: build.branch == "master" agents: diff --git a/images/runtimes/nodejs16.13.2/Dockerfile.x86_64 b/images/runtimes/nodejs22.2.0/Dockerfile.x86_64 similarity index 66% rename from images/runtimes/nodejs16.13.2/Dockerfile.x86_64 rename to images/runtimes/nodejs22.2.0/Dockerfile.x86_64 index 051edb359a..31a66edb4d 100644 --- a/images/runtimes/nodejs16.13.2/Dockerfile.x86_64 +++ b/images/runtimes/nodejs22.2.0/Dockerfile.x86_64 @@ -1,20 +1,20 @@ -FROM ubuntu:bionic +FROM ubuntu:jammy RUN apt-get update && apt-get install -y \ curl \ dumb-init \ g++ \ make \ - python \ - python3.8 + python3.10 WORKDIR /root -ARG VERSION=v16.13.2 -RUN curl -o node-${VERSION}.tar.gz https://nodejs.org/dist/${VERSION}/node-${VERSION}.tar.gz -RUN tar -zxf node-${VERSION}.tar.gz +ARG VERSION=v22.2.0 +RUN curl -o node-${VERSION}.tar.gz https://nodejs.org/dist/${VERSION}/node-${VERSION}.tar.gz \ + && tar -zxf node-${VERSION}.tar.gz \ + && rm -f node-${VERSION}.tar.gz WORKDIR /root/node-${VERSION} RUN ./configure -RUN make test-build +RUN make -j $(nproc) test-build # Including dumb-init emulates the Linux "init" process, preventing the failure # of tests involving worker processes. diff --git a/test/runtimes/BUILD b/test/runtimes/BUILD index 310bd4ea27..e62ff43a09 100644 --- a/test/runtimes/BUILD +++ b/test/runtimes/BUILD @@ -22,8 +22,8 @@ runtime_test( ) runtime_test( - name = "nodejs16.13.2", - exclude_file = "exclude/nodejs16.13.2.csv", + name = "nodejs22.2.0", + exclude_file = "exclude/nodejs22.2.0.csv", lang = "nodejs", shard_count = most_shards, ) diff --git a/test/runtimes/README.md b/test/runtimes/README.md index 24eaefe47b..9b070f826a 100644 --- a/test/runtimes/README.md +++ b/test/runtimes/README.md @@ -27,10 +27,10 @@ The following `make` targets will run an entire runtime test suite locally. Note: java runtime test take 1+ hours with 16 cores. Language | Version | Running the test suite --------- | ------- | ---------------------------------- +-------- | ------- | --------------------------------- Go | 1.22 | `make go1.22-runtime-tests` Java | 21 | `make java21-runtime-tests` -NodeJS | 16.13.2 | `make nodejs16.13.2-runtime-tests` +NodeJS | 22.2.0 | `make nodejs22.2.0-runtime-tests` Php | 8.3.7 | `make php8.3.7-runtime-tests` Python | 3.12.3 | `make python3.12.3-runtime-tests` diff --git a/test/runtimes/exclude/nodejs16.13.2.csv b/test/runtimes/exclude/nodejs16.13.2.csv deleted file mode 100644 index bdab7eeca0..0000000000 --- a/test/runtimes/exclude/nodejs16.13.2.csv +++ /dev/null @@ -1,15 +0,0 @@ -test name,bug id,comment -benchmark/test-benchmark-napi.js,,Broken test -internet/test-dgram-multicast-ssm-multi-process.js,, -internet/test-dgram-multicast-ssmv6-multi-process.js,,Broken test -internet/test-dns.js,,Broken test -internet/test-dns-any.js,,Broken test -internet/test-dns-ipv4.js,,Flaky on Buildkite because it relies on external network -internet/test-inspector-help-page.js,,Broken test -parallel/test-dns-lookupService-promises.js,,Broken test -parallel/test-http-writable-true-after-close.js,b/171301436,Flaky -parallel/test-https-selfsigned-no-keycertsign-no-crash.js,,Broken test -pseudo-tty/test-stdout-read.js,b/162801321, -tick-processor/test-tick-processor-builtin.js,,Broken test -v8-updates/test-linux-perf.js,,Broken test -wasi/test-wasi.js,, diff --git a/test/runtimes/exclude/nodejs22.2.0.csv b/test/runtimes/exclude/nodejs22.2.0.csv new file mode 100644 index 0000000000..98744944bb --- /dev/null +++ b/test/runtimes/exclude/nodejs22.2.0.csv @@ -0,0 +1,13 @@ +test name,bug id,comment +benchmark/test-benchmark-napi.js,,Broken test +internet/test-dgram-multicast-ssm-multi-process.js,b/344592701, +internet/test-dgram-multicast-ssmv6-multi-process.js,,Broken test +internet/test-dns-ipv4.js,,Broken test (Flaky because it relies on external network) +internet/test-inspector-help-page.js,,Broken test +internet/test-net-autoselectfamily-events-failure.js,,Broken test +internet/test-snapshot-dns-resolve.js,,Broken test (Flaky because it relies on external network) +pseudo-tty/test-stdout-read.js,b/162801321, +parallel/test-child-process-set-blocking.js,,Broken test +pummel/test-child-process-spawn-loop.js,,Broken test +tick-processor/test-tick-processor-builtin.js,,Broken test +v8-updates/test-linux-perf.js,,Broken test diff --git a/test/runtimes/proctor/lib/nodejs.go b/test/runtimes/proctor/lib/nodejs.go index 320597aa5a..9f5171e511 100644 --- a/test/runtimes/proctor/lib/nodejs.go +++ b/test/runtimes/proctor/lib/nodejs.go @@ -42,5 +42,5 @@ func (nodejsRunner) ListTests() ([]string, error) { // TestCmds implements TestRunner.TestCmds. func (nodejsRunner) TestCmds(tests []string) []*exec.Cmd { args := append([]string{filepath.Join("tools", "test.py"), "--timeout=180"}, tests...) - return []*exec.Cmd{exec.Command("/usr/bin/python", args...)} + return []*exec.Cmd{exec.Command("/usr/bin/python3.10", args...)} }