Unify command output line splitting across executors - #362
Merged
Conversation
paskal
force-pushed
the
executor-unify-output-lines
branch
from
August 19, 2026 18:58
bcfe7b4 to
ce4f337
Compare
Remote.sshRun and Dry.Run dropped every empty line and kept a trailing CR, while Local.Run kept blank lines and trimmed the CR, so the same stdout produced different slices depending on the implementation. All three now share splitOutputLines, moved from local.go to executor.go. Echo skips empty lines when joining the output for the report, so the reported detail stays as it was for remote commands and no longer shows empty segments for local ones. Whitespace-only lines are still reported.
paskal
force-pushed
the
executor-unify-output-lines
branch
from
August 19, 2026 19:01
ce4f337 to
3dbe71a
Compare
umputun
approved these changes
Aug 19, 2026
umputun
added a commit
that referenced
this pull request
Aug 19, 2026
pkg/executor starts docker containers through testcontainers and takes ~94s locally, leaving almost no headroom under the 100s per-package cap. The executor test cases added in #362 pushed it past the limit and master timed out.
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.
Follow-up to #360, where you pointed out that the three
executor.Interfaceimplementations return different line shapes for the same stdout.Remote.sshRunandDry.Runnow use the samesplitOutputLineshelper asLocal.Run, and the helper moves fromlocal.gotoexecutor.gosince all three share it. Any executor now returns the same slice for the same output: interior blank lines kept, a trailing\rdropped, no empty element after the final newline.The consequence you named,
Echojoining with"; "and picking up empty segments, is handled where it belongs.commands.goskips empty lines when building the report, so the echo detail line is unchanged for remote commands; whitespace-only lines are still reported, only empty ones are dropped. That case was already reachable through the local executor before #360, sincebufio.ScanLineskept interior blank lines there too, so the filter fixes it on both paths.Tests:
Remotegains a blank-line and CRLF case,Drya multi-line case, andEchoblank-line and whitespace-only cases.TestSplitOutputLinesmoves next to the helper.If you would rather keep per-executor behaviour, close this and nothing is lost.