-
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
Tests with "exclusive" tag do not get results from remote cache #3791
Comments
/cc @philwo because I remember there was some discussion because it also drop out of sandbox when we do that. |
Reassigning to @buchgr, because remote execution. |
@buchgr Is there a timeline for fixing this? |
@RNabel yes. should be in 0.29.0 |
yeah it did get rolled back :(. I broke tons of code internally. I ll try to rollforward for the 1.0 release. |
@buchgr any updates on this ticket? |
Yes, unfortunately it got rolled back because it broke many internal tests. I'll need to fix those before I can roll it forward. I don't have the cycles to do this right now. |
This patch is extremely beneficial, any timeline towards getting this merged? |
I unfortunately no longer work on Bazel and won't have the time to fix all the internal tests broken by this change. |
Is there anyone that would be able to pick this up or is it possible for someone external to pick this work up? This would be a really helpful, we currently have to work around this by calling the exclusive tests ourselves after the tests that can be run in parallel. |
Hi, we’ve been using the patch from #8983 for a couple of months now without any issues. What I noticed is that this change enables both sandboxing and caching. Without knowing how the internal tests failed, could it be that you just need to add a |
We would be really interested in getting this into Bazel as well. We have tests that need to run exclusively but we occasionally miss dependencies that would be caught with sandboxing. |
Is there any timelines to get it fixed? If not how about introducing the flag to enable #8983 conditionally, in this case many teams could benefit from exclusive tests caching as well as keep internal tests green. Thoughts? |
Here is a concrete use-case for why this bug is important: In my opinion this bug breaks one of the core features of bazel: targets are being built which do not need to be built because the dependencies did not change. |
After some hours I was able to figure out a workaround for my use case. We have a macro that wraps our test rule which I edited such that when the "exclusive" tag is set for a test instead of just creating that test target normally we actually create two test targets. The first target is tagged The second target is tagged The effect is that for CI we run Note that the purpose of the |
@coeuvre For reference, this was fixed in cl/260916180, but rolled back in cl/261644804. |
This tells Bazel that the test requires 4 CPUs to run. On enormous machines, tests will run in parallel, on laptops tests will run serially or maybe 2 at a time. This strikes a better balance than exclusive tags. It also enables caching of ref tests; there is a known issue that prevents caching for `exclusive` tests: bazelbuild/bazel#3791
Which release contains this flag? |
It should be contained in release 4.0. You can track the release here #12455. |
Hi, I'm trying to fix this but I need to test the change on the downstream projects. From the doc, it seems that the labels |
@gasparev Could you create a separate tracking issue as explained in the docs? You can then ping |
Solves #3791 #16871 bazel-contrib/SIG-rules-authors#40 Steps to do before merging: - [x] Bazel checks green #16868 - [x] Downstream projects green https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/1348 Closes #16867. PiperOrigin-RevId: 493257706 Change-Id: I0f46d092a47a7c08e2436183c9cdc2cd92a0c379
This can be closed after 23580aa |
Description of the problem / feature request / question:
I am trying out the remote cache functionality described here. Currently I'm running against a local hazelcast instance. This works great most of the time. One thing I noticed is that tests with the
exclusive
tag, despite being cached as normal in the local cache, will not seem to use the remote cache and will always rerun if there is no passing result in the local cache. This seems like an oversight?If possible, provide a minimal example to reproduce the problem:
BUILD
test.cc
.bazelrc
Environment info
Operating System:
Ubuntu
Bazel version (output of
bazel info release
):release 0.5.3
Hazelcast version
3.8.6
Anything else, information or logs or outputs that would be helpful?
Here's an example run. The second test will pass in 0.0s if either the
exclusive
tag is removed, or the secondbazel clean
command is omitted.The text was updated successfully, but these errors were encountered: