
OPERATIONAL DEFECT DATABASE
...

...
In BUILD.bazel, "sharding_ddl_coordinator_external_state_for_test.cpp" is included both in db_s_shard_server_part2_test and db_s_shard_server_part3_test . Similarily, "//src/mongo/db/s/resharding:resharding_test_util.cpp" is included in both db_s_resharding_test and db_s_resharding_part2_test . plus_interface.py does not allow the same source file to be included in multiple test targets. Now, each attempt to run a C++ unit test locally results in the following error: (python3-venv) ubuntu@ip-10-0-114-28:~/workspace/mongo$ bazel run +session_test Traceback (most recent call last): File "/home/ubuntu/workspace/mongo/bazel/wrapper_hook/wrapper_hook.py", line 61, in main() File "/home/ubuntu/workspace/mongo/bazel/wrapper_hook/wrapper_hook.py", line 45, in main args = test_runner_interface( ^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/workspace/mongo/bazel/wrapper_hook/plus_interface.py", line 147, in test_runner_interface add_source_test(src, binfile, sources_to_bin) File "/home/ubuntu/workspace/mongo/bazel/wrapper_hook/plus_interface.py", line 129, in add_source_test raise DuplicateSourceNames( bazel.wrapper_hook.plus_interface.DuplicateSourceNames: Two test files with the same name: //src/mongo/db/s:db_s_shard_server_part3_test->sharding_ddl_coordinator_external_state_for_test //src/mongo/db/s:db_s_shard_server_part2_test->sharding_ddl_coordinator_external_state_for_test The script did not run on evergreen, allowing these changes to be merged into master in this PR. Duplicate source files should be removed from test targets. A separate ticket has been filed to run this script on evergreen.
xgen-internal-githook commented on Mon, 28 Jul 2025 21:16:17 +0000: Author: {'name': 'Steve McClure', 'email': 'steve.mcclure@mongodb.com', 'username': 'smcclure15'} Message: SERVER-108282: Remove duplicate source files across different test targets (#39231) GitOrigin-RevId: f5a9a8b21683c2178ce79dabf4c1b4e154a3a993 Branch: master https://github.com/mongodb/mongo/commit/2b1df4b8ee481556d7a427fd7853297b12395b32
I've been using bazel run +session_test most often, but in my experience running any C++ unit test locally will result in this error.
Click on a version to see all relevant bugs
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.