Skip to content

feat: ovos-logs containers subcommand bridging Docker/Podman stdout - #446

Closed
openvoiceos-bot wants to merge 1 commit into
devfrom
feat/docker-container-log-bridge
Closed

openvoiceos-bot wants to merge 1 commit into
devfrom
feat/docker-container-log-bridge

Conversation

@openvoiceos-bot

Copy link
Copy Markdown

🤖 Auto-generated by Claude Sonnet 5 (claude-sonnet-5) via Claude Code — NOT human-reviewed. Verify before acting.

What this does

Implements the Docker/Podman log awareness proposed in #410: on an ovos-docker install with "logs": {"path": "stdout"} there are no host log files, so ovos-logs has nothing to read. This PR makes container stdout look like an ordinary log directory instead of teaching every consumer a second way to receive log lines.

Two pieces:

  • ovos_utils/container_logs.py — discovers running OVOS/HiveMind containers (docker or podman, auto-detected), maps each container name to the same per-category name a file-based install already uses (skills/audio/voice/bus/phal/gui/other), and appends docker logs -f --tail 0 output to shared per-category files. The category mapping is ported from andlo's working reference in ovos-tui-client, confirmed there against a real 26-container install.
  • ovos-logs containers — new subcommand that runs the bridge in the foreground until interrupted, then prints the directory to point other ovos-logs commands at.

Because the bridge writes ordinary .log files named after the existing categories, every existing ovos-logs command (slice, list, show, reduce) and every consumer of get_available_logs works on a container install unchanged — just with -p <dir>.

Verified claims

Claim How it was checked
Category mapping correct 18 new unit tests in test/unittests/test_container_logs.py, all passing
No regression full unit suite: 1034 passed, 1 skipped
CLI registers and help renders smoke run of ovos-logs containers --help in a scratch venv
Bridge subprocess lifecycle unit tests cover start args, shared-file appends, terminate/kill, and dead-process races

Known limits

No docker or podman runs on the machine this was developed on, so the live docker logs -f path itself is covered by the ported reference implementation's track record (tested by andlo against a real 26-container ovos-docker install), not by an executed run here. A reviewer with a container host can confirm with one command: ovos-logs containers, then ovos-logs show -p ~/.cache/ovos_container_logs.

Fixes #410 (implementation half; a separate reply on the issue will close the triage half).

Implements #410: on an ovos-docker install with
"logs": {"path": "stdout"} there are no host log files, so ovos-logs has
nothing to read. New ovos_utils.container_logs module discovers running
OVOS/HiveMind containers (docker or podman), maps each to the same
per-category name a file-based install uses (skills/audio/voice/bus/
phal/gui/other, ported from andlo's tested ovos-tui-client reference),
and appends `docker logs -f --tail 0` output to shared per-category
files so every existing ovos-logs consumer works unchanged.

The new `ovos-logs containers` subcommand runs the bridge in the
foreground until interrupted; point any other ovos-logs command's -p
at the printed directory to read it.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

The results of your automated verification are here! 📜

I've aggregated the results of the automated checks for this PR below.

🏷️ Release Preview

The release candidate is looking strong. 💪

Current: 0.15.0a1Next: 0.16.0a1

Signal Value
Label (none)
PR title feat: ovos-logs containers subcommand bridging Docker/Podman stdout
Bump minor

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 0.16.0a1

Channel Status Note Current Constraint
Stable Too new (must be <0.9.0) ovos-utils>=0.8.1,<0.9.0
Testing Too new (must be <0.8.5) ovos-utils>=0.8.4,<0.8.5
Alpha Compatible ovos-utils>=0.15.0a1

⚖️ License Check

Checking the terms and conditions of your code. 📝

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

🔍 Lint

I've got some results for you! 📝

ruff: issues found — see job log

🔒 Security (pip-audit)

Looking for any weak links in the supply chain. ⛓️

✅ No known vulnerabilities found (47 packages scanned).

📋 Repo Health

A holistic review of the repository's wellbeing. 🧘

✅ All required files present.

Latest Version: 0.15.0a1

ovos_utils/version.py — Version file
README.md — README
LICENSE — License file
pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
CHANGELOG.md — Changelog
ovos_utils/version.py has valid version block markers

📊 Coverage

Ensuring no code path is left in the shadows. 🌑

85.2% total coverage

Files below 80% coverage (5 files)
File Coverage Missing lines
ovos_utils/log_parser.py 46.9% 247
ovos_utils/__init__.py 63.6% 16
ovos_utils/file_utils.py 74.4% 56
ovos_utils/thread_utils.py 76.9% 12
ovos_utils/geolocation.py 78.4% 22

Full report: download the coverage-report artifact.

🔨 Build Tests

Build test complete! Let's see if everything fits together. 🧩

✅ All versions pass

Python Build Install Tests
3.10
3.11
3.12
3.13
3.14

The automation engine never sleeps. 🚂

@JarbasAl JarbasAl closed this Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ovos-logs has no Docker/Podman awareness - a working, tested approach from ovos-tui-client

2 participants