adobe / aio-cli-plugin-app

Create, Build and Deploy Cloud Native Applications
Apache License 2.0
19 stars 35 forks source link

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

Open joni-jones opened 2 years ago

joni-jones commented 2 years ago

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 <activation_id>
    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.

aiojbot commented 1 year ago

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