Skip to content

Commit

Permalink
Deprecate nodejs:6 and update runtime metadata (#1085)
Browse files Browse the repository at this point in the history
  • Loading branch information
pwplusnick authored and pritidesai committed Jan 10, 2020
1 parent 0e57fb3 commit 8e4a799
Show file tree
Hide file tree
Showing 91 changed files with 178 additions and 178 deletions.
2 changes: 1 addition & 1 deletion deployers/manifestreader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func TestManifestReader_SetActions(t *testing.T) {
err = manifestReader.HandleYaml(manifestParser, manifest, whisk.KeyValue{})
assert.Nil(t, err, fmt.Sprintf(TEST_ERROR_MANIFEST_PARSE_FAILURE, manifestFile))

expectedRuntime := "nodejs:6"
expectedRuntime := "nodejs:default"
expectedImage := "openwhisk/skeleton"

for actionName, action := range deployer.Deployment.Packages["helloworld"].Actions {
Expand Down
18 changes: 9 additions & 9 deletions docs/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ok: got package lib1_package
},
{
"key": "exec",
"value": "nodejs:6"
"value": "nodejs:default"
}
]
},
Expand All @@ -111,7 +111,7 @@ ok: got package lib1_package
},
{
"key": "exec",
"value": "nodejs:6"
"value": "nodejs:default"
}
]
},
Expand All @@ -130,7 +130,7 @@ ok: got package lib1_package
},
{
"key": "exec",
"value": "nodejs:6"
"value": "nodejs:default"
}
]
}
Expand Down Expand Up @@ -187,7 +187,7 @@ packages:
version: 0.0.1
function: lib1_package/lib1_greeting1.js
code: ""
runtime: nodejs:6
runtime: nodejs:default
namespace: your_namespace/lib1_package
credential: ""
exposedUrl: ""
Expand All @@ -197,14 +197,14 @@ packages:
inputs: {}
outputs: {}
annotations:
exec: nodejs:6
exec: nodejs:default
lib1_greeting2:
name: lib1_greeting2
location: ""
version: 0.0.1
function: lib1_package/lib1_greeting2.js
code: ""
runtime: nodejs:6
runtime: nodejs:default
namespace: your_namespace/lib1_package
credential: ""
exposedUrl: ""
Expand All @@ -214,14 +214,14 @@ packages:
inputs: {}
outputs: {}
annotations:
exec: nodejs:6
exec: nodejs:default
lib1_greeting3:
name: lib1_greeting3
location: ""
version: 0.0.1
function: lib1_package/lib1_greeting3.js
code: ""
runtime: nodejs:6
runtime: nodejs:default
namespace: your_namespace/lib1_package
credential: ""
exposedUrl: ""
Expand All @@ -231,7 +231,7 @@ packages:
inputs: {}
outputs: {}
annotations:
exec: nodejs:6
exec: nodejs:default
triggers: {}
feeds: {}
rules: {}
Expand Down
24 changes: 12 additions & 12 deletions docs/sync_projects_between_client_and_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ actions
/guest/ManagedPackage-1/ManagedSequence-2 private sequence
/guest/ManagedPackage-1/ManagedSequence-1 private sequence
/guest/ManagedPackage-2/ManagedSequence-1 private sequence
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-3 private nodejs:6
/guest/ManagedPackage-2/HelloWorld-1 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:default
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:default
/guest/ManagedPackage-1/HelloWorld-3 private nodejs:default
/guest/ManagedPackage-2/HelloWorld-1 private nodejs:default
triggers
/guest/ManagedTrigger-2 private
/guest/ManagedTrigger-1 private
Expand Down Expand Up @@ -128,9 +128,9 @@ packages
actions
/guest/ManagedPackage-1/ManagedSequence-2 private sequence
/guest/ManagedPackage-1/ManagedSequence-1 private sequence
/guest/ManagedPackage-1/HelloWorld-3 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-3 private nodejs:default
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:default
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:default
triggers
/guest/ManagedTrigger-1 private
rules
Expand All @@ -154,9 +154,9 @@ packages
/guest/ManagedPackage-1 private
actions
/guest/ManagedPackage-1/ManagedSequence-1 private sequence
/guest/ManagedPackage-1/HelloWorld-3 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-3 private nodejs:default
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:default
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:default
triggers
/guest/ManagedTrigger-1 private
rules
Expand All @@ -179,8 +179,8 @@ packages
/guest/ManagedPackage-1 private
actions
/guest/ManagedPackage-1/ManagedSequence-1 private sequence
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:6
/guest/ManagedPackage-1/HelloWorld-2 private nodejs:default
/guest/ManagedPackage-1/HelloWorld-1 private nodejs:default
triggers
/guest/ManagedTrigger-1 private
rules
Expand Down
18 changes: 9 additions & 9 deletions docs/wskdeploy_inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ packages:
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
```
Or (Single Line Inputs):
Expand All @@ -91,7 +91,7 @@ packages:
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
```
Whisk deploy creates bindings at the action level with two parameters `name` and `place`:

Expand Down Expand Up @@ -147,7 +147,7 @@ packages:
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
```

Deployment of this kind of manifest file results in following failure as inputs
Expand All @@ -173,7 +173,7 @@ packages:
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
```

Action is created with two bindings `name` and `place` set to `""`:
Expand Down Expand Up @@ -272,7 +272,7 @@ project:
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
```

This is how bindings are created only under action:
Expand Down Expand Up @@ -344,7 +344,7 @@ project:
function main(params) {
return {payload: 'Hello, ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
```

Now, bindings are created under Package:
Expand Down Expand Up @@ -433,7 +433,7 @@ project:
function main(params) {
return {payload: 'Hello, ' + params.message + ' ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
helloWithEvening:
inputs:
message:
Expand All @@ -445,13 +445,13 @@ project:
function main(params) {
return {payload: 'Hello, ' + params.message + ' ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
helloWithNight:
code: |
function main(params) {
return {payload: 'Hello, ' + params.message + ' ' + params.name + ' from ' + params.place};
}
runtime: nodejs:6
runtime: nodejs:default
```

Now, invoking `helloWithMorning` returns `Good Morning` and invoking `helloWithEvening`
Expand Down
4 changes: 2 additions & 2 deletions docs/wskdeploy_interpolation.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ project:
actions:
hello1:
function: $OPENWHISK_FUNCTION_FILE
runtime: nodejs:6
runtime: nodejs:default
hello2:
function: ${OPENWHISK_FUNCTION_FILE}
runtime: nodejs:6
runtime: nodejs:default
hello3:
function: ${OPENWHISK_FUNCTION_PYTHON}.py
hello4:
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
30 changes: 15 additions & 15 deletions parsers/manifest_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ func testUnmarshalTemporaryFile(data []byte, filename string) (p *YAMLParser, m
func TestUnmarshalForHelloNodeJS(t *testing.T) {
testUnmarshalManifestPackageAndActionBasic(t,
"../tests/dat/manifest_hello_nodejs.yaml", // Manifest path
"helloworld", // Package name
1, // # of Actions
"helloNodejs", // Action name
"actions/hello.js", // Function path
"nodejs:6", // "Runtime
"") // "Main" function name
"helloworld", // Package name
1, // # of Actions
"helloNodejs", // Action name
"actions/hello.js", // Function path
"nodejs:default", // "Runtime
"") // "Main" function name
}

// Test 2: validate manifest_parser:Unmarshal() method with a sample manifest in Java
Expand Down Expand Up @@ -254,7 +254,7 @@ func TestUnmarshalForHelloWithParams(t *testing.T) {
1, // # of Actions
TEST_ACTION_NAME, // Action name
"actions/hello-with-params.js", // Function path
"nodejs:6", // "Runtime
"nodejs:default", // "Runtime
"") // "Main" function name

if pkg != nil {
Expand Down Expand Up @@ -310,7 +310,7 @@ func TestParseManifestForMultiLineParams(t *testing.T) {
assert.Equal(t, expectedResult, actualResult, TEST_MSG_ACTION_FUNCTION_PATH_MISMATCH)

// test action's runtime
expectedResult = "nodejs:6"
expectedResult = "nodejs:default"
actualResult = action.Runtime
assert.Equal(t, expectedResult, actualResult, TEST_MSG_ACTION_FUNCTION_RUNTIME_MISMATCH)

Expand Down Expand Up @@ -415,7 +415,7 @@ func TestParseManifestForSingleLineParams(t *testing.T) {
assert.Equal(t, expectedResult, actualResult, TEST_MSG_ACTION_FUNCTION_PATH_MISMATCH)

// test Action runtime
expectedResult = "nodejs:6"
expectedResult = "nodejs:default"
actualResult = action.Runtime
assert.Equal(t, expectedResult, actualResult, TEST_MSG_ACTION_FUNCTION_RUNTIME_MISMATCH)

Expand Down Expand Up @@ -598,13 +598,13 @@ func TestComposeActionsForValidRuntime_ZipAction(t *testing.T) {
actions:
hello:
function: ../tests/src/integration/runtimetests/src/helloworld/helloworld.zip
runtime: nodejs:6`
runtime: nodejs:default`
p, m, tmpfile := testUnmarshalTemporaryFile([]byte(data), "manifest_parser_validate_runtime_")
actions, err := p.ComposeActionsFromAllPackages(m, tmpfile, whisk.KeyValue{}, map[string]PackageInputs{})
assert.Nil(t, err, fmt.Sprintf(TEST_ERROR_COMPOSE_ACTION_FAILURE, tmpfile))
for _, action := range actions {
if action.Action.Name == "hello" {
assert.Equal(t, action.Action.Exec.Kind, "nodejs:6", fmt.Sprintf(TEST_MSG_ACTION_FUNCTION_RUNTIME_MISMATCH))
assert.Equal(t, action.Action.Exec.Kind, "nodejs:default", fmt.Sprintf(TEST_MSG_ACTION_FUNCTION_RUNTIME_MISMATCH))
}

}
Expand Down Expand Up @@ -1274,8 +1274,8 @@ func TestParseManifestForJSONParams(t *testing.T) {
actualResult := action.Function
assert.Equal(t, expectedResult, actualResult, TEST_MSG_ACTION_FUNCTION_PATH_MISMATCH)

// validate runtime of an action to be "nodejs:6"
expectedResult = "nodejs:6"
// validate runtime of an action to be "nodejs:default"
expectedResult = "nodejs:default"
actualResult = action.Runtime
assert.Equal(t, expectedResult, actualResult, TEST_MSG_ACTION_FUNCTION_RUNTIME_MISMATCH)

Expand Down Expand Up @@ -1752,8 +1752,8 @@ func TestUnmarshalForPackages(t *testing.T) {
expectedResult = "actions/hello.js"
actualResult = action.Function
assert.Equal(t, expectedResult, actualResult, "Expected action function "+expectedResult+" but got "+actualResult)
// runtime of an action should be "nodejs:6"
expectedResult = "nodejs:6"
// runtime of an action should be "nodejs:default"
expectedResult = "nodejs:default"
actualResult = action.Runtime
assert.Equal(t, expectedResult, actualResult, "Expected action runtime "+expectedResult+" but got "+actualResult)
} else {
Expand Down
6 changes: 3 additions & 3 deletions runtimes/runtimes.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,13 @@ var RUNTIME_DETAILS = []byte(`{
},
{
"kind": "nodejs:6",
"default": true,
"default": false,
"image": {
"prefix": "openwhisk",
"name": "nodejs6action",
"tag": "latest"
},
"deprecated": false,
"deprecated": true,
"attached": {
"attachmentName": "codefile",
"attachmentType": "text/plain"
Expand All @@ -332,7 +332,7 @@ var RUNTIME_DETAILS = []byte(`{
},
{
"kind": "nodejs:10",
"default": false,
"default": true,
"image": {
"prefix": "openwhisk",
"name": "action-nodejs-v10",
Expand Down
Binary file modified specification/diagrams/OW-Programming-Model-Slides-Slide1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specification/diagrams/OW-Programming-Model-Slides-Slide2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specification/diagrams/OW-Programming-Model-Slides.pptx
Binary file not shown.
Binary file modified specification/html/images/conceptual_manifest_file_creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified specification/html/images/conceptual_programming_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion specification/html/spec_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ These packages may vary by OpenWhisk release; examples of supported runtimes as
|:---|:---|:---|:---|
| nodejs@10 | nodejs:10 | openwhisk/action-nodejs-v8:latest | Latest NodeJS 10 runtime |
| nodejs@8 | nodejs:8 | openwhisk/action-nodejs-v8:latest | Latest NodeJS 8 runtime |
| nodejs@6 | nodejs:6 | openwhisk/nodejs6action:latest | Latest NodeJS 6 runtime |
| nodejs@6 | nodejs:default | openwhisk/nodejs6action:latest | Latest NodeJS 6 runtime |
| java | java | openwhisk/java8action:latest | Latest Java (8) language runtime |
| php, php@7.3 | php:7.3 | openwhisk/action-php-v7.3:latest | Latest PHP (7.3) language runtime |
| php, php@7.2 | php:7.2 | openwhisk/action-php-v7.2:latest | Latest PHP (7.2) language runtime |
Expand Down
2 changes: 1 addition & 1 deletion tests/apps/owbp-cloudant-trigger/manifest-bp.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/apache/openwhisk-wskdeploy/tree/master/tests/apps/owbp-cloudant-trigger",
"runtime": {
"name": "Node.js 6",
"kind": "nodejs:6",
"kind": "nodejs:default",
"type": "node"
},
"categories": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ packages:
actions:
hello1:
function: ${OPENWHISK_FUNCTION_FILE}
runtime: nodejs:6
runtime: nodejs:default
hello2:
function: $OPENWHISK_FUNCTION_FILE
runtime: nodejs:6
runtime: nodejs:default
hello3:
function: ${OPENWHISK_FUNCTION_PYTHON}.py
hello4:
Expand Down
2 changes: 1 addition & 1 deletion tests/dat/manifest_data_unmarshal_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packages:
actions:
helloNodejs:
function: actions/hello.js
runtime: nodejs:6
runtime: nodejs:default
package2:
actions:
helloPython:
Expand Down
2 changes: 1 addition & 1 deletion tests/dat/manifest_hello_nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ packages:
actions:
helloNodejs:
function: actions/hello.js
runtime: nodejs:6
runtime: nodejs:default
2 changes: 1 addition & 1 deletion tests/dat/manifest_hello_nodejs_with_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packages:
actions:
helloWithParams:
function: actions/hello-with-params.js
runtime: nodejs:6
runtime: nodejs:default
inputs:
name: Amy
place: Paris
Loading

0 comments on commit 8e4a799

Please sign in to comment.