[SERVER-84660] Set "sandbox_writable_path" on MacOS Created: 09/Jan/24  Updated: 04/Feb/24  Resolved: 23/Jan/24

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Zack Winter Assignee: Trevor Guidry
Resolution: Fixed Votes: 0
Labels: req-bazel-all-variant-launch
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Build
Backwards Compatibility: Fully Compatible
Participants:

 Description   

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


 Comments   
Comment by Githook User [ 23/Jan/24 ]

Author:

{'name': 'Trevor', 'email': 'trevorguidry6@gmail.com', 'username': 'Trevor159'}

Message: SERVER-84660 Set sandbox_writable_path on MacOS (#18290)

GitOrigin-RevId: 3b4c5198e23046827df7740c0e040a828a10db46
Branch: master
https://github.com/mongodb/mongo/commit/d915eb7f1c85e1988e15014d4f1919bfd2a6900c

Generated at Thu Feb 08 06:55:37 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.