-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Build
-
Fully Compatible
compile_dist_test with bazel enabled is failing on MacOS is failing due to evergreen setting a custom tmp dir location. The bazel sandbox keeps an internal mapping of what directories it can access, so the custom /data/mci/{build_id}/tmp directory needed to be marked as writable explicitly.
This is currently set in the evergreen test config that manually invokes bazel, but isn't set in the scons integration layer (integrate_bazel.py): https://github.com/10gen/mongo/blob/master/etc/evergreen_yml_components/definitions.yml#L2797
Update the scons-bazel integration to append "
--sandbox_writable_path=$TMPDIR" when building on MacOS.
See https://parsley.mongodb.com/evergreen/mongodb_mongo_master_nightly_enterprise_macos_arm64_compile_dist_test_patch_46aef6d17593c49faa83ea861452e92ef8214d07_659c8cb31e2d170d8d53a6a0_24_01_09_00_01_52/0/task?bookmarks=0,3587&shareLine=3331
There are a few different outcomes that would all be acceptable, in order of ideal -> less ideal:
- Bazel sets it automatically (ex. running "bazelisk build xyz" in evergreen sets the sandbox path without any extra cli params)
- Scons adds --sandbox_writable_path to the bazelisk cli in integrate_bazel.py when run on MacOS
- Evergreen MacOS variants specify --sandbox_writable_path as a new environment variable for scons-bazel integration to pick up