Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Logs #85

Merged
merged 3 commits into from
Feb 18, 2025
Merged

Build Logs #85

merged 3 commits into from
Feb 18, 2025

Conversation

trey-ivy
Copy link
Collaborator

@trey-ivy trey-ivy commented Feb 12, 2025

This PR adds some functionality to capture build logs from the progress event, store them in the database, and then display them on a tab in the invocations view.

image

Bazel emits logs a screen at a time, so displaying them on a static page doesn't translate perfectly. For instance if you cat the actual log file generated from a bazel build, the output is displayed (very quickly) one screen at a time, and then at the end you get a simple message w/just a few lines of detail.

Screen.Recording.2025-02-12.at.3.19.36.PM.mov

This naive first pass implementation just captures them, strips any empty/blank lines from the output and renders them with a react module that CSS formats ANSI encoded text. Possible future improvements could allow for users to optionally configure the application to either store build logs or ignore them, streaming build logs in real time, and only pulling the logs from the database on tab load.

Tested with some build logs that run into several MBs worth of data. Seems to hold up okay.

@trey-ivy trey-ivy self-assigned this Feb 12, 2025
@trey-ivy trey-ivy requested a review from mortenmj February 12, 2025 21:03
@trey-ivy trey-ivy marked this pull request as draft February 13, 2025 17:03
@trey-ivy
Copy link
Collaborator Author

local testing was fine but when i pushed this to our dev env i started getting some weird infinite loop behavior on the logs tab, probably due to react re-rendering the component, so i'm going to test this a bit more

@trey-ivy trey-ivy marked this pull request as ready for review February 14, 2025 18:16
@trey-ivy trey-ivy merged commit 46d807b into main Feb 18, 2025
2 checks passed
@trey-ivy trey-ivy deleted the feature/build-logs branch February 18, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant