You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/06/30 09:48:07 UTC

[GitHub] trieloff opened a new issue #121: actions.update ignores options.kind.image parameter

trieloff opened a new issue #121: actions.update ignores options.kind.image parameter
URL: https://github.com/apache/incubator-openwhisk-client-js/issues/121
 
 
   As a consequence, `kind: blackbox` actions cannot be created, as the OpenWhisk API rejects the request as malformed.
   
   Example:
   
   ```javascript
         const code = fs.readFile(script, { encoding: 'utf8' }, (err, action) => {
           if (!err) {
             const actionoptions = {
               name, action, params, kind: 'blackbox', exec: { image: argv.docker },
               annotations: {"web-export": true}
             };
             //console.log(actionoptions)
             openwhisk.actions.update(actionoptions).then((result) => {
               console.log(`✅  Action ${result.name} has been created.`);
               const debugresult = result;
               delete debugresult.exec.code;
               console.log(debugresult);
             });
           }
         });
   ```
   
   yields:
   
   ```
   (node:32302) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): OpenWhiskError: PUT https://runtime.adobe.io/api/v1/namespaces/trieloff/actions/git-github-com-adobe-project-helix-git--cli-deploy--example.html?overwrite=true Returned HTTP 400 (Bad Request) --> "The request content was malformed:
   'image' must be a string defined in 'exec' for 'blackbox' actions"
   (node:32302) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
   (node:32302) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): OpenWhiskError: PUT https://runtime.adobe.io/api/v1/namespaces/trieloff/actions/git-github-com-adobe-project-helix-git--cli-deploy--html?overwrite=true Returned HTTP 400 (Bad Request) --> "The request content was malformed:
   'image' must be a string defined in 'exec' for 'blackbox' actions"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services