You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ja...@apache.org on 2019/05/15 09:32:43 UTC

[incubator-openwhisk] branch master updated: Updating runtimes to include new Node.js v12 image. (#4472)

This is an automated email from the ASF dual-hosted git repository.

jamesthomas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 4df3d09  Updating runtimes to include new Node.js v12 image. (#4472)
4df3d09 is described below

commit 4df3d099f0892974a6761dd7412accb662b42158
Author: James Thomas <ja...@jamesthom.as>
AuthorDate: Wed May 15 10:32:32 2019 +0100

    Updating runtimes to include new Node.js v12 image. (#4472)
    
    * Updating runtimes to include new Node.js v12 image.
    
    - Updated runtimes manifest
    - Added API documentation
    - Minor updates to docs
    - Added automated test case
    
    * Fixing accidental default flag for v12
---
 ansible/files/runtimes.json                          | 14 ++++++++++++++
 core/controller/src/main/resources/apiv1swagger.json |  1 +
 docs/actions-nodejs.md                               | 11 +++++++++--
 docs/concurrency.md                                  |  2 +-
 tests/dat/actions/unicode.tests/nodejs-12.txt        |  8 ++++++++
 5 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json
index 4fb5b0d..17b6d24 100644
--- a/ansible/files/runtimes.json
+++ b/ansible/files/runtimes.json
@@ -48,6 +48,20 @@
                         "memory": "256 MB"
                     }
                 ]
+            },
+            {
+                "kind": "nodejs:12",
+                "default": false,
+                "image": {
+                    "prefix": "openwhisk",
+                    "name": "action-nodejs-v12",
+                    "tag": "latest"
+                },
+                "deprecated": false,
+                "attached": {
+                    "attachmentName": "codefile",
+                    "attachmentType": "text/plain"
+                }
             }
         ],
         "python": [
diff --git a/core/controller/src/main/resources/apiv1swagger.json b/core/controller/src/main/resources/apiv1swagger.json
index f006517..0c2b0c9 100644
--- a/core/controller/src/main/resources/apiv1swagger.json
+++ b/core/controller/src/main/resources/apiv1swagger.json
@@ -1894,6 +1894,7 @@
             "nodejs:6",
             "nodejs:8",
             "nodejs:10",
+            "nodejs:12",
             "nodejs:default",
             "php:7.3",
             "php:default",
diff --git a/docs/actions-nodejs.md b/docs/actions-nodejs.md
index 45bf572..5386357 100644
--- a/docs/actions-nodejs.md
+++ b/docs/actions-nodejs.md
@@ -43,7 +43,7 @@ and demonstrate how to bundle multiple JavaScript files and third party dependen
 
   The CLI automatically infers the type of the action by using the source file extension.
   For `.js` source files, the action runs by using a Node.js runtime. You may specify
-  the Node.js runtime to use by explicitly specifying the parameter `--kind nodejs:10`, `--kind nodejs:8`, or `--kind nodejs:6`
+  the Node.js runtime to use by explicitly specifying the parameter `--kind nodejs:12`, `--kind nodejs:10`, `--kind nodejs:8`, or `--kind nodejs:6`
 
 
 ## Creating asynchronous actions
@@ -222,7 +222,7 @@ zip -r action.zip *
 wsk action create packageAction --kind nodejs:10 action.zip
 ```
 
-When creating an action from a `.zip` archive with the CLI tool, you must explicitly provide a value for the `--kind` flag by using `nodejs:10`, `nodejs:8` or `nodejs:6`.
+When creating an action from a `.zip` archive with the CLI tool, you must explicitly provide a value for the `--kind` flag by using `nodejs:12`, `nodejs:10`, `nodejs:8` or `nodejs:6`.
 
 - Invoke the action as normal.
 
@@ -532,3 +532,10 @@ The Node.js version 10.15.2 environment is used if the `--kind` flag is explicit
 The following packages are pre-installed in the Node.js version 10 environment:
 
 - [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
+
+### Node.js version 12 environment
+The Node.js version 12.0.0 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:12' when creating or updating an Action.
+
+The following packages are pre-installed in the Node.js version 12 environment:
+
+- [openwhisk v3.18.0](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.
diff --git a/docs/concurrency.md b/docs/concurrency.md
index 82d29b2..723a86d 100644
--- a/docs/concurrency.md
+++ b/docs/concurrency.md
@@ -29,7 +29,7 @@ Concurrent activation processing within the same action container can be enabled
 
 * enable the akka http client at invoker config
   * e.g. CONFIG_whisk_containerPool_akkaClient=true
-* use a kind that supports concurrency (currently only `nodejs:10`, `nodejs:8` and `nodejs:6`)
+* use a kind that supports concurrency (currently only `nodejs:12`, `nodejs:10`, `nodejs:8` and `nodejs:6`)
 * enable concurrency at runtime container env (nodejs container only allows concurrency when started with an env var __OW_ALLOW_CONCURRENT=true)
   * e.g. CONFIG_whisk_containerFactory_containerArgs_extraArgs_env_0="__OW_ALLOW_CONCURRENT=true"
 * disable log collection at invoker
diff --git a/tests/dat/actions/unicode.tests/nodejs-12.txt b/tests/dat/actions/unicode.tests/nodejs-12.txt
new file mode 100644
index 0000000..4db30ea
--- /dev/null
+++ b/tests/dat/actions/unicode.tests/nodejs-12.txt
@@ -0,0 +1,8 @@
+// Licensed to the Apache Software Foundation (ASF) under one or more contributor
+// license agreements; and to You under the Apache License, Version 2.0.
+
+function main(args) {
+    var str = args.delimiter + " ☃ " + args.delimiter;
+    console.log(str);
+    return { "winter": str };
+}