Repository navigation
fix(filters): remove max_lines cap from helm filter that truncates template output - #1645
Conversation
📊 Automated PR Analysis
SummaryRemoves the Review Checklist
Linked issues: #1626 Analyzed automatically by wshm · This is an automated analysis, not a human review. |
…mplate output The helm filter had `max_lines = 40` which silently truncates output from commands like `helm template` that legitimately produce hundreds of lines of YAML manifests. This caused CI/CD pipelines to apply incomplete sets of manifests (only first ~40 lines). Other filter settings (strip_ansi, strip_lines_matching for blanks and glog warnings, truncate_lines_at for individual line length) provide sufficient output hygiene without capping total line count. Added regression test verifying multi-document YAML output is preserved in full without truncation. Fixes #1626
YOMXXX
left a comment
There was a problem hiding this comment.
Reviewed this against #1626. Removing the global max_lines = 40 cap is the right tradeoff here: helm template output is correctness-sensitive, and silently dropping manifests is worse than keeping more YAML in the output. The filter still strips blank/glog noise and keeps per-line truncation, so this does not remove all output hygiene.
No blocking concerns from my side.
|
Hey, LGTM As a follow-up we should allow using tee and hint features for the toml filters truncations |
Summary
Fixes #1626 —
rtk helm templatesilently truncates output to ~40 lines, dropping remaining Kubernetes manifests.Root Cause
The helm filter in
src/filters/helm.tomlhadmax_lines = 40. This caps ALL helm output at 40 lines. For short commands likehelm statusthis is fine, buthelm templateproduces hundreds of lines of YAML manifests that get silently truncated — no warning, no error, exit code 0.Fix
Remove
max_lines = 40. The filter retains its other output hygiene settings:strip_ansi = true— removes ANSI escape codesstrip_lines_matching— removes blank lines and glog warningstruncate_lines_at = 120— truncates individual long linesThese are sufficient. The
max_linescap is too aggressive for commands with legitimately long output.Testing
Added regression test
"helm template output is not truncated"that verifies multi-document YAML output (6 Kubernetes manifests) is preserved in full.All 1687 tests pass.
cargo fmtandcargo clippyclean.Impact
Without this fix, CI/CD pipelines that pipe
rtk helm templateoutput tokubectl applywould apply an incomplete set of manifests — silently dropping deployments, PVCs, secrets, etc.