Closed ccesario closed 4 years ago
Looking into it....
Hi @kersten1 Do you have any news about it!?
regards,
@ccesario do you see the same behavior when you invoke the action directly?
Hi @davetropeano, No, this issue only happen when I link function to trigger. When I invoke the function manually with correct json params it run as expected.
Regards
Hi folks, Any news about this!?
regards,
@davetropeano - did you find anything out?
Only to report, this issue still happing, I just tested it today
We've moved the issue to the Functions UI GHE: https://github.ibm.com/BlueMix-Fabric/Bluemix-Whisk-UI/issues/3630.
@ccesario we lost a thread here so apologies. Development is looking into this but in parallel last week I tried to duplicate your issue and could not replicate the problem at all.
My guess is that you must have had embedded newlines in your strings. This can easily happen in *nix environments with copy/paste to command line. I had no problem creating a function action with default params and passed in params, then a trigger with default params, then a rule connecting the two. In no case were embedded newlines appearing. I suggest going through https://cloud.ibm.com/docs/openwhisk?topic=cloud-functions-triggers.
@ccesario we lost a thread here so apologies. Development is looking into this but in parallel last week I tried to duplicate your issue and could not replicate the problem at all.
My guess is that you must have had embedded newlines in your strings. This can easily happen in *nix environments with copy/paste to command line. I had no problem creating a function action with default params and passed in params, then a trigger with default params, then a rule connecting the two. In no case were embedded newlines appearing. I suggest going through https://cloud.ibm.com/docs/openwhisk?topic=cloud-functions-triggers.
Hello @davetropeano, Thanks by your reply.
But I believe that the problem is not by end user side. In my tests, I typed the json content, not copied/paste. And when I saved the Periodic Trigger and ran the query by command line I saw the content that I paste in this ticket. I asked to other user reproduce it in him account and the same result it was generated. Indeed even the user Copy and Paste I believe that server Side would care the code to prevent this kind of issue :)
Lets wait your Development team check it. Best regards
Hi all, I can confirm that there is a difference in how the payload is being saved when creating it from UI vs. CLI as described by @ccesario:
Created via UI:
"payload": {
"payload": "{ \n \"message\": \"Odin\"\n}" < --------- **This content is wrong**
}
Created via CLI:
"payload": {
"message": "Odin" <--------- *This works as expected*
}
I think that we should to align this behavior in the UI to be the same as in CLI. We are working on a fix for that problem.
Hi @sandrarapp, Nice to know that you could reproduce it. if possible, let us know when fixed it.
Regards Carlos
@sandrarapp is this issue opened elsewhere so I can close here?
Thanks!
Hi, I would like to report a possible BUG with Functions, specific in Triggers. It seems when Trigger is created by web GUI, the Actions does not load the payload content as expected. But when the trigger is created by IBMCloud CLI, the Action load the Trigger payload content as expected.
Trying debug this, it seems that when the Trigger is created by WEB GUI the payload content is saved escaped, look this
Part of result
When the Trigger is created by CLI
# ibmcloud fn trigger create TestePHP3 --feed /whisk.system/alarms/alarm --param cron "*/2 * * * *" --param trigger_payload "{\"message\":\"Odin\"}"