adobe / adobe/aio-cli-plugin-app

Unable to setup log forwarding for running locally app without having IO Runtime namespace

Open
#563 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
28
Forks
41
Avg merge
1d 2h
Merged PRs (30d)
3

Description

**Describe the bug**

App builder allows running an application completely locally, including IO Runtime actions, by deploying them locally.
This approach assumes, that logs for the actions deployed locally will be available locally as well. However, right now `AIO_runtime_` env vars should be set with "real" namespace even if the app is running completely locally, otherwise, the log forwarding configuration will not work and will show the following error:
```
$ aio app config set log-forwarding
? select log forwarding destination Adobe I/O Runtime
› Error: Could not update log forwarding settings for namespace 'guest': 404 (Not Found). Error: {"code":"DlMXORdeOVjkD2Yv1zoSBmVlYe5GEoXM","error":"The requested resource could not be found."}
```

Also, it's not possible to retrieve logs for actions deployed locally.
```
$ aio rt:activation:logs d12c132988974cc1ac13298897acc1d6
Error: Could not get log forwarding settings for namespace 'guest': 404 (Not Found). Error: {"code":"aXMbU17R8fPRfsQu1OppZRlyVdrhYDoH","error":"The requested resource could not be found."}
```

**To Reproduce**
Steps to reproduce the behavior:
1. Create a new App Builder app
2. Create a simple action in this app
3. Run the application locally `$ aio app run --local`
4. Invoke the created action (the action should be deployed locally)
5. Try to retrieve logs for the latest activation
6. See the following error
```
$ aio rt:activation:logs
Error: Could not get log forwarding settings for namespace 'guest': 404 (Not Found). Error: {"code":"aXMbU17R8fPRfsQu1OppZRlyVdrhYDoH","error":"The requested resource could not be found."}
```

**Expected behavior**
It should be possible to retrieve logs for an App Builder app that is completely running locally without configuring the "real" IO Runtime namespace and providing credentials for it.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the problem with `aio app run --local`, then invoke the local action and run `aio rt:activation:logs ` without a real IO Runtime namespace. Trace the log-forwarding configuration used by these commands; done means local activations expose logs without requiring real-namespace credentials.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.