Skip to content

Commit 9a3342c

Browse files
committed
change default nodejs kind from nodejs:10 to nodejs:14
1 parent a201e02 commit 9a3342c

File tree

27 files changed

+119
-119
lines changed

27 files changed

+119
-119
lines changed

ansible/files/runtimes-nodeonly.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"This file describes the different languages (aka. managed action runtimes) supported by the system",
44
"as well as blackbox images that support the runtime specification.",
55
"Only actions with runtime families / kinds defined here can be created / read / updated / deleted / invoked.",
6-
"Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:10').",
6+
"Define a list of runtime families (example: 'nodejs') with at least one kind per family (example: 'nodejs:14').",
77
"Each runtime family needs a default kind (default: true).",
88
"When removing or renaming runtime families or runtime kinds from this file, preexisting actions",
99
"with the affected kinds can no longer be read / updated / deleted / invoked. In order to remove or rename",
@@ -16,11 +16,11 @@
1616
"runtimes": {
1717
"nodejs": [
1818
{
19-
"kind": "nodejs:10",
19+
"kind": "nodejs:14",
2020
"default": true,
2121
"image": {
2222
"prefix": "openwhisk",
23-
"name": "action-nodejs-v10",
23+
"name": "action-nodejs-v14",
2424
"tag": "nightly"
2525
},
2626
"deprecated": false,

ansible/files/runtimes.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"nodejs": [
1717
{
1818
"kind": "nodejs:10",
19-
"default": true,
19+
"default": false,
2020
"image": {
2121
"prefix": "openwhisk",
2222
"name": "action-nodejs-v10",
@@ -26,20 +26,7 @@
2626
"attached": {
2727
"attachmentName": "codefile",
2828
"attachmentType": "text/plain"
29-
},
30-
"stemCells": [
31-
{
32-
"initialCount": 2,
33-
"memory": "256 MB",
34-
"reactive": {
35-
"minCount": 1,
36-
"maxCount": 4,
37-
"ttl": "2 minutes",
38-
"threshold": 1,
39-
"increment": 1
40-
}
41-
}
42-
]
29+
}
4330
},
4431
{
4532
"kind": "nodejs:12",
@@ -57,7 +44,7 @@
5744
},
5845
{
5946
"kind": "nodejs:14",
60-
"default": false,
47+
"default": true,
6148
"image": {
6249
"prefix": "openwhisk",
6350
"name": "action-nodejs-v14",
@@ -67,7 +54,20 @@
6754
"attached": {
6855
"attachmentName": "codefile",
6956
"attachmentType": "text/plain"
70-
}
57+
},
58+
"stemCells": [
59+
{
60+
"initialCount": 2,
61+
"memory": "256 MB",
62+
"reactive": {
63+
"minCount": 1,
64+
"maxCount": 4,
65+
"ttl": "2 minutes",
66+
"threshold": 1,
67+
"increment": 1
68+
}
69+
}
70+
]
7171
}
7272
],
7373
"python": [

core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/KamonRecorderTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class KamonRecorderTests extends KafkaSpecBase with BeforeAndAfterEach with Kamo
6262
val namespaceGuest = "guest"
6363
val actionWithCustomPackage = "apimgmt/createApi"
6464
val actionWithDefaultPackage = "createApi"
65-
val kind = "nodejs:10"
65+
val kind = "nodejs:14"
6666
val memory = 256
6767

6868
it should "push user events to kamon" in {

core/monitoring/user-events/src/test/scala/org/apache/openwhisk/core/monitoring/metrics/PrometheusRecorderTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class PrometheusRecorderTests extends KafkaSpecBase with BeforeAndAfterEach with
3838
val namespaceGuest = "guest"
3939
val actionWithCustomPackage = "apimgmt/createApiOne"
4040
val actionWithDefaultPackage = "createApi"
41-
val kind = "nodejs:10"
41+
val kind = "nodejs:14"
4242
val memory = "256"
4343
createCustomTopic(EventConsumer.userEventTopic)
4444

core/standalone/src/main/scala/org/apache/openwhisk/standalone/StandaloneOpenWhisk.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ object StandaloneOpenWhisk extends SLF4JLogging {
176176
| "runtimes": {
177177
| "nodejs": [
178178
| {
179-
| "kind": "nodejs:10",
179+
| "kind": "nodejs:14",
180180
| "default": true,
181181
| "image": {
182182
| "prefix": "openwhisk",
183-
| "name": "action-nodejs-v10",
183+
| "name": "action-nodejs-v14",
184184
| "tag": "latest"
185185
| },
186186
| "deprecated": false,

docs/actions-new.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ Further, you should automate and pass the following test suites:
6161
Actions when created specify the desired runtime for the function via a property called "kind".
6262
When using the `wsk` CLI, this is specified as `--kind <runtime-kind>`. The value is typically
6363
a string describing the language (e.g., `nodejs`) followed by a colon and the version for the runtime
64-
as in `nodejs:10` or `php:7.4`.
64+
as in `nodejs:14` or `php:7.4`.
6565

6666
The manifest is a map of runtime family names to an array of specific kinds. The details of the
6767
schema are found in the [Exec Manifest](../common/scala/src/main/scala/org/apache/openwhisk/core/entity/ExecManifest.scala).
6868
As an example, the following entry add a new runtime family called `nodejs` with a single kind
69-
`nodejs:10`.
69+
`nodejs:14`.
7070

7171
```json
7272
{
7373
"nodejs": [{
74-
"kind": "nodejs:10",
74+
"kind": "nodejs:14",
7575
"default": true,
7676
"image": {
7777
"prefix": "openwhisk",
78-
"name": "nodejs10action",
78+
"name": "action-nodejs-v10",
7979
"tag": "latest"
8080
}
8181
}]
@@ -113,7 +113,7 @@ new language and added to the [test artifacts directory](../tests/dat/actions/un
113113
with the name `<runtime-kind>.txt` for plain text file or `<runtime-kind>.bin` for a
114114
a binary file. The `<runtime-kind>` must match the value used for `kind` in the corresponding
115115
runtime manifest entry, replacing `:` in the kind with a `-`.
116-
For example, a plain text function for `nodejs:10` becomes `nodejs-10.txt`.
116+
For example, a plain text function for `nodejs:14` becomes `nodejs-14.txt`.
117117

118118
```js
119119
function main(args) {

docs/actions-nodejs.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ zip -r action.zip *
219219
- Create the action from the zip file.
220220

221221
```
222-
wsk action create packageAction --kind nodejs:10 action.zip
222+
wsk action create packageAction --kind nodejs:14 action.zip
223223
```
224224

225-
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`, or `nodejs:10`.
225+
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:14`, or `nodejs:12`.
226226

227227
- Invoke the action as normal.
228228

@@ -268,7 +268,7 @@ zip -r action.zip *
268268
- Create new action with action archive.
269269

270270
```
271-
wsk action create my-action --kind nodejs:10 action.zip
271+
wsk action create my-action --kind nodejs:14 action.zip
272272
```
273273

274274
#### Building custom runtime image
@@ -353,7 +353,7 @@ npx rollup --config
353353
- Create an action using the bundle source file.
354354

355355
```
356-
wsk action create my-action bundle.js --kind nodejs:10
356+
wsk action create my-action bundle.js --kind nodejs:14
357357
```
358358

359359
- Invoke the action as normal. Results should be the same as the example above.
@@ -406,7 +406,7 @@ npx webpack --config webpack.config.js
406406
- Create an action using the bundle source file.
407407

408408
```
409-
wsk action create my-action dist/bundle.js --kind nodejs:10
409+
wsk action create my-action dist/bundle.js --kind nodejs:14
410410
```
411411

412412
- Invoke the action as normal. Results should be the same as the example above.
@@ -447,7 +447,7 @@ npm install parcel-bundler --save-dev
447447
- Create an action using the bundle source file.
448448

449449
```
450-
wsk action create my-action dist/index.js --kind nodejs:10
450+
wsk action create my-action dist/index.js --kind nodejs:14
451451
```
452452

453453
- Invoke the action as normal. Results should be the same as the example above.
@@ -459,8 +459,8 @@ wsk action invoke my-action --result --param lines "[\"and now\", \"for somethin
459459

460460
## Reference
461461

462-
JavaScript actions can be executed in Node.js version 8, 10, 12 or 14.
463-
Currently actions are executed by default in a Node.js version 10 environment.
462+
JavaScript actions can be executed in Node.js version 10, 12 or 14.
463+
Currently actions are executed by default in a Node.js version 14 environment.
464464

465465
### Node.js version 10 environment
466466
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.
@@ -479,6 +479,6 @@ The following packages are pre-installed in the Node.js version 12 environment:
479479
### Node.js version 14 environment
480480
The Node.js version 14 environment is used if the `--kind` flag is explicitly specified with a value of 'nodejs:14' when creating or updating an Action.
481481

482-
The following packages are pre-installed in the Node.js version 12 environment:
482+
The following packages are pre-installed in the Node.js version 14 environment:
483483

484484
- [openwhisk](https://www.npmjs.com/package/openwhisk) - JavaScript client library for the OpenWhisk platform. Provides a wrapper around the OpenWhisk APIs.

tests/dat/actions/echo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.1",
44
"publish": false,
55
"exec": {
6-
"kind": "nodejs:10",
6+
"kind": "nodejs:14",
77
"code": "/**\n * Returns params, or an empty string if no parameter values are provided\n */\nfunction main(params) {\n return params || {};\n}\n\n"
88
},
99
"annotations": [],

tests/dat/actions/word_count.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.1",
44
"publish": false,
55
"exec": {
6-
"kind": "nodejs:10",
6+
"kind": "nodejs:14",
77
"code": "/**\n * word count utility\n */\nfunction main(params) {\n var str = params.payload.toString();\n var words = str.split(\" \");\n var count = words.length;\n console.log(\"The message '\"+str+\"' has\", count, 'words');\n return { count: count };\n}\n"
88
},
99
"annotations": [],

tests/src/test/scala/org/apache/openwhisk/core/admin/WskAdminTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ class WskAdminTests extends TestHelpers with WskActorSystem with Matchers with B
248248
val subject = Subject().asString
249249
try {
250250
// set some limits
251-
wskadmin.cli(Seq("limits", "set", subject, "--allowedKinds", "nodejs:10", "blackbox"))
251+
wskadmin.cli(Seq("limits", "set", subject, "--allowedKinds", "nodejs:14", "blackbox"))
252252
// check correctly set
253253
val lines = wskadmin.cli(Seq("limits", "get", subject)).stdout.linesIterator.toSeq
254254
lines should have size 1
255-
lines(0) should (be("allowedKinds = [u'nodejs:10', u'blackbox']") or be(
256-
"allowedKinds = ['nodejs:10', 'blackbox']"))
255+
lines(0) should (be("allowedKinds = [u'nodejs:14', u'blackbox']") or be(
256+
"allowedKinds = ['nodejs:14', 'blackbox']"))
257257
} finally {
258258
wskadmin.cli(Seq("limits", "delete", subject)).stdout should include("Limits deleted")
259259
}

0 commit comments

Comments
 (0)