-
Notifications
You must be signed in to change notification settings - Fork 748
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support non-string types in trigger parameter sources #1236
Comments
Will add it in v1.5 |
I have a similar use case where replacing an array and object is needed for a more generic trigger template. with a message body like this. I'd like to replace and array or object in a k8s template.
I'm curious about the complexity of a solution that would support more complex data structures in templates. |
…not allow templating integer data types, see argoproj/argo-events#1236 Signed-off-by: reinvantveer <[email protected]>
…not allow templating integer data types, see argoproj/argo-events#1236 Signed-off-by: reinvantveer <[email protected]>
Any updates on this? |
@whynowy I've been taking a look at this issue this week and started making changes. A couple questions I was hoping you'd have some thoughts on:
|
@AalokAhluwalia - You are right, only numbers and booleans have problems right now, but I more prefer your first idea, to have a |
That's what I thought too. The boolean field does seem simpler and will work. One problem with specifying the type in the yaml is the case when there's a mismatch between event type and yaml type. |
🙌 |
Signed-off-by: Aalok <[email protected]>
) Signed-off-by: Aalok <[email protected]>
Is your feature request related to a problem? Please describe.
If a destination field is not a string (ex: k8s Deployment replicas), then k8s trigger operations will fail.
The issue seems to be that https://github.com/argoproj/argo-events/blob/master/sensors/triggers/params.go#L236 getValueByKey(...) returns a string
Example
Use a service account that can create Deployments
send the following event
You'll see the following error in the sensor logs
Describe the solution you'd like
Add an optional dataType field (defaulting to string) to the src to help resolve the parameters to a particular type supported by gjson.
Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.
The text was updated successfully, but these errors were encountered: