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/09/12 21:43:49 UTC

[GitHub] pritidesai opened a new issue #986: one last input/param not deleted even its deleted from deployment/manifest file

pritidesai opened a new issue #986: one last input/param not deleted even its deleted from deployment/manifest file
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/issues/986
 
 
   Scott Chapman reported that the inputs/params are not deleted while updating action even the inputs are deleted from deployment file, I wrote a simple test case:
   
   manifest.yaml:
   
   ```
   packages:
     default:
         actions:
           hello:
             code: |
                   function main(params) {
                       msg = "Hello, " + params.name + " from " + params.place;
                       console.log(msg)
                       return { payload:  msg };
                   }
             inputs:
                name:
                  type: string
                  description: name of a person
                place:
                  type: string
                  description: location of a person
             runtime: nodejs:6
   ```
   
   deployment.yaml:
   
   ```
   packages:
     default:
         actions:
           hello:
             inputs:
                name: Amy
                place: New York
   ```
   
   This creates an action with two params.
   
   ```
       "parameters": [
           {
               "key": "name",
               "value": "Amy"
           },
           {
               "key": "place",
               "value": "New York"
           }
       ],
   ```
   
   After one param is deleted from manifest and deployment, action is updated and now it shows only one input.
   
   ```
       "parameters": [
           {
               "key": "name",
               "value": "Amy"
           }
       ],
   ```
   
   After deleting the entire inputs section from manifest and deployment files, action still shows one param associated with it.
   
   
   ```
       "parameters": [
           {
               "key": "name",
               "value": "Amy"
           }
       ],
   ```
   
   `wskdeploy` sends body in request:
   
   ```
   Req Body
   {"name":"helloNodejsWithCode","exec":{"kind":"nodejs:6","code":"function main(params) {\n    msg = \"Hello, \" + params.name + \" from \" + params.place;\n    console.log(msg)\n    return { payload:  msg };\n}\n"},"publish":false}
   ```
   
   

----------------------------------------------------------------
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