apache / apache/openwhisk-wskdeploy

one last input/param not deleted even its deleted from deployment/manifest file

Open
#986 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
75
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Scott Chapman reported that the inputs/params are not deleted while updating action even the inputs are deleted from deployment file, I wrote a simple test case:

manifest.yaml:

```
packages:
default:
actions:
hello:
code: |
function main(params) {
msg = "Hello, " + params.name + " from " + params.place;
console.log(msg)
return { payload: msg };
}
inputs:
name:
type: string
description: name of a person
place:
type: string
description: location of a person
runtime: nodejs:6
```

deployment.yaml:

```
packages:
default:
actions:
hello:
inputs:
name: Amy
place: New York
```

This creates an action with two params.

```
"parameters": [
{
"key": "name",
"value": "Amy"
},
{
"key": "place",
"value": "New York"
}
],
```

After one param is deleted from manifest and deployment, action is updated and now it shows only one input.

```
"parameters": [
{
"key": "name",
"value": "Amy"
}
],
```

After deleting the entire inputs section from manifest and deployment files, action still shows one param associated with it.

```
"parameters": [
{
"key": "name",
"value": "Amy"
}
],
```

@csantanapr @dubee is this by design or a bug? I tried with `wsk` CLI and it shows same behavior.

`wskdeploy` sends body in request:

```
Req Body
{"name":"helloNodejsWithCode","exec":{"kind":"nodejs:6","code":"function main(params) {\n msg = \"Hello, \" + params.name + \" from \" + params.place;\n console.log(msg)\n return { payload: msg };\n}\n"},"publish":false}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.