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

web actions and web sequences with the same name can be deployed, web action implementation is unreachable

Open shazron opened this issue 1 year ago • 4 comments

Actual

You are able to deploy a web action and web sequence with the same name, and they have the same web url, listed twice. The web url listed is effectively only the web sequence implementation, the web action implementation is unreachable.

Expected

You should not be able to deploy a web action and web sequence with the same name, and the aio-cli should throw an error for this case.

Sample Manifest

runtimeManifest:
  packages:
    mypackage:
      sequences:
        foo:
          actions: bar, baz
          web: true
      actions:
        foo:
          function: actions/foo/index.js
          web: true
        bar:
          function: actions/bar/index.js
          web: true
        baz:
          function: actions/baz/index.js
          web: true

shazron avatar May 06 '24 09:05 shazron

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-2967

aiojbot avatar May 06 '24 10:05 aiojbot

Confirm wsk cli behavior, whether it is different.

shazron avatar May 07 '24 14:05 shazron

wskdeploy has this error:

Error: manifestreader.go [133]: [ERROR_YAML_FILE_FORMAT_ERROR]: File: [manifest.yml]:
==> manifestreader.go [235]: [ERROR_YAML_PARSER_ERROR]: File: [manifest.yml]: Sequence [foo] is already defined as an action under the same package. Actions and sequences can not have same name in a single package.

shazron avatar May 27 '24 06:05 shazron

PR https://github.com/adobe/aio-cli-plugin-app-dev/pull/50 PR https://github.com/adobe/aio-lib-runtime/pull/190 

shazron avatar May 27 '24 07:05 shazron