aio-cli icon indicating copy to clipboard operation
aio-cli copied to clipboard

aio rt:action:create --config-file not working as expected as is not updating the actions called

Open yrodrigez opened this issue 1 year ago • 0 comments

Expected Behaviour

When creating an action listed in app.config.yaml, for example: myAction.http

And when the Swagger file contains the following configuration:

"/myPath/": {
  "get": {
    "operationId": "myProject/myPackage/myAction.http",
    "responses": {
      "default": {
        "description": "Default response"
      }
    },
    "x-openwhisk": {
      "action": "myAction.http",
      "namespace": "myProject",
      "package": "myPackage",
      "url": "not-used"
    }
  }
}

When deploying the action using app.config.yaml, the API endpoint should be updated accordingly in the REST API configuration based on the latest deployment and Swagger configuration.

Actual Behaviour

  • The deployment does not consistently update the REST API configuration.
  • Sometimes the endpoint is deleted unexpectedly.
  • Other times, the endpoint uses outdated behavior from previous deployments rather than the most recent configuration

Reproduce Scenario (including but not limited to)

  1. Create an action in the app.config.yaml (e.g., myAction.http).
  2. Set up a Swagger file with a corresponding path (e.g., /myPath/) and x-openwhisk configuration pointing to the action.
  3. Deploy the action using aio app deploy (or another deployment method).
  4. Observe the following inconsistencies:
  • API endpoint not updating.
  • Endpoint being removed after deployment.
  • Endpoint using older action behavior despite the updated configuration

Steps to Reproduce

  1. Create an action in the app.config.yaml (e.g., myAction.http).
  2. Set up a Swagger file with a corresponding path (e.g., /myPath/) and x-openwhisk configuration pointing to the action.
  3. Deploy the action using aio app deploy (or another deployment method).
  4. Observe the following inconsistencies:
  • API endpoint not updating.
  • Endpoint being removed after deployment.
  • Endpoint using older action behavior despite the updated configuration

Platform and Version

10.3.1

Sample Code that illustrates the problem

Logs taken while reproducing problem

yrodrigez avatar Oct 24 '24 11:10 yrodrigez