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

Fix duplicate worker console output #561

Merged
merged 1 commit into from
Jul 23, 2021

Conversation

Bencodes
Copy link
Collaborator

The ByteArrayOutputStream isn't being reset between worker instances which causes the output to be repeated as workers finish and return their response. This approach has the unfortunate downside of there being the potential for mangled outputs as multiple work requests are running/finishes at the same time.

A thread safe ByteArrayOutputStream would be in order if we want to preserve the logs from being mangled, but it wouldn't prevent cross contamination of outputs between work requests.

Alternatively if we'd like to perfectly preserve the console logs, we'd need to create a ByteArrayOutputStream per work request that can be written to instead of relying on System#out and System#err.

@Bencodes Bencodes changed the title Fix duplicate worker output Fix duplicate worker console output Jul 21, 2021
@restingbull restingbull merged commit 55867f8 into bazelbuild:master Jul 23, 2021
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.

2 participants