apache / apache/openwhisk-wskdeploy
Array value type of bound parameter not supported
- Dominant language
- Go
- Stars
- 75
- Forks
- 73
- PR merge metrics
- No merged PRs in 30d
Description
Currently, when binding a parameter to an action via `wsk action create` supports an array of strings
```
> wsk action update myAction action.js -p param1 '["value1","value2"]'
```
...results in the following invocation...
```
> wsk action invoke myAction --blocking
ok: invoked /guest/myAction with id 6a9fda9843b6403d9fda9843b6703d40
{
"activationId": "6a9fda9843b6403d9fda9843b6703d40",
"name": "myAction",
"response": {
"result": {
"param1": [
"value1",
"value2"
]
},
...
},
...
}
```
However, there is not a way currently to bind a parameter to an action with an array as a value using `wskdeploy`. In attempting both accepted formats within the `manifest.yml` for declaring an array of strings, neither are accepted.
```
inputs:
param1:
- "value1"
- "value2"
```
and
```
inputs:
param1: ["value1","value2"]
```
The error reported by `wskdeploy`:
```
panic: interface conversion: interface {} is []interface {}, not string
```
Ideally this type would be supported as this bound parameter format (array of strings) is currently used by `alarmsWeb/alarmWebAction` [alarmWebAction.js](https://github.com/apache/incubator-openwhisk-package-alarms/blob/master/action/alarmWebAction.js#L25) / [installCatalog.sh#L108](https://github.com/apache/incubator-openwhisk-package-alarms/blob/master/installCatalog.sh#L108)
Contributor guide
Assessment
This issue has not been assessed yet.