[SERVER-61216] The --cache-disable flag results in a python stacktrace Created: 03/Nov/21  Updated: 29/Oct/23  Resolved: 10/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0, 5.0.6, 5.1.1

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Daniel Moody
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.1, v5.0
Sprint: Dev Platform 2021-11-15
Participants:

 Description   

It is handy sometimes to be able to run patch builds that don't use the shared SCons cache, for instance to A/B test the performance impact of a compiler option or a toolchain change.

The easiest way to do this is to build with evergreen patch -param patch_compile_flags=-cache-disable .... Unfortunately, this appears to be broken right now, probably due to our cachedir customizations.

The stack trace looks like:

[2021/11/03 01:25:33.555] scons: *** [build\cached\mongo\config.h] TypeError : stat: path should be string, bytes, os.PathLike or integer, not NoneType
 [2021/11/03 01:25:33.563] Traceback (most recent call last):
 [2021/11/03 01:25:33.563]   File "C:\data\mci\1faeba6a1bb6900b70a75ba67427a04e\src\src\third_party\scons-3.1.2\scons-local-3.1.2\SCons\Taskmaster.py", line 241, in execute
 [2021/11/03 01:25:33.563]     if not t.retrieve_from_cache():
 [2021/11/03 01:25:33.563]   File "C:\data\mci\1faeba6a1bb6900b70a75ba67427a04e\src\src\third_party\scons-3.1.2\scons-local-3.1.2\SCons\Node\FS.py", line 2982, in retrieve_from_cache
 [2021/11/03 01:25:33.563]     return self.get_build_env().get_CacheDir().retrieve(self)
 [2021/11/03 01:25:33.563]   File "C:\data\mci\1faeba6a1bb6900b70a75ba67427a04e\src\site_scons\site_tools\validate_cache_dir.py", line 156, in retrieve
 [2021/11/03 01:25:33.563]     self.log_json_cachedebug(node)
 [2021/11/03 01:25:33.563]   File "C:\data\mci\1faeba6a1bb6900b70a75ba67427a04e\src\site_scons\site_tools\validate_cache_dir.py", line 147, in log_json_cachedebug
 [2021/11/03 01:25:33.563]     cachefile = self.get_file_contents_path(self.cachepath(node)[1])
 [2021/11/03 01:25:33.563]   File "C:\data\mci\1faeba6a1bb6900b70a75ba67427a04e\src\site_scons\site_tools\validate_cache_dir.py", line 251, in cachepath
 [2021/11/03 01:25:33.563]     if node.fs.exists(path):
 [2021/11/03 01:25:33.563]   File "C:\data\mci\1faeba6a1bb6900b70a75ba67427a04e\src\src\third_party\scons-3.1.2\scons-local-3.1.2\SCons\Node\FS.py", line 1101, in exists
 [2021/11/03 01:25:33.563]     return os.path.exists(path)
 [2021/11/03 01:25:33.563]   File "C:\python\python37\lib\genericpath.py", line 19, in exists
 [2021/11/03 01:25:33.563]     os.stat(path)
 [2021/11/03 01:25:33.563] TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
 [2021/11/03 01:25:33.564] scons: *** [build\cached\mongo\base\error_codes.h] TypeError : stat: path should be string, bytes, os.PathLike or integer, not NoneType



 Comments   
Comment by Githook User [ 29/Nov/21 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-61216 validate cachedir should honor --cache-disable flag.

(cherry picked from commit ec5eb42401c0c3141997ba6b7f3dceffcef8e7e8)
Branch: v5.1
https://github.com/mongodb/mongo/commit/062354c7006e746d73bf102e261d00bf6868ae8f

Comment by Githook User [ 29/Nov/21 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-61216 validate cachedir should honor --cache-disable flag.

(cherry picked from commit ec5eb42401c0c3141997ba6b7f3dceffcef8e7e8)
Branch: v5.0
https://github.com/mongodb/mongo/commit/eb58146e4d76288c1fe4026a7d91aa817d39e219

Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'Daniel Moody', 'email': 'daniel.moody@mongodb.com', 'username': 'dmoody256'}

Message: SERVER-61216 validate cachedir should honor --cache-disable flag.
Branch: master
https://github.com/mongodb/mongo/commit/ec5eb42401c0c3141997ba6b7f3dceffcef8e7e8

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