`--incompatible_remote_build_event_upload_respect_no_cache` still uploads some `no-cache` outputs
See original GitHub issueDescription of the bug:
Some test target outputs are still uploaded to the cache even when --incompatible_remote_build_event_upload_respect_no_cache
and --modify_execution_info='.*=+no-remote'
are set. rules_apple tests upload the binary and the zip, and swift_test
has the runner uploaded (which it shouldn’t), but not the binary…
What’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
The following will repro the bug:
git clone https://github.com/buildbuddy-io/rules_xcodeproj.git
cd rules_xcodeproj
# Modify `examples/command_line/Tests/SwiftGreetingsTests.swift` adding something like
# `public let cache = "123"` and changing as needed to produce a new end output
bazel build --config=cache --modify_execution_info='.*=+no-remote' //examples/command_line/Tests:LibSwiftTests
Resulting in bytestream/upload for the test outputs:
"importantOutput": [
{
"name": "examples/command_line/Tests/LibSwiftTests",
"uri": "bytestream://remote.buildbuddy.io/blobs/593de6d72a4f278017c499cffe5cee734144740cffdc7a4cbea2b69eb2d712de/7289",
"pathPrefix": [
"bazel-out",
"darwin_arm64-fastbuild",
"bin"
]
},
{
"name": "examples/command_line/Tests/LibSwiftTests.zip",
"uri": "bytestream://remote.buildbuddy.io/blobs/a1f751591b0fb98ddd985dbf5bd957e59dd76b5c5ce61ccb7bd6030a400da02d/119243",
"pathPrefix": [
"bazel-out",
"applebin_macos-darwin_arm64-fastbuild-ST-3a19c795fefb",
"bin"
]
}
]
The following will somewhat repro the bug:
# Modify `tools/generator/test/AddTargetsTests.swift` adding something like
# `public let cache = "123"` and changing as needed to produce a new end output
bazel build --config=cache --modify_execution_info='.*=+no-remote' //tools/generator/test:tests
Resulting in bytestream/upload for the test runner, but not the binary:
"importantOutput": [
{
"name": "tools/generator/test/tests.test-runner.sh",
"uri": "bytestream://remote.buildbuddy.io/blobs/c4af21acfc33711fe544144629937d18dbd29aff5add8f946907fcf04c72ee21/2278",
"pathPrefix": [
"bazel-out",
"darwin_arm64-fastbuild",
"bin"
]
},
{
"name": "tools/generator/test/tests.xctest/Contents/MacOS/tests",
"uri": "file:///Users/brentley/Developer/rules_xcodeproj/bazel-output-base/execroot/com_github_buildbuddy_io_rules_xcodeproj/bazel-out/darwin_arm64-fastbuild/bin/tools/generator/test/tests.xctest/Contents/MacOS/tests",
"pathPrefix": [
"bazel-out",
"darwin_arm64-fastbuild",
"bin"
]
}
]
Which operating system are you running Bazel on?
macOS 12.4
What is the output of bazel info release
?
release 5.3.0
If bazel info release
returns development version
or (@non-git)
, tell us how you built Bazel.
No response
What’s the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD
?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
Build event uploader is not robust to upload failures and does ...
Uploading outputs of no-cache actions should be valid for BEP uploader. However, I do understand there are cases where we don't want some...
Read more >Bazel's Remote Caching and Remote Execution Explained
When using an external cache, Bazel will augment it's output base with the action cache (AC) and content-addressable storage (CAS) of the ...
Read more >Build Cache - Gradle User Manual
The Gradle build cache is a cache mechanism that aims to save time by reusing outputs produced by other builds. The build cache...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
SGTM. we can try to make this into
6.0
and if everything works well we can removeexperimental_
prefix and flip tominimal
in the next major release.Seems that when an action fails, the stderr will be found under a path something like
bazel-out/_tmp/actions/stderr-5
. I think it would make sense to upload those too.