adobe / adobe/aio-cli-plugin-app
`include` target folder named `certs` or `certificates` gives a runtime action error
- Dominant language
- JavaScript
- Stars
- 28
- Forks
- 41
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 3
Description
**Describe the bug**
Are there any reserved names for the target "folder" when using include to configure a runtime action?
We are experiencing the following behavior:
- an include declared as this one works
```yaml
include:
- ["files/*.p12", "secrets/"]
```
but these two (targeting to certs and certificates) cause the action to yield an error when invoked
```yaml
include:
- ["files/*.p12", "certs/"]
```
and
```yaml
include:
- ["files/*.p12", "certificates/"]
```
The error we get when calling aio rt activation get XXXXXX is
```bash
"error": "Initialization has failed due to: Error: Cannot find module '/nodejsAction/47jUsebx'\nRequire stack:\n- /nodejsAction/services/runner.js\n- /nodejsAction/services/service.js\n- /nodejsAction/routes/action.js\n- /nodejsAction/app.js\n- /nodejsAction/server.js\n at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)\n at Function.Module._load (node:internal/modules/cjs/loader:804:27)\n at Module.require (node:internal/modules/cjs/loader:1028:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at eval (eval at (/nodejsAction/services/runner.js:76:49), :1:1)\n at /nodejsAction/services/runner.js:76:49\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"
```
**To Reproduce**
Steps to reproduce the behavior:
1. Configure a `generic` runtime action with an include like this in `app.config.yaml`
```yaml
include:
- ["files/*.p12", "certs/"]
```
2. Run the application with `aio app run`
3. Call the action with `aio rt action invoke xxxxxxxx/generic`
4. Get the invocation result with `aio rt activation get UUID`
5 In the invocation details the following error can be seen:
```
"response": {
"result": {
"error": "Initialization has failed due to: Error: Cannot find module '/nodejsAction/47jUsebx'\nRequire stack:\n- /nodejsAction/services/runner.js\n- /nodejsAction/services/service.js\n- /nodejsAction/routes/action.js\n- /nodejsAction/app.js\n- /nodejsAction/server.js\n at Function.Module._resolveFilename (node:internal/modules/cjs/loader:956:15)\n at Function.Module._load (node:internal/modules/cjs/loader:804:27)\n at Module.require (node:internal/modules/cjs/loader:1028:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at eval (eval at (/nodejsAction/services/runner.js:76:49), :1:1)\n at /nodejsAction/services/runner.js:76:49\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"
},
"size": 765,
"status": "application error",
"success": false
},
```
**Expected behavior**
A successful rt action activation
**Screenshots**
**Desktop (please complete the following information):**
- OS: macOs
- Browser: chrome
- Version
```
> aio --version
@adobe/aio-cli/9.2.0 darwin-arm64 node-v16.18.1
```
**Smartphone (please complete the following information):**
N/A
**Additional context**
Here's a repo [enterprise-integration/client-cert-poc](https://git.corp.adobe.com/enterprise-integration/client-cert-poc) containing
* a working include in `master` and
* a failing include in the `ACSP-44-broken-include` branch
Here's a slack thread with a discussion about this bug: https://magento.slack.com/archives/C013UDBFBGB/p1684146514658789
Contributor guide
Assessment
This issue has not been assessed yet.