pritidesai commented on issue #269: CreateFolderZip fails at io.Copy(writer, file) URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/269#issuecomment-308226215 As part of the fix to this issue, the actions created should be valid and invokable. There is no point in creating an action which can not be invoked. **How to reproduce:** **Step 1: Clone openwhisk serverless API repo from here:** https://github.com/IBM/openwhisk-serverless-apis.git **Step 2: Create manifest file with:** ``` package: name: cat-get actions: cat-get-action: location: actions/cat-get-action runtime: nodejs:6 inputs: MYSQL_HOSTNAME: $MYSQL_HOSTNAME MYSQL_USERNAME: $MYSQL_USERNAME MYSQL_PASSWORD: $MYSQL_PASSWORD MYSQL_DATABASE: $MYSQL_DATABASE ``` **Step 3: Setup env.** export MYSQL_HOSTNAME=<hostname> export MYSQL_USERNAME=<username> export MYSQL_PASSWORD=<password> export MYSQL_DATABASE=<database> **Step 4: Run npm install** ``` cd openwhisk-serverless-apis/actions/cat-get-action/ npm install ``` **Step 5: Run wskdeploy** $ wskdeploy -p ~/openwhisk-serverless-apis Deploying cat-get-action is successful but its invocation fails with: ``` "Initialization has failed due to: Zipped actions must contain either package.json or index.js at the root." ``` **Running same with wsk CLI works just fine:** **Step 1: Clone openwhisk serverless API repo from here:** ``` git clone https://github.com/IBM/openwhisk-serverless-apis.git cd openwhisk-serverless-apis/actions/cat-get-action npm install zip -rq action.zip * wsk action create cat-get-action --kind nodejs:6 action.zip ok: created action cat-get-action wsk action invoke cat-get-action --blocking "response": { "status": "success", "success": true } ``` ---------------------------------------------------------------- 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: [email protected]
With regards, Apache Git Services
