[SERVER-69064] Improve default_variant_dir_generator in Build System Created: 22/Aug/22  Updated: 29/Oct/23  Resolved: 13/Oct/22

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

Type: Task Priority: Major - P3
Reporter: Tausif Rahman (Inactive) Assignee: Juan Gu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 105

 Description   

Code: https://github.com/mongodb/mongo/blob/cbe2b6a6be0ae8425f7b79414434a22e1c4073e3/site_scons/mongo/generators.py#L98-L120

We use the default_variant_dir_generator function in the site_scons/mongo/generators.py file to automatically generate a directory name based on the opt & dbg settings. The way it is done right now (1) does not encompass all possible variations, (2) uses the same directory name for different variations & (3) uses hashes to generate directory names which may not be needed. A potential solution is to use the values of opt & dbg to generate a unique & descriptive directory name. For example, given the options dbg=on & opt=off, we may construct the directory name: dbg-on-opt-off.



 Comments   
Comment by Githook User [ 12/Oct/22 ]

Author:

{'name': 'Juan Gu', 'email': 'juan.gu@mongodb.com', 'username': 'juangugit'}

Message: SERVER-69064 Improve default_variant_dir_generator in Build System
Branch: master
https://github.com/mongodb/mongo/commit/c48dfb6dc05fa1c381b4b0b913ce57c47d2932c3

Comment by Alex Neben [ 26/Aug/22 ]

I think we need some scons tests to go along with this. Basically i imagining some python tests that will run `scons <some params>` then confirm the dir struct is right, the target was built, and various options were on/off These should be quick to run and I think can make some of our changes safer

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