[SERVER-46133] Hygienic archive targets rebuild when nothing has changed Created: 13/Feb/20  Updated: 09/Aug/23  Resolved: 09/Aug/23

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Backwards Compatibility: Fully Compatible
Participants:

 Description   

If you run the following command twice:

$ python3 ./buildscripts/scons.py --variables-files=etc/scons/mongodbtoolchain_v3_gcc.vars --separate-debug --install-mode=hygienic --implicit-cache --build-fast-and-loose=on archive-dist -j300 --debug=explain

Then the second build will recreate the dist archive, even though it should be viewed as up to date. The explain output looks like:

scons: done reading SConscript files.
scons: Building targets ...
scons: rebuilding `mongodb-dist.tgz' because:
           `build/aib_make_archive.py' changed
           `install-dist' changed
           `/bin/tar' changed
Building package mongodb-dist.tgz from install-dist
scons: done building targets.

Now, the SCons --debug=explain output is notoriously unreliable. I suspect that what is actually happening is that the ordering of the file arguments to the tar command is unstable. But we should fix whatever is causing these to rebuild.



 Comments   
Comment by Alex Neben [ 09/Aug/23 ]

Closing this issues as part of some SDP backlog cleanup. Please reopen if you feel this should be prioitized.

Generated at Thu Feb 08 05:10:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.