openwhisk-wskdeploy icon indicating copy to clipboard operation
openwhisk-wskdeploy copied to clipboard

one last input/param not deleted even its deleted from deployment/manifest file

Open pritidesai opened this issue 5 years ago • 0 comments

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"
        }
    ],

@csantanapr @dubee is this by design or a bug? I tried with wsk CLI and it shows same behavior.

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}

pritidesai avatar Sep 12 '18 21:09 pritidesai