Remote: Fixes an issue when --experimental_remote_cache_async encounter flaky tests. #14220
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.
When
--experimental_remote_cache_async
is set, the uploads happened in the background -- usually after spawn execution.When the test is failed and there is another test attempt, the outputs of previous test attempt are moved to other places immediately after spawn execution. This fine when combining
--experimental_remote_cache_async
because outputs of failed action don't get uploaded.However, there is an exception that
test.xml
is generated with another spawn before the "move" happens. The result of the spawn used to generatetest.xml
is usually "succeed" which means Bazel will attempt uploadtest.xml
even if the test itself is failed.This PR makes the
test.xml
generation spawn ignores remote cache if the test itself is failed.Fixes #14008.