Skip to content

Add Node.js 22 and Node.js 24 runtimes - #261

Open
premtsd-code wants to merge 1 commit into
apache:masterfrom
premtsd-code:add-nodejs-22-24-runtimes
Open

Add Node.js 22 and Node.js 24 runtimes#261
premtsd-code wants to merge 1 commit into
apache:masterfrom
premtsd-code:add-nodejs-22-24-runtimes

Conversation

@premtsd-code

Copy link
Copy Markdown

Description

Adds nodejs:22 and nodejs:24 runtimes, producing the images action-nodejs-v22 and action-nodejs-v24.

The newest Node.js runtime this repository publishes is Node.js 20. Per the Node.js release schedule, Node 18 reached end-of-life in April 2025 and Node 20 in April 2026, so a user on a current OpenWhisk deployment has no supported Node.js version to target. Node 22 and Node 24 restore that.

Changes

  • core/nodejs22Action/, core/nodejs24Action/Dockerfile, build.gradle, .dockerignore and CHANGELOG.md, following the existing nodejs20Action layout exactly. The runtime sources are not duplicated: they continue to be copied from core/nodejsActionBase by the existing copy* Gradle tasks and removed again by cleanup, so the only substantive difference from nodejs20Action is the base image.
  • settings.gradle — register the new runtime subprojects and their test-fixture images.
  • tests/dat/docker/nodejs22docker/, tests/dat/docker/nodejs24docker/ — test fixture images, mirroring nodejs20docker.
  • tests/src/test/scala/runtime/actionContainers/NodeJs22ActionContainerTests, NodeJs22ConcurrentTests, NodeJs24ActionContainerTests, NodeJs24ConcurrentTests, binding the shared suites to the new images.
  • .github/workflows/ci.yaml — publish nightly and commit-tagged images for both new runtimes alongside the existing ones.
  • README.md — document the new kinds, images and build/test commands.

nodejs:20 remains the default kind, so existing actions are unaffected.

Testing

Built and tested locally against Docker Engine 29.6.2.

./gradlew :core:nodejs22Action:distDocker
./gradlew :core:nodejs24Action:distDocker
./gradlew :tests:dat:docker:nodejs22docker:distDocker
./gradlew :tests:dat:docker:nodejs24docker:distDocker
./gradlew :tests:test

Node.js versions in the resulting images: v22.23.2 and v24.19.0.

The full suite passes — 332 tests, 0 failures — with the existing Node 18 and 20 suites green alongside the new ones:

Suite Tests Failures
NodeJs18ActionContainerTests 41 0
NodeJs18ConcurrentTests 42 0
NodeJs20ActionContainerTests 41 0
NodeJs20ConcurrentTests 42 0
NodeJs22ActionContainerTests 41 0
NodeJs22ConcurrentTests 42 0
NodeJs24ActionContainerTests 41 0
NodeJs24ConcurrentTests 42 0

That covers the shared BasicActionRunnerTests surface — init/run protocol, initialization failures, application errors, unicode handling, environment variables, large payloads, resolved and rejected promises, webpacked functions, the bundled openwhisk package, and both exports.main and module.exports.main entry points — plus the concurrent-invocation suite.

Notes for reviewers

  • CI on this repository is currently red for reasons unrelated to this PR. apache/openwhisk#5542 replaced the legacy maven Gradle plugin with maven-publish without declaring any publications, so the ./gradlew install step in ci.yaml no longer installs the core artifacts — Gradle abbreviates the unmatched task name to installDist. :tests:compileTestScala then cannot resolve org.apache.openwhisk:openwhisk-common:1.0.1-SNAPSHOT, and every scheduled run since mid-2025 has failed. The local results above were obtained with core pinned to daac7659, the last commit before that change. This is worth fixing separately — it affects every runtime repository.
  • Separately, ActionContainer in the core test utilities reads a container's address via docker inspect --format '{{.NetworkSettings.IPAddress}}'. Docker Engine 29 removed that field, so the call fails with map has no entry for key "IPAddress" and every container test dies right after docker run. {{.NetworkSettings.Networks.bridge.IPAddress}} works. Also worth a separate fix upstream.
  • To expose the new kinds through --kind, a deployment additionally needs them added to the runtimes manifest in apache/openwhisk; that is a separate change. The images are usable immediately via --docker openwhisk/action-nodejs-v22.

The newest runtime published by this repository is Node.js 20. Per the
Node.js release schedule, Node 18 reached end of life in April 2025 and
Node 20 in April 2026, leaving no supported Node.js version to target.

Adds the nodejs:22 and nodejs:24 kinds, producing the action-nodejs-v22
and action-nodejs-v24 images, following the existing nodejs20Action
layout. The runtime sources are not duplicated: they continue to be
copied from core/nodejsActionBase by the existing Gradle copy tasks and
removed again by cleanup, so the only substantive difference from
nodejs20Action is the base image.

- core/nodejs22Action, core/nodejs24Action
- settings.gradle: register the new subprojects and test images
- tests/dat/docker/nodejs22docker, nodejs24docker fixtures
- NodeJs22/NodeJs24 ActionContainerTests and ConcurrentTests
- ci.yaml: publish nightly and commit-tagged images for both
- README: document the new kinds, images and build/test commands

nodejs:20 remains the default kind, so existing actions are unaffected.

Node.js versions in the resulting images: v22.23.2 and v24.19.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant