Merged
Conversation
📝 WalkthroughWalkthroughThe change refactors Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@servers/build/build.go`:
- Around line 770-779: The code trims leading whitespace when logging build
output (in the loop over ss.Logs where lines are processed and passed to
buildLog.write), which destroys indentation for stack traces and formatted
output; replace the call to strings.TrimSpace(line) with a trailing-only trim
(use strings.TrimRight(line, "\r") or equivalent) so you only strip Windows CR
characters but preserve leading spaces before calling buildLog.write.
Build logs from `miren logs --build` were only showing detection phase events, missing all the BuildKit output that's visible during deploy. Root cause: two WithStatusUpdates callbacks were registered, but the second one overwrote the first (it's a simple assignment, not chaining). Combined them into a single callback that both persists logs and sends to the client. Now captures vertex start/complete status, cache hits, and command stdout/stderr including onbuild command output.
842d2f3 to
aed76c9
Compare
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.
Fixes MIR-658
Build logs were only showing the detection phase stuff, but all the
juicy BuildKit output (layer pulls, cache status, command output) that
you see during
miren deploywas missing frommiren logs --build.Turns out we had two
WithStatusUpdatescallbacks - one for persistinglogs, one for streaming to the client - but
WithStatusUpdatesjustoverwrites, it doesn't chain. So the streaming callback was clobbering
the persistence one.
Combined them into a single callback that does both. Now build logs
include everything: layer info, phase markers, cache status, and
importantly the actual command output (like
bun installorgo buildoutput, and onbuild commands).