You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by "emanuelpinho (via GitHub)" <gi...@apache.org> on 2024/07/24 15:34:08 UTC

[I] Return of Arrays in Node.js Action is not working [openwhisk]

emanuelpinho opened a new issue, #5500:
URL: https://github.com/apache/openwhisk/issues/5500

   ## Environment details:
   
   * Kubernetes tag [4e8562f](https://hub.docker.com/layers/openwhisk/invoker/4e8562f/images/sha256-bb39eaa78362240c99795b70eab311efdf4ad7d8ec5ab0b42d95b65d145ff017?context=explore)
   
   ## Bug description
   
   I am experiencing unexpected behavior when invoking a Node.js action that returns an array with blocking query parameter.
   
   ## Steps to reproduce the issue:
   
   1.   Create the following Node.js function:
   
   ```
   function main(params) {
     return [1,2,3,4];
   }
   
   ```
   2.   Invoke the action using the endpoint:
   
   ```
   <host>:3233/api/v1/namespaces/<namespace>/actions/<action_name>?blocking=true&result=false
   
   ```
   
   ## Provide the expected results and outputs:
   
   - When `blocking=true` and `result=false` (optional since its the default value), the response should include the complete activation, not just the result.
   
   ```
   {
   	"activationId": "d5a794ff47d4464fa794ff47d4f64f4f",
   	"annotations": [...],
   	"duration": 31,
   	"end": 1721835003446,
   	"logs": [],
   	"name": "test-new",
   	"namespace": "ns",
   	"publish": false,
   	"response": {
   		"result": [1,2,3,4],
   		"size": 2,
   		"status": "success",
   		"success": true
   	},
   	"start": 1721835003415,
   	"subject": "bb713d3e-278b-4ba9-bfe0-f534283554cc",
   	"version": "0.0.24"
   }
   ```
   
   ## Provide the actual results and outputs:
   
   - When `blocking=true`, the response is containing just the value.
   
   ```
   [
     1,
     2,
     3,
     4
   ]
   ```
   
   ## Additional information you deem important:
   Issue is happening with last versions of docker images published.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Return of Arrays in Node.js Action does not return error and return invalid response [openwhisk]

Posted by "maurodelazeri (via GitHub)" <gi...@apache.org>.
maurodelazeri commented on issue #5500:
URL: https://github.com/apache/openwhisk/issues/5500#issuecomment-2248337099

   I got the same problem


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org