-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Only inject metadata for outputs that cannot be reconstructed by skyframe later #16812
Closed
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
coeuvre
changed the title
Don't inject empty tree artifact
Only inject metadata for outputs that cannot be reconstructed by skyframe later
Nov 22, 2022
tjgq
approved these changes
Nov 22, 2022
src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java
Outdated
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/remote/RemoteActionFileSystem.java
Show resolved
Hide resolved
src/main/java/com/google/devtools/build/lib/actions/RemoteFileStatus.java
Show resolved
Hide resolved
This was referenced Nov 23, 2022
coeuvre
added a commit
to coeuvre/bazel
that referenced
this pull request
Nov 29, 2022
…rame later Currently, they are symlinks. For other outputs, let skyframe read action file system to construct the metadata. Before this change, we inject metadata of symlink outputs, tree outputs and file outputs inside `RemoteActionFileSystem#flush()` if these outputs are stored inside the in-memory fs. If the outputs are somehow generated in the local fs, skyframe will read the fs later to construct metadata for them. However, for tree outputs, skyframe always create an empty directory before action execution in the in-memory fs. So inside the `flush`, we always inject metadata for it. It means local tree outputs are ignored. We could update the code to also read local file system when reading tree files, but then the problem is how to construct metadata from file status which is well done by skyframe. So instead of injecting metadata by traversal the filesystem inside `flush`, we just let skyframe to do the job. Fixes bazelbuild#16789. Closes bazelbuild#16812. PiperOrigin-RevId: 491622005 Change-Id: I10434e6856a1b2a207f39e07122a9b646edf518c
ShreeM01
added a commit
that referenced
this pull request
Nov 29, 2022
… by skyf… (#16879) * Update RemoteActionFileSystem to apply permission changes to local files even if remote file exists. Previously, it only applies permission changes to local files when the remote one doesn't exist. It is fine because the call sites only use these method when remote file are missing. However, this isn't true with future changes. PiperOrigin-RevId: 490872822 Change-Id: I7a19d99cd828294cbafa7b5f3fdc368d64e556ec * Fix permission operations for the case of only remote directory. PiperOrigin-RevId: 491280334 Change-Id: I30afef9f069eca8aee4d983664f42b3961e95adf * Only inject metadata for outputs that cannot be reconstructed by skyframe later Currently, they are symlinks. For other outputs, let skyframe read action file system to construct the metadata. Before this change, we inject metadata of symlink outputs, tree outputs and file outputs inside `RemoteActionFileSystem#flush()` if these outputs are stored inside the in-memory fs. If the outputs are somehow generated in the local fs, skyframe will read the fs later to construct metadata for them. However, for tree outputs, skyframe always create an empty directory before action execution in the in-memory fs. So inside the `flush`, we always inject metadata for it. It means local tree outputs are ignored. We could update the code to also read local file system when reading tree files, but then the problem is how to construct metadata from file status which is well done by skyframe. So instead of injecting metadata by traversal the filesystem inside `flush`, we just let skyframe to do the job. Fixes #16789. Closes #16812. PiperOrigin-RevId: 491622005 Change-Id: I10434e6856a1b2a207f39e07122a9b646edf518c Co-authored-by: kshyanashree <109167932+kshyanashree@users.noreply.github.com>
Confirmed that this change fixes the problem observed on rules_js with Bazel 6.0.0rc1 & rc2. aspect-build/rules_js#659 updates rules_js to Thanks for the quick fix @coeuvre ! |
copybara-service bot
pushed a commit
that referenced
this pull request
Jan 18, 2023
This PR solves the problem in a different way that #16475 tries to solve: 1. #16812 allows skyframe read metadata from ActionFS. 2. Use `ActionFileSystem` to check existence of coverage data. 3. Fire event `CoverageReport` in the action after the coverage report is generated and listen to it in `ToplevelArtifactsDownloader` to download the report. Closes #16556. PiperOrigin-RevId: 502854552 Change-Id: I2796baaa962857831ff161423be6dffa6eb73e5c
coeuvre
added a commit
to coeuvre/bazel
that referenced
this pull request
Feb 2, 2023
This PR solves the problem in a different way that bazelbuild#16475 tries to solve: 1. bazelbuild#16812 allows skyframe read metadata from ActionFS. 2. Use `ActionFileSystem` to check existence of coverage data. 3. Fire event `CoverageReport` in the action after the coverage report is generated and listen to it in `ToplevelArtifactsDownloader` to download the report. Closes bazelbuild#16556. PiperOrigin-RevId: 502854552 Change-Id: I2796baaa962857831ff161423be6dffa6eb73e5c
ShreeM01
added a commit
that referenced
this pull request
Feb 7, 2023
* Returns null if filesystem of test outputs is not ActionFS when processing test attempt event. Previously, we assert that the filesystem of test outputs is ActionFS when we are processing test attempt event. However this is not true when the test hits action cache. This CL looses the check to return null. PiperOrigin-RevId: 501023752 Change-Id: I17cbb26e0a2b5fd30cb781818e42172ac672919e * Make `bazel coverage` work with minimal mode This PR solves the problem in a different way that #16475 tries to solve: 1. #16812 allows skyframe read metadata from ActionFS. 2. Use `ActionFileSystem` to check existence of coverage data. 3. Fire event `CoverageReport` in the action after the coverage report is generated and listen to it in `ToplevelArtifactsDownloader` to download the report. Closes #16556. PiperOrigin-RevId: 502854552 Change-Id: I2796baaa962857831ff161423be6dffa6eb73e5c --------- Co-authored-by: kshyanashree <109167932+kshyanashree@users.noreply.github.com>
hvadehra
pushed a commit
that referenced
this pull request
Feb 14, 2023
This PR solves the problem in a different way that #16475 tries to solve: 1. #16812 allows skyframe read metadata from ActionFS. 2. Use `ActionFileSystem` to check existence of coverage data. 3. Fire event `CoverageReport` in the action after the coverage report is generated and listen to it in `ToplevelArtifactsDownloader` to download the report. Closes #16556. PiperOrigin-RevId: 502854552 Change-Id: I2796baaa962857831ff161423be6dffa6eb73e5c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
awaiting-review
PR is awaiting review from an assigned reviewer
team-Remote-Exec
Issues and PRs for the Execution (Remote) team
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.
Currently, they are symlinks.
For other outputs, let skyframe read action file system to construct the metadata.
Before this change, we inject metadata of symlink outputs, tree outputs and file outputs inside
RemoteActionFileSystem#flush()
if these outputs are stored inside the in-memory fs. If the outputs are somehow generated in the local fs, skyframe will read the fs later to construct metadata for them.However, for tree outputs, skyframe always create an empty directory before action execution in the in-memory fs. So inside the
flush
, we always inject metadata for it. It means local tree outputs are ignored. We could update the code to also read local file system when reading tree files, but then the problem is how to construct metadata from file status which is well done by skyframe.So instead of injecting metadata by traversal the filesystem inside
flush
, we just let skyframe to do the job.Fixes #16789.