2019-05-15 09:11:43 UTC - Bruno Girin: Hi all, I have an issue upgrading to the latest composer. I used to be on `"@ibm-functions/composer": "tardieu/composer#dynamic"` to use `dynamic` before it was part of the main project. I now upgraded to `"openwhisk-composer": "^0.11.0"` and to do this I changed all my `const composer = require('@ibm-functions/composer')` to `const composer = require('openwhisk-composer')`.
However, when I deploy and try to run functions, I get the following error: `Unexpected token :\n at NodeActionRunner.init (/nodejsAction/runner.js:79:109)` I am deploying by running `compose src/file.js --encode > build/file.js` and deploying everything via `wskdeploy`. Any idea where I should look to find the root cause of this problem? https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557911503040500 ---- 2019-05-15 12:26:19 UTC - Olivier Tardieu: @Bruno Girin I suspect this is due to a syntax change for `composer.dynamic` between the pre-apache and apache releases https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923179041500 ---- 2019-05-15 12:26:47 UTC - Olivier Tardieu: <https://github.com/apache/incubator-openwhisk-composer/blob/master/docs/COMBINATORS.md#dynamic> https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923207041700 ---- 2019-05-15 12:27:09 UTC - Olivier Tardieu: `composer.dynamic` now expects the input object to be a dictionary https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923229042200 ---- 2019-05-15 12:28:39 UTC - Bruno Girin: OK, that's weird because I use `composer.dynamic` in a very limited number of places, none of them are the ones I tested. https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923319043800 ---- 2019-05-15 12:28:46 UTC - Olivier Tardieu: assuming the issue is with the dynamic construct… but it may be a change elsewhere if I understand you correctly https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923326044000 ---- 2019-05-15 12:29:23 UTC - Bruno Girin: I assume it is a change elsewhere as I'm getting the issue with a function that doesn't use dynamic. https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923363044500 ---- 2019-05-15 12:29:29 UTC - Olivier Tardieu: ah https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923369044700 ---- 2019-05-15 12:30:05 UTC - Bruno Girin: I have them all to deploy with `nodejs:8` instead of 6, could that be an issue? https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923405045300 ---- 2019-05-15 12:30:14 UTC - Olivier Tardieu: so it looks like you are still using the old compose command? https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923414045600 ---- 2019-05-15 12:30:23 UTC - Bruno Girin: Yes, is there a new command? https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923423045900 ---- 2019-05-15 12:30:29 UTC - Olivier Tardieu: yes with the new package https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923429046100 ---- 2019-05-15 12:31:02 UTC - Olivier Tardieu: `compose src/file.js --js > build/file.js` https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923462046600 ---- 2019-05-15 12:33:26 UTC - Bruno Girin: OK, cool, I'll try that, thanks! https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923606048200 ---- 2019-05-15 12:34:22 UTC - Olivier Tardieu: the dynamic branch is old… we have made various tweaks to composer since. You will probably need some (minor) changes https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923662049300 ---- 2019-05-15 12:36:25 UTC - Bruno Girin: Yeah that's why I decided to look at it again to make sure I was on a reasonably recent version. https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923785050500 ---- 2019-05-15 12:37:30 UTC - Olivier Tardieu: I think the only backward incompatible change compared to your branch is the composer.dynamic schema that was finalized to something a bit more forward-looking https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923850051700 ---- 2019-05-15 12:37:46 UTC - Olivier Tardieu: but there may be other minor things I am forgetting https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923866052100 ---- 2019-05-15 12:38:07 UTC - Olivier Tardieu: I’ll be curious to know about your experience moving to latest https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923887052600 ---- 2019-05-15 12:38:49 UTC - Bruno Girin: I'll report back! Probably not before Friday now. It might be a good opportunity to improve my set of tests :thinking_face: https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923929053500 ---- 2019-05-15 12:38:58 UTC - Olivier Tardieu: :slightly_smiling_face: https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557923938053700 ---- 2019-05-15 15:47:44 UTC - Joel Scheuner: @Olivier Tardieu Thank you for your hints :+1: Problem 1: I see. I hacked a flag for specifying the container image into `bin/deploy.js` for now to use the ibm-functions image. The `--js` options requires some more automated pipelining but good to know when other dependencies are required. Problem 2: I basically only had to hack this into composer.js line 361 to expose/map (or rather copy) the config params: `if (exec) composition.action = { exec, limits: { memory: exec.memory, timeout: exec.timeout } }` +1 : Olivier Tardieu https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557935264057700 ---- 2019-05-15 15:49:23 UTC - Joel Scheuner: Well, and for problem 1, I probably gonna look into the Redis parallel setup anyways (should be possible to add into `incubator-openwhisk-devtools/docker-compose` for a quick local testing setup) +1 : Olivier Tardieu https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557935363059000 ----