From 5e1ed9aeba2ec08554a988e8dfb663536573007e Mon Sep 17 00:00:00 2001 From: Zack Winter <3457246+zackwintermdb@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:28:37 -0800 Subject: [PATCH] SERVER-96904 Limit PPC build concurrency & enable remote cache (#29032) GitOrigin-RevId: 692fcbd4b57fcaa97d48755bb306a26f584ffff7 --- evergreen/generate_evergreen_bazelrc.sh | 24 +++++++++--------------- site_scons/site_tools/integrate_bazel.py | 6 +++++- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/evergreen/generate_evergreen_bazelrc.sh b/evergreen/generate_evergreen_bazelrc.sh index 181f9cebb11..1a3fe7172ad 100644 --- a/evergreen/generate_evergreen_bazelrc.sh +++ b/evergreen/generate_evergreen_bazelrc.sh @@ -28,19 +28,13 @@ else echo "BAZELISK_HOME=${TMPDIR}/bazelisk_home" >> .bazeliskrc fi -# Setup the EngFlow credentials for Evergreen builds if remote execution is enabled. -source ./evergreen/bazel_RBE_supported.sh +uri="https://spruce.mongodb.com/task/${task_id:?}?execution=${execution:?}" -if bazel_rbe_supported; then - - uri="https://spruce.mongodb.com/task/${task_id:?}?execution=${execution:?}" - - echo "common --tls_client_certificate=./engflow.cert" >> .bazelrc.evergreen - echo "common --tls_client_key=./engflow.key" >> .bazelrc.evergreen - echo "common --bes_keywords=engflow:CiCdPipelineName=${build_variant:?}" >> .bazelrc.evergreen - echo "common --bes_keywords=engflow:CiCdJobName=${task_name:?}" >> .bazelrc.evergreen - echo "common --bes_keywords=engflow:CiCdUri=${uri:?}" >> .bazelrc.evergreen - echo "common --bes_keywords=evg:project=${project:?}" >> .bazelrc.evergreen - echo "common --remote_upload_local_results=True" >> .bazelrc.evergreen - echo "common --workspace_status_command=./evergreen/engflow_workspace_status.sh" >> .bazelrc.evergreen -fi +echo "common --tls_client_certificate=./engflow.cert" >> .bazelrc.evergreen +echo "common --tls_client_key=./engflow.key" >> .bazelrc.evergreen +echo "common --bes_keywords=engflow:CiCdPipelineName=${build_variant:?}" >> .bazelrc.evergreen +echo "common --bes_keywords=engflow:CiCdJobName=${task_name:?}" >> .bazelrc.evergreen +echo "common --bes_keywords=engflow:CiCdUri=${uri:?}" >> .bazelrc.evergreen +echo "common --bes_keywords=evg:project=${project:?}" >> .bazelrc.evergreen +echo "common --remote_upload_local_results=True" >> .bazelrc.evergreen +echo "common --workspace_status_command=./evergreen/engflow_workspace_status.sh" >> .bazelrc.evergreen diff --git a/site_scons/site_tools/integrate_bazel.py b/site_scons/site_tools/integrate_bazel.py index 019996dabf5..df52fac595f 100644 --- a/site_scons/site_tools/integrate_bazel.py +++ b/site_scons/site_tools/integrate_bazel.py @@ -1128,7 +1128,7 @@ def generate(env: SCons.Environment.Environment) -> None: bazel_internal_flags.extend(formatted_options) if normalized_arch not in ["arm64", "amd64"]: - bazel_internal_flags.append("--config=local") + bazel_internal_flags.append("--config=no-remote-exec") elif os.environ.get("USE_NATIVE_TOOLCHAIN"): print("Custom toolchain detected, using --config=local for bazel build.") bazel_internal_flags.append("--config=local") @@ -1137,6 +1137,10 @@ def generate(env: SCons.Environment.Environment) -> None: # s390x systems don't have enough RAM to handle the default job count and will # OOM unless we reduce it. bazel_internal_flags.append("--jobs=3") + elif normalized_arch == "ppc64le": + # ppc64le builds are OOMing with default concurrency, but it's not clear if it's + # an issue with the bazel client itself or in the compiler. + bazel_internal_flags.append("--jobs=32") public_release = False # Disable remote execution for public release builds.