Fix local execution deduplication to work with optional outputs#23296
Closed
fmeum wants to merge 2 commits intobazelbuild:masterfrom
Closed
Fix local execution deduplication to work with optional outputs#23296fmeum wants to merge 2 commits intobazelbuild:masterfrom
fmeum wants to merge 2 commits intobazelbuild:masterfrom
Conversation
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.
tjgq
requested changes
Aug 20, 2024
src/main/java/com/google/devtools/build/lib/remote/RemoteExecutionService.java
Outdated
Show resolved
Hide resolved
tjgq
approved these changes
Aug 20, 2024
Collaborator
Author
|
@bazel-io fork 7.4.0 |
fmeum
added a commit
to fmeum/bazel
that referenced
this pull request
Sep 19, 2024
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
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 19, 2024
Cherry-picks the following changes to implement output reuse: * Deduplicate locally executed path mapped spawns (#22556) * Fix local execution deduplication to work with optional outputs (#23296) * Force synchronous upload and reuse of possibly modified spawn outputs (#23382) * Add support for in-memory outputs to output reuse (#23422) Fixes #23377 Fixes #23444 Fixes #23457
Member
|
The changes in this PR have been included in Bazel 7.4.0 RC1. Please test out the release candidate and report any issues as soon as possible. |
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.
This fixes failures such as the following when a spawn, e.g. a reduced Java compilation spawn, doesn't create an optional output:
Also clean up temporary files in case of an exception.
Work towards #23288