-
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
bug: --remote_cache causes test rules for C++ and Java fail even on first run #2560
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.
Description of the problem
As part of implementing a proof of concept of a distributed cache for Bazel builds (see mwitkow/bazel-distcache) it seems that the remote_protocol.proto implementation inside bazel fails to report the correct output of test rules for both Java and C++.
Repro steps
Building and running localcache
localcache
is a proof of concept implementation of the gRPCremote_cache
for bazel.Building (Go >=1.7)
Running (with local caches):
Java rule failures
[grpc-ecosystem/java-grpc-prometheus] is a simple Java project with bazel and tests (note the
.bazelrc
of the project uses legacy test runner and shows errors on console).Checking out:
Running the tests passes without remote_cache:
You need to
bazel --host_jvm_args=-Dbazel.DigestFunction=SHA1 clean
to avoid local test caching.Running tests with remote cache fails, even though the logs of
localcache
show misses meaning that everything was done using a local execution:Please note that the JUnit output says OK, but the bazel rule output says
FAILED
Re-running with cached results:
localcache
indicates hits, and no tests are JUnit-run)stdout
of tests stored in the cache is the same as running locallyC++ rule failures
We'll use the protobuf repo.
Again the tests pass without the
remote-cache
parameter:You need to
bazel --host_jvm_args=-Dbazel.DigestFunction=SHA1 clean
to avoid local test caching.Running tests with remote cache fails, even though the logs of
localcache
show misses meaning that everything was done using a local execution:However:
Re running the tests using the cache (even though they're successfully cached) still returns a failure.
Hypothesis for failure
It is worth noting that the
localcache
doesn't mangle theActionResult
at all, it returns it verbatim. The fact that the builds fail on first remote build, indicate that it is a problem withRemoteActionCache
in general.Maybe it's something to do with not obeying the
return_code
ofActionResult
or maybe thestderr
being present (but empty) mean that the tests fail.Environment info
Operating System: Ubuntu 16.04
Bazel version (output of
bazel info release
):CC
@ola-rozenfeld - author of RemoteCache
@dinowernli - java-grpc-prometheus author and my go-to bazel dude.
The text was updated successfully, but these errors were encountered: