Update remote_caching_flags() (#1709)
- Also include platform name in caching key on macOS to avoid problems
with Intel chip machines vs M1 machines.
- Disable caching for the new QA machines since they need a GCS-based
cache (which hasn't been set up yet)
Progress towards
https://github.com/bazelbuild/continuous-integration/issues/1708
diff --git a/buildkite/bazelci.py b/buildkite/bazelci.py
index 402e44a..794adb0 100755
--- a/buildkite/bazelci.py
+++ b/buildkite/bazelci.py
@@ -1871,15 +1871,21 @@
# Only enable caching for untrusted and testing builds.
if CLOUD_PROJECT not in ["bazel-untrusted"]:
return []
-
- platform_cache_key = [BUILDKITE_ORG.encode("utf-8")]
- # Whenever the remote cache was known to have been poisoned increase the number below
- platform_cache_key += ["cache-poisoning-20220912".encode("utf-8")]
-
# We don't enable remote caching on the Linux ARM64 machine since it doesn't have access to GCS.
if platform == "ubuntu2004_arm64":
return []
+ # TODO(#1708): remove once caching works on QA machines
+ if platform.endswith("_qa"):
+ return []
+
+ platform_cache_key = [
+ BUILDKITE_ORG.encode("utf-8"),
+ # Whenever the remote cache was known to have been poisoned increase the number below
+ "cache-poisoning-20220912".encode("utf-8"),
+ platform.encode("utf-8"),
+ ]
+
if is_mac():
platform_cache_key += [
# macOS version:
@@ -1891,11 +1897,9 @@
]
# Use a local cache server for our macOS machines.
flags = ["--remote_cache=http://100.107.73.147"]
+
+ # TODO(#1708): Specify flags and server for GCS cache
else:
- platform_cache_key += [
- # Platform name:
- platform.encode("utf-8")
- ]
# Use RBE for caching builds running on GCE.
flags = [
"--google_default_credentials",