Comments (5)
Hey @joeljeske - thanks for reporting this, and sorry for your experience!
Is it possible that you were hitting the size limit of your configured cache, and artifacts were getting evicted? Our default cache size is 10GB, while bazel-remote's is 100GB (in the example config).
Would love to help get to the bottom of this - is there a an easy repro case you can point to?
In the meantime, you can use BuildBuddy UI with any grpc cache - including bazel-remote.
from buildbuddy.
I had bumped to 100gb in my setup. Also, it was exactly the same number of cache hits (on the same actions) between runs, which doesn't seem like a cache eviction issue. Cache eviction would likely be more random seeming.
I don't have an easy public repo available :(
And yes I did see the use of the UI with any cache and that is what I'm experimenting with. Thanks!
from buildbuddy.
Hey @joeljeske - I've been trying to reproduce this but with the 10+ repos I've tested - the number of cache hits with BuildBuddy and bazel-remote have been identical.
Do you have any info on the type of actions that consistently aren't getting cached? Is it protobuf? Do you have an example from execution log where you're seeing a remote_cache_hit: false
?
Something like this would be incredibly helpful, as I could try to reproduce the behavior with a similar action:
---------------------------------------------------------
command_args: "/bin/bash"
command_args: "-c"
command_args: "source external/bazel_tools/tools/genrule/genrule-setup.sh; cp third_party/zlib/BUILD.tools bazel-out/darwin-fastbuild/bin/third_party/zlib/BUILD.bazel"
environment_variables {
name: "PATH"
value: "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
}
platform {
}
inputs {
path: "external/bazel_tools/tools/genrule/genrule-setup.sh"
digest {
hash: "bed43d0bb00449e82a04fbb6535f490fa5d7ed140b1c3ad2d463d5c295e9e836"
size_bytes: 858
hash_function_name: "SHA-256"
}
}
inputs {
path: "third_party/zlib/BUILD.tools"
digest {
hash: "bc1d8834f25ecd6711c6404a3a81fb5025995bbcc5829407ef481fc86c629d51"
size_bytes: 320
hash_function_name: "SHA-256"
}
}
listed_outputs: "bazel-out/darwin-fastbuild/bin/third_party/zlib/BUILD.bazel"
remotable: true
cacheable: true
progress_message: "Executing genrule //third_party/zlib:embedded_build_file"
mnemonic: "Genrule"
actual_outputs {
path: "bazel-out/darwin-fastbuild/bin/third_party/zlib/BUILD.bazel"
digest {
hash: "bc1d8834f25ecd6711c6404a3a81fb5025995bbcc5829407ef481fc86c629d51"
size_bytes: 320
hash_function_name: "SHA-256"
}
}
runner: "remote cache hit"
remote_cache_hit: true
---------------------------------------------------------
from buildbuddy.
Here is a gist of an example cache miss. https://gist.github.com/joeljeske/52b6a88d25f3658cbcf5277850e41adf
I am able to:
- build a target and mark as upload to cache
- clean
- build same target and still have sandboxed local processes
Moreover, I can perform those steps multiple times and get the exact same execution logs. Then I can swap the remote cache url to bazel-remote (grpc or http), and get cache hits when repeating those steps above. (I have disabled --disk cache for these trials)
from buildbuddy.
Hey @joeljeske - thanks for helping us get to the bottom of this!
We were able to create a rule that pretty closely mapped to the execution log you shared:
rollup_bundle(
name = "react__bundle",
config_file = "rollup.config.js",
entry_point = "@npm//:node_modules/react/index.js",
format = "system",
output_dir = True,
deps = [
"@npm//react",
"@npm//rollup-plugin-commonjs",
"@npm//rollup-plugin-node-resolve",
"@npm//rollup-plugin-replace",
],
)
This uncovered an issue with the way Action Cache results were being validated that affected actions with directory outputs.
We've pushed a fix for this in release v1.2.1.
Really appreciate your help in debugging this issue!
from buildbuddy.
Related Issues (20)
- [CLI] Queries break for some common attributes HOT 2
- [CLI] Several "too many files open" errors for some builds HOT 2
- Actions using ctx.actions.declare_directory() are never cached HOT 2
- Non-root user in buildbuddy-app-onprem HOT 3
- Build Invocation Data not Shareable Across Docker containers even when stored in S3 HOT 4
- Incorrect name and organization when logging in for the first time HOT 5
- Reclient/chromium build support? HOT 1
- BuildBuddy GitHub app: Passes --heap_dump_on_oom HOT 1
- BuildBuddy GitHub app: Container has a version of `ar` without `--output=` flag HOT 2
- `buildbuddy.yaml`: Set default --config HOT 4
- BuildBuddy GitHub app: Submodules HOT 5
- [CLI] `bb login` fails in `git-worktree` linked worktrees. HOT 2
- Show analysis phase errors explicitly HOT 2
- [CLI] bb specific commands don't work when using `.bazelversion` HOT 5
- Feature Request: Show execution log in artifacts tab HOT 3
- Unreadable test result HOT 9
- [CLI] `Gathering metadata for bazel version...` breaks with some `tools/bazel` wrappers HOT 5
- [CLI] `bb login` should be a no-op if the user already has a valid API key HOT 4
- [CLI] `bb login` should say it's going to open a webpage before doing so HOT 2
- [CLI]: bb plugin hardlink does not work in devcontainer's volume HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buildbuddy.