<#748 feat: add get_logs to remote.Run and remote....
# flyte-github
a
#748 feat: add get_logs to remote.Run and remote.Action Pull request opened by AdilFayyaz Summary: • Adds
get_logs()
to
remote.Run
and
remote.Action
as a programmatic alternative to show_logs(). Instead of rendering to the terminal, it returns an
Iterator[str]
(sync) or
AsyncIterator[str]
(via .aio()), letting callers consume log lines directly in code. • Supports the same parameters as show_logs: attempt, filter_system, show_ts. • Follows the existing syncify async-generator pattern used by Logs.tail. Test plan: •
uv run pytest tests/flyte/remote/test_get_logs.py -v
- 22 unit tests covering: plain string output, filter_system filtering (SYSTEM originator, [flyte] lines), show_ts timestamp prefix, auto-resolved vs explicit attempt, wait-for-logs behavior, empty stream, and Run delegation • Manual smoke test against a live cluster confirms sync iteration, per-action streaming, and async .aio() path all return expected output flyteorg/flyte-sdk