-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[7.4.0] Output reuse #23674
Merged
Merged
[7.4.0] Output reuse #23674
Conversation
This file contains 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
…elbuild#23069)" This reverts commit 371fbf6.
This fixes failures such as the following when a spawn, e.g. a reduced Java compilation spawn, doesn't create an optional output: ``` java.io.FileNotFoundException: /private/var/tmp/_bazel_fmeum/507738cfc7e6cde00e4a0230e9aa0722/execroot/_main/bazel-out/_tmp/actions/remote/175.tmp (No such file or directory) at com.google.devtools.build.lib.unix.NativePosixFiles.lstat(Native Method) at com.google.devtools.build.lib.unix.UnixFileSystem.statInternal(UnixFileSystem.java:212) at com.google.devtools.build.lib.unix.UnixFileSystem.stat(UnixFileSystem.java:201) at com.google.devtools.build.lib.vfs.Path.stat(Path.java:290) at com.google.devtools.build.lib.vfs.FileSystemUtils.moveFile(FileSystemUtils.java:456) at com.google.devtools.build.lib.remote.RemoteExecutionService.moveOutputsToFinalLocation(RemoteExecutionService.java:878) ... ``` Also clean up temporary files in case of an exception. Work towards bazelbuild#23288 Closes bazelbuild#23296. PiperOrigin-RevId: 665744936 Change-Id: I89a409c7a6b28b2a5fa532bdb233dca9bc5bde73
When an action may modify a spawn's outputs after execution, the upload of outputs to the cache and reuse for deduplicated actions need to happen synchronously directly after spawn execution to avoid a race. This commit implements this for cache uploads by marking all actions with this property and simply disabling async upload for all spawns executed by such actions. For output reuse, all executions deduplicated against the first one register atomically upon deduplication and cause the cache upload to wait for all of them to complete reuse. Fixes bazelbuild#22501 Fixes bazelbuild#23288 Work towards bazelbuild#21578 Closes bazelbuild#23307 (no longer needed) Closes bazelbuild#23382. PiperOrigin-RevId: 668101364 Change-Id: Ice75dbe14a7dd46e02ecb096d2b2a30940216356
github-actions
bot
added
awaiting-review
PR is awaiting review from an assigned reviewer
team-Configurability
platforms, toolchains, cquery, select(), config transitions
team-Performance
Issues for Performance teams
team-Remote-Exec
Issues and PRs for the Execution (Remote) team
team-Rules-Java
Issues for Java rules
labels
Sep 19, 2024
Closes bazelbuild#23422. PiperOrigin-RevId: 669296792 Change-Id: If3a2519cbf57cc82f1f733900b93705065b37e63
tjgq
approved these changes
Sep 19, 2024
Merged
via the queue into
bazelbuild:release-7.4.0
with commit Sep 19, 2024
d03dca6
50 checks passed
github-actions
bot
removed
the
awaiting-review
PR is awaiting review from an assigned reviewer
label
Sep 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
team-Configurability
platforms, toolchains, cquery, select(), config transitions
team-Performance
Issues for Performance teams
team-Remote-Exec
Issues and PRs for the Execution (Remote) team
team-Rules-Java
Issues for Java rules
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.
Cherry-picks the following changes to implement output reuse:
Fixes #23377
Fixes #23444
Fixes #23457