Skip to content

[BUG] Logs from the agents manager going to stdout in container mode - breaking the TUI #386

@edenreich

Description

@edenreich

Summary

I thought I redirected all the logs to stderr on container mode so the TUI shouldn't be broken.

Apparently some of the logs are still sent to stdout when INFER_LOGGING_CONSOLE_OUTPUT is set to stderr.

Worth noting that when running within a container docker should not be used for the agents, rather instead it should just connect to the agents over the network, and I think there is an attribute in the agents.yaml config that ensures the agents are not being pulled, rather they are just being connected if the cli runs within a container. Please investigate that, maybe we are not using this attribute to prevent pulling and since it's an undefined behavior we start to see the stdout logs in the TUI - we should ensure both scenarios are not happening when running in container.

Steps to Reproduce

  1. Configuring agents
  2. Starting the CLI in container mode: docker run --rm -it ghcr.io/inference-gateway/cli:latest
  3. Seeing the JSON logs of the agents manager in the TUI
  4. TUI breaks

Expected Behavior

When I start the TUI in container mode, I want all logs to be redirected to stderr, so logging system can scrap them in a cloud native way without breaking the TUI and of course without creating log files.

Actual Behavior

There are no log files, which is good.
But the TUI shows the logs and it breaks the TUI - probably some of the logs are still going to stdout and Bubble tea uses stdout for rendering the TUI.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions