feat(operator): add oabctl logs command#856
Conversation
Streams CloudWatch logs from an agent's ECS task. Usage: oabctl logs kiro-01 # show last 100 lines oabctl logs kiro-01 --follow # tail -f style oabctl logs kiro-01 --tail 50 # last 50 lines Automatically finds the running task, resolves log group/stream, and fetches from CloudWatch Logs.
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening reportdone. posted screening comment and moved the project item to `PR-Screening`.GitHub comment: #856 (comment) IntentThis PR adds an FeatFeature work. New operator CLI subcommand for recent/followed ECS CloudWatch logs. Who It ServesDeployers and agent runtime operators. Rewritten PromptAdd Merge PitchUseful operator observability with small diff surface. Main risk is AWS edge-case correctness: task selection, log stream naming, pagination, ordering, and duplicate follow output. Best-Practice ComparisonOpenClaw/Hermes only partially apply. This is not scheduling or durable execution work, but it aligns with first-class operator visibility. It still relies on CloudWatch rather than OpenAB-owned run logs. Implementation OptionsConservative: merge if error handling and minimal coverage are acceptable. Balanced: require mockable AWS boundaries and tests for task discovery, stream resolution, pagination, tailing, and follow tokens. Ambitious: grow this into broader operator observability: logs, status, task metadata, and eventually OpenAB-owned run logs. Comparison TableIncluded in the GitHub comment. RecommendationBalanced path. Keep this PR focused, but require explicit validation of ECS naming assumptions, CloudWatch pagination/follow semantics, and whether |
- service_name: openab-{name} (not oab-{ns}-{name})
- log_group: /ecs/openab (shared, not per-service)
- log_stream: {name}/openab/{task_id}
- cluster default: openab (not default)
Summary
Adds
oabctl logsto stream CloudWatch logs from an agent's running ECS task.Usage
How it works
/ecs/oab-{ns}-{name})--follow: polls every 2s for new eventsFiles
operator/src/logs.rs— log fetching logicoperator/src/main.rs— added Logs subcommandcc @pahud