Repository: bazelbuild/bazel
Issue: bazel_repository_cache_test is very flaky

Latest example:

https://buildkite.com/bazel/google-bazel-presubmit/builds/17442#111594d7-068e-4e24-abaa-d57840e067af

I'll remove this test from the presubmit pipeline since it takes 20 minutes.

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index e39fbeb5e3b034..90b5176d937116 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -24,6 +24,8 @@ platforms:
     - "-//src/test/shell/bazel:bazel_determinism_test"
     # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663
     - "-//src/test/shell/bazel/android:android_ndk_integration_test"
+    # Re-enable once it's no longer flaky: https://github.com/bazelbuild/bazel/issues/7893
+    - "-//src/test/shell/bazel:bazel_repository_cache_test"
   ubuntu1604:
     shell_commands:
     - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
@@ -48,6 +50,8 @@ platforms:
     - "-//src/test/shell/bazel:bazel_determinism_test"
     # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663
     - "-//src/test/shell/bazel/android:android_ndk_integration_test"
+    # Re-enable once it's no longer flaky: https://github.com/bazelbuild/bazel/issues/7893
+    - "-//src/test/shell/bazel:bazel_repository_cache_test"
   ubuntu1804:
     shell_commands:
     - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
@@ -72,6 +76,8 @@ platforms:
     - "-//src/test/shell/bazel:bazel_determinism_test"
     # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663
     - "-//src/test/shell/bazel/android:android_ndk_integration_test"
+    # Re-enable once it's no longer flaky: https://github.com/bazelbuild/bazel/issues/7893
+    - "-//src/test/shell/bazel:bazel_repository_cache_test"
   ubuntu1804_nojava:
     build_flags:
     - "--javabase=@openjdk_linux_archive//:runtime"
@@ -134,6 +140,8 @@ platforms:
     - "-//src/test/shell/integration:stub_finds_runfiles_test"
     - "-//src/test/shell/integration:test_test"
     - "-//src/tools/singlejar:zip64_test"
+    # Re-enable once it's no longer flaky: https://github.com/bazelbuild/bazel/issues/7893
+    - "-//src/test/shell/bazel:bazel_repository_cache_test"
   ubuntu1804_java9:
     shell_commands:
     - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
@@ -158,6 +166,8 @@ platforms:
     - "-//src/test/shell/bazel:bazel_determinism_test"
     # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663
     - "-//src/test/shell/bazel/android:android_ndk_integration_test"
+    # Re-enable once it's no longer flaky: https://github.com/bazelbuild/bazel/issues/7893
+    - "-//src/test/shell/bazel:bazel_repository_cache_test"
   ubuntu1804_java10:
     shell_commands:
     - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
@@ -182,6 +192,8 @@ platforms:
     - "-//src/test/shell/bazel:bazel_determinism_test"
     # Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663
     - "-//src/test/shell/bazel/android:android_ndk_integration_test"
+    # Re-enable once it's no longer flaky: https://github.com/bazelbuild/bazel/issues/7893
+    - "-//src/test/shell/bazel:bazel_repository_cache_test"
   ubuntu1804_java11:
     shell_commands:
     - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
@@ -211,6 +223,8 @@ platforms:
     - "-//src/test/shell/bazel:maven_test"
     # Re-enable once bootstrap works with Java 11
     - "-//src/test/shell/bazel:bazel_bootstrap_distfile_test"
+    # Re-enable once it's no longer flaky: https://github.com/bazelbuild/bazel/issues/7893
+    - "-//src/test/shell/bazel:bazel_repository_cache_test"
   macos:
     shell_commands:
     - sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#


Test patch: