2019-05-14 09:38:10 UTC - Joel Scheuner: Motivation: I am interested in exploring ways to automatically generate alternative compositions (i.e., deployment variations). *Problem 1*: Using a non-default conductor action runtime `compose --kind nodejs:8` raises: `"error": "Initialization has failed due to: Error: Cannot find module 'redis'\n`. Why does a hello world example fail due to some redis error in a standard nodejs:8 environment (given that Redis is only required for parallel compositions)? What configuration is required to fix this issue? *Problem 2*: How can I create an OpenWhisk action with a different memory size in composer? https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557826690020100 ---- 2019-05-14 09:38:14 UTC - Joel Scheuner: I would like to do somethink like this (i.e., trying to make the memory part working): https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557826694020300 ---- 2019-05-14 09:38:42 UTC - Joel Scheuner: https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557826722020400 ---- 2019-05-14 09:39:38 UTC - Joel Scheuner: Background: I managed to add a `--memory` flag in `bin/deploy.js` (and adapted the `generate` function in `conductor.js` accordingly) to change the memory size of the conductor action. However, the `limits: { memory: 512 }` annotation (c.f. <https://cloud.ibm.com/apidocs/functions#create-or-update-an-action>) didn't work out so far (for both conductor action and regular action). Can you give a hint what is required to support this feature for actions? https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557826778021100 ---- 2019-05-14 12:49:31 UTC - Olivier Tardieu: @Alexander Klimetschek great! right… I forgot we deprecated this syntax. Now you code could even be more compact: `composer.let({ objectPath }), ...` does the same thing in Javascript. +1 : Alexander Klimetschek https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557838171023000 ---- 2019-05-14 12:52:09 UTC - Olivier Tardieu: @Joel Scheuner right… composer today assumes that docker images for the node runtime contain the `redis` module. This is the case of all ibm images, and I believe this was the case of the base OpenWhisk nodejs 6 image. But the community has decided to adopt leaner images going forward (nodejs 8 and beyond). https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557838329025200 ---- 2019-05-14 12:53:55 UTC - Olivier Tardieu: For now, you can either deploy the ibm-functions nodejs 8 image (<https://hub.docker.com/r/ibmfunctions/action-nodejs-v8>) or deploy the composition as a zip action https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557838435026400 ---- 2019-05-14 12:55:47 UTC - Olivier Tardieu: basically use the `--js` flag of composer’s `compose` command to generate the raw javascript code and then package that as zip file with the required modules (see: <https://cloud.ibm.com/docs/openwhisk?topic=cloud-functions-creating-javascript-actions#openwhisk_js_packaged_action>) https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557838547027700 ---- 2019-05-14 12:56:46 UTC - Olivier Tardieu: going forward it makes sense for me to make the redis dependency optional as you suggest, but rereleasing composer will as usual take a few weeks https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557838606028600 ---- 2019-05-14 12:57:22 UTC - Olivier Tardieu: I’ll open a bug to keep track of this https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557838642028800 ---- 2019-05-14 13:00:19 UTC - Olivier Tardieu: Problem 2: hacking the limits parameters at line 37 of the conductor,js works for me to increase the memory limit on the conductor action itself https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557838819030400 ---- 2019-05-14 13:08:24 UTC - Olivier Tardieu: another hack is needed to increase the limit on the composed actions https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557839304031100 ---- 2019-05-14 13:10:28 UTC - Olivier Tardieu: in composer.js line 361: ``` if (exec) composition.action = { exec, limits: { memory: 512 } }``` https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557839428031900 ---- 2019-05-14 13:11:16 UTC - Olivier Tardieu: I can add support for setting memory limits via flags in the medium term https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557839476032700 ---- 2019-05-14 13:12:37 UTC - Olivier Tardieu: FYI my hack at line 37 is: ``` return { name, action: { exec: { kind, code }, annotations, limits: { timeout, memory: 512 } } } ``` https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557839557033300 ---- 2019-05-14 13:13:16 UTC - Olivier Tardieu: I am not sure why your hack does not work, from your description of it, it looks like it should https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557839596034200 ---- 2019-05-14 13:16:20 UTC - Olivier Tardieu: For problem 1 another alternative is to hack conductor.js to remove all references to redis https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557839780034800 ---- 2019-05-14 14:02:40 UTC - Olivier Tardieu: openwhisk-composer 0.11.0 has been released and is available from npm, github, and apache:
Changelog: - Annotate conductor actions with the provide-api-key annotation. - Add --kind and --timeout flags to deploy command. - Add --file and -o flags to compose command. - Update documentation. Download links: - <https://www.npmjs.com/package/openwhisk-composer> - <https://github.com/apache/incubator-openwhisk-composer/releases> - <http://openwhisk.incubator.apache.org/downloads.html> heart : chetanm https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557842560035500 ---- 2019-05-14 14:04:09 UTC - Olivier Tardieu: was published two weeks ago but never announced… https://openwhisk-team.slack.com/archives/C7DJNS37W/p1557842649036200 ----