Conversation
fmeum
force-pushed
the
deterministic-writer-pipe
branch
2 times, most recently
from
September 18, 2026 16:54
cd70017 to
4b17bd2
Compare
fmeum
marked this pull request as ready for review
September 18, 2026 16:58
rules_java 9.9.0 ships java_tools v21.0, whose JavaBuilder bundles Error Prone 2.50.0 instead of 2.46.0. Error Prone versions before 2.48.0 crash on flexible constructor bodies (JEP 513, final in JDK 25): MustBeClosedChecker throws a ClassCastException for any AutoCloseable subclass whose constructor has statements before super(...). This affects both Bazel's own code and users compiling Java with the default toolchain, so MODULE.tools is updated as well.
RemoteExecutionCache only knew how to upload a VirtualActionInput without materializing it, using a bounded pipe fed from a virtual thread. Move the pipe into DeterministicWriter#getInputStream so that any writer can be streamed the same way and rename the uploader method to uploadDeterministicWriter. The shared pipe also reports a failure in the writer to the reader as an IOException. Previously the failure was swallowed and the reader saw a clean EOF, so a truncated blob was uploaded and rejected by the server. Closing the stream before the end now interrupts a writer that is blocked on a full buffer.
fmeum
force-pushed
the
deterministic-writer-pipe
branch
from
September 18, 2026 19:26
4b17bd2 to
5fde1b5
Compare
VirtualActionInput
Collaborator
Author
|
Stacked on #31208 as it uses a flexible constructor body. |
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.
Description
RemoteExecutionCacheonly supported uploading aVirtualActionInputwithout fully materializing it, using a bounded pipe fed from a virtual thread. This moves the pipe intoDeterministicWriter#getInputStream()so that any writer can be streamed the same way.The shared pipe also reports a failure in the writer to the reader as an
IOException. Previously the failure was swallowed and the reader saw a clean EOF, which could result in a truncated blob being uploaded. Closing the stream before the end now interrupts a writer that is blocked on a full buffer.Motivation
Work towards implementing
--file_write_strategy=remotefor Bazel.Build API Changes
No
Release Notes
RELNOTES: None