From 72e3e00caf544633befc074774e6e77f4d393523 Mon Sep 17 00:00:00 2001 From: Zack Winter <3457246+zackwintermdb@users.noreply.github.com> Date: Mon, 8 Dec 2025 12:01:52 -0800 Subject: [PATCH] SERVER-114982: Enable compressed bazel exec log by default (#44882) GitOrigin-RevId: 236dd7dea0e0876bf5dcec82cb64c8e83c617d65 --- .bazelignore | 1 + .bazelrc | 7 +++++++ .github/CODEOWNERS | 1 + .gitignore | 2 ++ .tmp/_placeholder_ | 0 OWNERS.yml | 3 +++ .../tasks/compile_tasks_shared.yml | 1 + tools/bazel | 3 +++ tools/bazel.bat | 5 ++++- 9 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .tmp/_placeholder_ diff --git a/.bazelignore b/.bazelignore index 775cd42a47a..c9763483539 100644 --- a/.bazelignore +++ b/.bazelignore @@ -25,3 +25,4 @@ python3-venv venv .ijwb +.git diff --git a/.bazelrc b/.bazelrc index 0c82727ba52..c6b618d3ac5 100644 --- a/.bazelrc +++ b/.bazelrc @@ -582,6 +582,10 @@ common --experimental_repository_downloader_retries=3 # Place golden test output files where buildscripts/golden_tests.py can find them common --test_env=GOLDEN_TEST_CONFIG_PATH +# Upload build events to EngFlow +common --experimental_build_event_upload_strategy=remote + + # TODO(WT-12780): delete this once wiredtiger switches to /.bazelrc.evergreen. try-import %workspace%/.bazelrc.evergreen_engflow_creds @@ -605,3 +609,6 @@ try-import %workspace%/.bazelrc.bazelisk # Flags synced from Flag Sync try-import %workspace%/.bazelrc.sync + +# Repository root absolute path to set --execution_log_compact_file +try-import %workspace%/.bazelrc.exec_log_file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d9314498301..0df6f91ae42 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -36,6 +36,7 @@ README.third_party.md @10gen/code-review-team-ssdlc @svc-auto-approve-bot sbom.json @10gen/code-review-team-ssdlc @svc-auto-approve-bot MODULE.bazel* @10gen/devprod-build @svc-auto-approve-bot WORKSPACE.bazel @10gen/devprod-build @svc-auto-approve-bot +.tmp/* @10gen/devprod-build @svc-auto-approve-bot # The following patterns are parsed from ./.cursor/rules/OWNERS.yml /.cursor/rules/**/cs-* @10gen/server-cluster-scalability @svc-auto-approve-bot diff --git a/.gitignore b/.gitignore index 4d95029ff61..b744ddc79b8 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ /merged_decls.json /modules_dump.yaml /.tmp +!/.tmp/_placeholder_ venv *~ @@ -304,6 +305,7 @@ buildozer .compiledb .bazelrc.xcode .bazelrc.bazelisk +.bazelrc.exec_log_file *.bazel_info_for_ninja.txt .ninja_last_command_line_targets.txt bazel/coverity/analysis/BUILD.bazel diff --git a/.tmp/_placeholder_ b/.tmp/_placeholder_ new file mode 100644 index 00000000000..e69de29bb2d diff --git a/OWNERS.yml b/OWNERS.yml index 8579f9f66d3..14cb11c3565 100644 --- a/OWNERS.yml +++ b/OWNERS.yml @@ -101,3 +101,6 @@ filters: - "WORKSPACE.bazel": approvers: - 10gen/devprod-build + - ".tmp/*": + approvers: + - 10gen/devprod-build diff --git a/etc/evergreen_yml_components/tasks/compile_tasks_shared.yml b/etc/evergreen_yml_components/tasks/compile_tasks_shared.yml index 4b427ccbd55..6258ff85e77 100644 --- a/etc/evergreen_yml_components/tasks/compile_tasks_shared.yml +++ b/etc/evergreen_yml_components/tasks/compile_tasks_shared.yml @@ -268,6 +268,7 @@ tasks: "src/src/third_party/mock_ocsp_responder/**" "src/src/third_party/protobuf/**" "src/src/third_party/schemastore.org/**" + "src/.tmp/_placeholder_" "src/tools/**" "src/x509/**" diff --git a/tools/bazel b/tools/bazel index b412d328d93..9748c092713 100755 --- a/tools/bazel +++ b/tools/bazel @@ -54,6 +54,9 @@ fi echo "common --//bazel/config:running_through_bazelisk" > $REPO_ROOT/.bazelrc.bazelisk +# Write a compressed execution log to a file for EngFlow to pick up for more detailed analysis. +echo "common --execution_log_compact_file=$REPO_ROOT/.tmp/bazel_execution_log.binpb.zst" > $REPO_ROOT/.bazelrc.exec_log_file + if [[ $MONGO_BAZEL_WRAPPER_DEBUG == 1 ]]; then wrapper_start_time="$(date -u +%s.%N)" fi diff --git a/tools/bazel.bat b/tools/bazel.bat index 651e4d4de5e..8d6ccbac900 100644 --- a/tools/bazel.bat +++ b/tools/bazel.bat @@ -31,9 +31,12 @@ set "VT_SCRIPT=%TEMP%\bazel_vt_%RANDOM%.ps1" >nul 2>&1 powershell -NoProfile -ExecutionPolicy Bypass -File "%VT_SCRIPT%" del "%VT_SCRIPT%" >nul 2>&1 +set REPO_ROOT=%~dp0.. + echo common --//bazel/config:running_through_bazelisk > .bazelrc.bazelisk -set REPO_ROOT=%~dp0.. +REM Write a compressed execution log to a file for EngFlow to pick up for more detailed analysis. +echo common --execution_log_compact_file=%REPO_ROOT:\=/%/.tmp/bazel_execution_log.binpb.zst > .bazelrc.exec_log_file for %%I in (%REPO_ROOT%) do set cur_dir=%%~nxI