Repository navigation
fix(docker): forward --tail flag in compose logs - #1885
Merged
Merged
Conversation
Previously `rtk docker compose logs --tail=20 web` would fall through to the passthrough handler because clap had no `--tail` field on the `Logs` subcommand, resulting in 0% token savings. Additionally, `run_compose_logs` always fetched 100 lines regardless of user input. - Add `#[arg(long, default_value_t = 100)] tail: u32` to `ComposeCommands::Logs` - Thread the value through to the docker invocation - Default unchanged (100 lines), so bare `rtk docker compose logs` behaves as before Ports the core fix from #580, retargeted onto current develop layout (`src/cmds/cloud/container.rs`). Relates to #578. Co-authored-by: Mihir Dash <[email protected]>
Merged
Fungraphic
pushed a commit
to Fungraphic/rtk
that referenced
this pull request
May 19, 2026
fix(docker): forward --tail flag in compose logs
dieg0reyeresy-stack
approved these changes
May 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
rtk docker compose logs --tail=20 webfalls through to the passthrough handler because clap had no--tailfield on theLogssubcommand → 0% token savings. Additionally,run_compose_logsalways fetched 100 lines regardless of user input.Solution
#[arg(long, default_value_t = 100)] tail: u32toComposeCommands::Logsrtk docker compose logsbehaves as beforeOrigin
Ports the core fix from #580 (by @slice-mihird), retargeted onto current
developlayout (src/cmds/cloud/container.rs). The original PR bundled several unrelated changes and was based on pre-#826 src/ layout, making rebase non-trivial — this PR carries only the--tailfix.Credit preserved via
Co-authored-by.Relates to #578. Will close #580 once merged.
Test plan
cargo fmt --allcargo clippy --all-targets -- -D warnings(clean)cargo test --all(1870 passed)rtk docker compose logs --tail=20 <svc>shows filtered output for 20 lines