apache / apache/openwhisk-wskdeploy

Validate parameter declarations on Trigger are compatible to Action when Rule exists

Open
#558 0 comments 0 reactions 0 assignees View on GitHub
design needed enhancement priority: medium
Dominant language
Go
Stars
75
Forks
73
PR merge metrics
No merged PRs in 30d

Description

If a Rule binds a Trigger to an Action, we should validate that the input parameters (names and types) are compatible with the Action they are being associated with.

1) emit WARNING (i.e., ParameterTypeMismatch) if name matches, but type does not
- NOTE: I thought about making this an ERROR, but the Action may perform type conversion (or treat values as "string"s always).
2) emit a WARNING of name exists on trigger, but not on Action.

For example:
```
actions:
hello_world_triggerrule:
function: src/hello_plus.js
runtime: nodejs
inputs:
name: string
place: string
children: integer
height: float
outputs:
greeting: string
details: string

triggers:
meetPerson:
inputs:
name: string
place: string
children: integer
height: integer

rules:
meetPersonRule:
trigger: meetPerson
action: hello_world_triggerrule
```

would not have a WARNING for type mismatch on the parameter "height".

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.