Don't append the build prefix when a line is being continued from a previous log entry - #40947
Merged
Merged
Conversation
…revious log entry
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes BuildKit progress/log rendering in WSLCSession so the stage/build prefix is not inserted mid-line when a log line is split across multiple JSON log chunks from the same vertex (i.e., when the previous chunk didn’t end with \n).
Changes:
- Extend the
IndentLines()helper to optionally skip prefixing the first line. - Track whether the current log chunk is continuing an unterminated line from the same vertex and suppress the first-line prefix in that case.
Blue (OneBlue)
marked this pull request as ready for review
June 30, 2026 02:04
David Bennett (dkbennett)
approved these changes
Jun 30, 2026
David Bennett (dkbennett)
left a comment
Member
There was a problem hiding this comment.
May want to add an E2E test later for the session logging output validation to ensure it's happening and in the expected format.
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.
Summary of the Pull Request
PR Checklist
This change solves an issue causing the build prefix to be inserted in a middle of a line of a build status is split across two logs entries (which can lead to test failures)
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed