You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by dg...@apache.org on 2021/08/12 20:24:47 UTC

[openwhisk] branch master updated: remove previously deprecated nodejs:10 and go:1.11 kinds (#5147)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 91e3f28  remove previously deprecated nodejs:10 and go:1.11 kinds (#5147)
91e3f28 is described below

commit 91e3f28cd010d5410a78e6514d630cb1f6b63cee
Author: David Grove <dg...@users.noreply.github.com>
AuthorDate: Thu Aug 12 16:24:32 2021 -0400

    remove previously deprecated nodejs:10 and go:1.11 kinds (#5147)
---
 ansible/files/runtimes.json                        | 45 ++++++++--------------
 .../src/main/resources/apiv1swagger.json           |  3 +-
 docs/actions-go.md                                 | 14 +++----
 docs/actions-nodejs.md                             | 11 +-----
 docs/concurrency.md                                |  2 +-
 .../openwhisk/core/entity/test/SchemaTests.scala   |  2 +-
 .../test/ContainerMessageConsumerTests.scala       |  6 +--
 7 files changed, 30 insertions(+), 53 deletions(-)

diff --git a/ansible/files/runtimes.json b/ansible/files/runtimes.json
index 9045798..b5b2d9e 100644
--- a/ansible/files/runtimes.json
+++ b/ansible/files/runtimes.json
@@ -3,7 +3,7 @@
         "This file describes the different languages (aka. managed action runtimes) supported by the system",
         "as well as blackbox images that support the runtime specification.",
         "Only actions with runtime families / kinds defined here can be created / read / updated / deleted / invoked.",
-        "Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:10').",
+        "Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:14').",
         "Each runtime family needs a default kind (default: true).",
         "When removing or renaming runtime families or runtime kinds from this file, preexisting actions",
         "with the affected kinds can no longer be read / updated / deleted / invoked. In order to remove or rename",
@@ -15,20 +15,6 @@
     "runtimes": {
         "nodejs": [
             {
-                "kind": "nodejs:10",
-                "default": false,
-                "image": {
-                    "prefix": "openwhisk",
-                    "name": "action-nodejs-v10",
-                    "tag": "nightly"
-                },
-                "deprecated": true,
-                "attached": {
-                    "attachmentName": "codefile",
-                    "attachmentType": "text/plain"
-                }
-            },
-            {
                 "kind": "nodejs:12",
                 "default": false,
                 "image": {
@@ -128,6 +114,20 @@
                     "attachmentName": "codefile",
                     "attachmentType": "text/plain"
                 }
+            },
+            {
+                "kind": "swift:5.4",
+                "default": false,
+                "image": {
+                    "prefix": "openwhisk",
+                    "name": "action-swift-v5.4",
+                    "tag": "nightly"
+                },
+                "deprecated": false,
+                "attached": {
+                    "attachmentName": "codefile",
+                    "attachmentType": "text/plain"
+                }
             }
         ],
         "java": [
@@ -209,20 +209,6 @@
         ],
         "go": [
             {
-                "kind": "go:1.11",
-                "default": false,
-                "deprecated": true,
-                "attached": {
-                    "attachmentName": "codefile",
-                    "attachmentType": "text/plain"
-                },
-                "image": {
-                    "prefix": "openwhisk",
-                    "name": "action-golang-v1.11",
-                    "tag": "nightly"
-                }
-            },
-            {
                 "kind": "go:1.15",
                 "default": true,
                 "deprecated": false,
@@ -301,7 +287,6 @@
                 }
             }
         ]
-
     },
     "blackboxes": [
         {
diff --git a/core/controller/src/main/resources/apiv1swagger.json b/core/controller/src/main/resources/apiv1swagger.json
index 217ccf7..162c89c 100644
--- a/core/controller/src/main/resources/apiv1swagger.json
+++ b/core/controller/src/main/resources/apiv1swagger.json
@@ -1996,7 +1996,6 @@
             "blackbox",
             "java:8",
             "java:default",
-            "nodejs:10",
             "nodejs:12",
             "nodejs:14",
             "nodejs:default",
@@ -2008,13 +2007,13 @@
             "python:default",
             "ruby:2.5",
             "ruby:default",
-            "go:1.11",
             "go:1.15",
             "go:default",
             "sequence",
             "swift:4.2",
             "swift:5.1",
             "swift:5.3",
+            "swift:5.4",
             "swift:default",
             "dotnet:2.2",
             "dotnet:3.1",
diff --git a/docs/actions-go.md b/docs/actions-go.md
index ddf7f8b..94c1198 100644
--- a/docs/actions-go.md
+++ b/docs/actions-go.md
@@ -21,7 +21,7 @@
 
 # Creating and Invoking Go Actions
 
-The `action-golang-v1.11` runtime can execute actions written in the Go programming language in OpenWhisk, either as precompiled binary or compiling sources on the fly.
+The `action-golang-v1.15` runtime can execute actions written in the Go programming language in OpenWhisk, either as precompiled binary or compiling sources on the fly.
 
 ## Entry Point
 
@@ -68,7 +68,7 @@ You can also have multiple source files in an action, packages and vendor folder
 
 ## Deployment
 
-The runtime `action-golang-v1.11` accepts:
+The runtime `action-golang-v1.15` accepts:
 
 - executable binaries in Linux ELF executable compiled for the AMD64 architecture
 - zip files containing a binary executable named `exec` at the top level, again a Linux ELF executable compiled for the AMD64 architecture
@@ -113,7 +113,7 @@ When you send the sources, you will have to zip the content of the `src` folder,
 cd src
 zip -r ../hello.zip *
 cd ..
-wsk action create hellozip hello.zip --kind go:1.11
+wsk action create hellozip hello.zip --kind go:1.15
 ```
 
 Check the example [golang-main-package](https://github.com/apache/openwhisk-runtime-go/tree/master/examples/golang-main-package) and the associated `Makefile`.
@@ -166,13 +166,13 @@ If you need to use vendor folder in the main package, you need to create a direc
 
 ## Precompiling Go Sources Offline
 
-Compiling sources on the image can take some time when the images is initialized. You can speed up precompiling the sources using the image `action-golang-v1.11` as an offline compiler. You need `docker` for doing that.
+Compiling sources on the image can take some time when the images is initialized. You can speed up precompiling the sources using the image `action-golang-v1.15` as an offline compiler. You need `docker` for doing that.
 
 The images accepts a `-compile <main>` flag, and expects you provide sources in standard input. It will then compile them, emit the binary in standard output and errors in stderr. The output is always a zip file containing an executable.
 
 If you have a single source maybe in file `main.go`, with a function named `Main` just do this:
 
-`docker run openwhisk/action-golang-v1.11 -compile main <main.go >main.zip`
+`docker run openwhisk/action-golang-v1.15 -compile main <main.go >main.zip`
 
 If you have multiple sources in current directory, even with a subfolder with sources, you can compile it all with:
 
@@ -180,14 +180,14 @@ If you have multiple sources in current directory, even with a subfolder with so
 cd src
 zip -r ../src.zip *
 cd ..
-docker -i run openwhisk/action-golang-v1.11 -compile main <src.zip >exec.zip
+docker -i run openwhisk/action-golang-v1.15 -compile main <src.zip >exec.zip
 ```
 
 Note that the output is always a zip file in  Linux AMD64 format so the executable can be run only inside a Docker Linux container.
 
 Here a `Makefile` is helpful. Check the [examples](https://github.com/apache/openwhisk-runtime-go/tree/master/examples) for a collection of tested Makefiles. The  generated executable is suitable to be deployed in OpenWhisk, so you can do:
 
-`wsk action create my-action exec.zip --kind go:1.11`
+`wsk action create my-action exec.zip --kind go:1.15`
 
 You can also use just the `openwhisk/actionloop` as runtime, it is smaller.
 
diff --git a/docs/actions-nodejs.md b/docs/actions-nodejs.md
index 498d874..5346c93 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:14`, `--kind nodejs:12`, or `--kind nodejs:10`.
+  the Node.js runtime to use by explicitly specifying the parameter `--kind nodejs:14`, or `--kind nodejs:12`.
 
 
 ## Creating asynchronous actions
@@ -459,16 +459,9 @@ wsk action invoke my-action --result --param lines "[\"and now\", \"for somethin
 
 ## Reference
 
-JavaScript actions can be executed in Node.js version 10, 12 or 14.
+JavaScript actions can be executed in Node.js version 12 or 14.
 Currently actions are executed by default in a Node.js version 14 environment.
 
-### Node.js version 10 environment
-The Node.js version 10 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:10' when creating or updating an Action.
-
-The following packages are pre-installed in the Node.js version 10 environment:
-
-- [openwhisk](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 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:12' when creating or updating an Action.
 
diff --git a/docs/concurrency.md b/docs/concurrency.md
index 6874714..9cbeeaa 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:14`, `nodejs:12`, and `nodejs:10`)
+* use a kind that supports concurrency (currently only `nodejs:14`, and `nodejs:12`)
 * 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/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala
index ee25ece..ee5ea2a 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/entity/test/SchemaTests.scala
@@ -493,7 +493,7 @@ class SchemaTests extends FlatSpec with BeforeAndAfter with ExecHelpers with Mat
   it should "initialize exec manifest" in {
     val runtimes = ExecManifest.runtimesManifest
     val kind = runtimes.resolveDefaultRuntime("nodejs:default").get.kind
-    Some(kind) should contain oneOf ("nodejs:10", "nodejs:12", "nodejs:14")
+    Some(kind) should contain oneOf ("nodejs:12", "nodejs:14")
   }
 
   it should "properly deserialize and reserialize JSON" in {
diff --git a/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/ContainerMessageConsumerTests.scala b/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/ContainerMessageConsumerTests.scala
index 89abe7b..1ef1c11 100644
--- a/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/ContainerMessageConsumerTests.scala
+++ b/tests/src/test/scala/org/apache/openwhisk/core/invoker/test/ContainerMessageConsumerTests.scala
@@ -154,7 +154,7 @@ class ContainerMessageConsumerTests
         500,
         sendAckToScheduler(producer))
 
-    val exec = CodeExecAsString(RuntimeManifest("nodejs:10", ImageName("testImage")), "testCode", None)
+    val exec = CodeExecAsString(RuntimeManifest("nodejs:14", ImageName("testImage")), "testCode", None)
     val action =
       WhiskAction(EntityPath("testns"), EntityName("testAction"), exec, limits = ActionLimits(TimeLimit(1.minute)))
     put(entityStore, action)
@@ -209,7 +209,7 @@ class ContainerMessageConsumerTests
         500,
         sendAckToScheduler(ackConsumer.getProducer()))
 
-    val exec = CodeExecAsString(RuntimeManifest("nodejs:10", ImageName("testImage")), "testCode", None)
+    val exec = CodeExecAsString(RuntimeManifest("nodejs:14", ImageName("testImage")), "testCode", None)
     val whiskAction =
       WhiskAction(EntityPath("testns"), EntityName("testAction2"), exec, limits = ActionLimits(TimeLimit(1.minute)))
     val execMetadata =
@@ -285,7 +285,7 @@ class ContainerMessageConsumerTests
         500,
         sendAckToScheduler(producer))
 
-    val exec = CodeExecAsString(RuntimeManifest("nodejs:10", ImageName("testImage")), "testCode", None)
+    val exec = CodeExecAsString(RuntimeManifest("nodejs:14", ImageName("testImage")), "testCode", None)
     val action =
       WhiskAction(
         WarmUp.warmUpAction.namespace.toPath,