feat: ovos-logs containers subcommand bridging Docker/Podman stdout - #446
openvoiceos-bot wants to merge 1 commit into
Conversation
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>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
The results of your automated verification are here! 📜I've aggregated the results of the automated checks for this PR below. 🏷️ Release PreviewThe release candidate is looking strong. 💪 Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
⚖️ License CheckChecking 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. 🔍 LintI'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 HealthA holistic review of the repository's wellbeing. 🧘 ✅ All required files present. Latest Version: ✅ 📊 CoverageEnsuring no code path is left in the shadows. 🌑 ✅ 85.2% total coverage Files below 80% coverage (5 files)
Full report: download the 🔨 Build TestsBuild test complete! Let's see if everything fits together. 🧩 ✅ All versions pass
The automation engine never sleeps. 🚂 |
What this does
Implements the Docker/Podman log awareness proposed in #410: on an
ovos-dockerinstall with"logs": {"path": "stdout"}there are no host log files, soovos-logshas 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 appendsdocker logs -f --tail 0output to shared per-category files. The category mapping is ported from andlo's working reference inovos-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 otherovos-logscommands at.Because the bridge writes ordinary
.logfiles named after the existing categories, every existingovos-logscommand (slice,list,show,reduce) and every consumer ofget_available_logsworks on a container install unchanged — just with-p <dir>.Verified claims
test/unittests/test_container_logs.py, all passingovos-logs containers --helpin a scratch venvKnown limits
No docker or podman runs on the machine this was developed on, so the live
docker logs -fpath 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, thenovos-logs show -p ~/.cache/ovos_container_logs.Fixes #410 (implementation half; a separate reply on the issue will close the triage half).