Skip to content

remove previously deprecated nodejs:10 and go:1.11 kinds #5147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 15 additions & 30 deletions ansible/files/runtimes.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -14,20 +14,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,
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -208,20 +208,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,
Expand Down Expand Up @@ -301,7 +287,6 @@
}
}
]

},
"blackboxes": [
{
Expand Down
3 changes: 1 addition & 2 deletions core/controller/src/main/resources/apiv1swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -1996,7 +1996,6 @@
"blackbox",
"java:8",
"java:default",
"nodejs:10",
"nodejs:12",
"nodejs:14",
"nodejs:default",
Expand All @@ -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",
Expand Down
14 changes: 7 additions & 7 deletions docs/actions-go.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`.
Expand Down Expand Up @@ -166,28 +166,28 @@ 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:

```
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.

Expand Down
11 changes: 2 additions & 9 deletions docs/actions-nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion docs/concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -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,
Expand Down