SERVER-118037: Hydrate Unit Test Cache (#47094)

GitOrigin-RevId: a11242a482722f6114d3c3f0b57cf6c263b8123f
This commit is contained in:
Zack Winter 2026-01-28 10:29:22 -08:00 committed by MongoDB Bot
parent 0f3e7dee5f
commit cbf79cdc8e
4 changed files with 35 additions and 2 deletions

View File

@ -442,6 +442,7 @@ common:remote_unittest --cache_test_results=auto
common:remote_unittest --dev_stacktrace=False
common:remote_unittest --run_under=//bazel:test_wrapper
common:remote_unittest --test_timeout=660
common:remote_unittest --define GIT_COMMIT_HASH=nogitversion
test:remote_unittest --test_tag_filters=mongo_unittest,-intermediate_debug,-incompatible_with_bazel_remote_test
# Coverage

View File

@ -300,6 +300,27 @@ tasks:
--keep_going
--build_tag_filters=${bazel_filters_for_cache_hydration}
- name: hydrate_bazel_unit_tests
tags:
[
"assigned_to_jira_team_devprod_build",
"bazel_cache_hydration",
"auxiliary",
]
depends_on:
- name: version_expansions_gen
variant: generate-tasks-for-version
commands:
- func: "bazel test"
vars:
compiling_for_test: true
test_timeout_sec: 660 # Allow extra 60s for coredump on abort
no_mongo_version: true
targets: //src/mongo/...
bazel_args: >-
--config=remote_unittest
--keep_going
- name: run_bazel_clang_tidy
tags:
[
@ -1314,6 +1335,7 @@ task_groups:
- hydrate_bazel_profile_dbg
- hydrate_bazel_profile_dbg_aubsan
- hydrate_bazel_profile_dbg_tsan
- hydrate_bazel_unit_tests
- <<: *compile_task_group_template
name: hydrate_all_headers_TG

View File

@ -117,8 +117,13 @@ LOCAL_ARG="$(bazel_evergreen_shutils::maybe_release_flag "$LOCAL_ARG")"
# Ensure server is up and print PID
bazel_evergreen_shutils::ensure_server_and_print_pid "$BAZEL_BINARY"
MONGO_VERSION_ARG="--define=MONGO_VERSION=${version}"
if [[ -n "${no_mongo_version}" ]]; then
MONGO_VERSION_ARG=""
fi
# Build flags line
ALL_FLAGS="--verbose_failures ${LOCAL_ARG} --define=MONGO_VERSION=${version} ${bazel_args:-} ${bazel_compile_flags:-} ${task_compile_flags:-} ${patch_compile_flags:-}"
ALL_FLAGS="--verbose_failures ${LOCAL_ARG} ${MONGO_VERSION_ARG} ${bazel_args:-} ${bazel_compile_flags:-} ${task_compile_flags:-} ${patch_compile_flags:-}"
echo "${ALL_FLAGS}" >.bazel_build_flags
# Save the entire bazel build invocation to attach to the task for re-running locally

View File

@ -34,8 +34,13 @@ LOCAL_ARG="$(bazel_evergreen_shutils::maybe_release_flag "$LOCAL_ARG")"
# Possibly scale test timeout and append to bazel_args
bazel_evergreen_shutils::maybe_scale_test_timeout_and_append
MONGO_VERSION_ARG="--define=MONGO_VERSION=${version}"
if [[ -n "${no_mongo_version}" ]]; then
MONGO_VERSION_ARG=""
fi
# Build the shared flags and persist the --config subset
ALL_FLAGS="--verbose_failures ${LOCAL_ARG} --define=MONGO_VERSION=${version} ${bazel_args:-} ${bazel_compile_flags:-} ${task_compile_flags:-} ${patch_compile_flags:-}"
ALL_FLAGS="--verbose_failures ${LOCAL_ARG} ${MONGO_VERSION_ARG} ${bazel_args:-} ${bazel_compile_flags:-} ${task_compile_flags:-} ${patch_compile_flags:-}"
echo "${ALL_FLAGS}" >.bazel_build_flags
# to capture exit codes