[SERVER-34374] resmoke.py uses bytestrings for representing pathnames, leading to silently failing to clear the dbpath on Windows Created: 07/Apr/18 Updated: 29/Oct/23 Resolved: 11/May/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.21, 3.4.16, 3.6.6, 4.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Max Hirschhorn | Assignee: | Jonathan Abrahams |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v3.6, v3.4, v3.2
|
||||||||||||||||
| Sprint: | TIG 2018-05-07, TIG 2018-05-21 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 16 | ||||||||||||||||
| Story Points: | 2 | ||||||||||||||||
| Description |
|
https://bugs.python.org/issue24672 describes an issue in Python where shutil.rmtree() fails to delete files with non-ASCII pathnames when a bytestring (i.e. a str instance in Python 2). The ntpath.py module in Python preserves type of its argument so it sufficient to use a unicode instance instead in order to have Python call the W-suffixed Win32 APIs that return Unicode strings. I've verified on a Windows spawn host that the following patch to config.py addresses this issue. The change to parser.py is to just do the same if someone were to specify --dbpathPrefix when trying to reproduce a failure outside of Evergreen.
However, I'm not sure if more special handling on Linux platforms is necessary as the changes from https://github.com/pypa/setuptools/commit/5ad13718686bee04a93b4e86929c1bb170f14a52 suggest we shouldn't use Unicode string literals if sys.getfilesystemencoding() == 'ascii'. We currently set the LANG=C environment variable on all of Ubuntu 16.04 builders (
|
| Comments |
| Comment by Githook User [ 18/Jun/18 ] |
|
Author: {'username': 'hptabster', 'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com'}Message: (cherry picked from commit d6837a12b3586b0738dcd4214951a1d6f6b1415e) |
| Comment by Githook User [ 18/Jun/18 ] |
|
Author: {'username': 'hptabster', 'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com'}Message: (cherry picked from commit d6837a12b3586b0738dcd4214951a1d6f6b1415e) |
| Comment by Githook User [ 18/Jun/18 ] |
|
Author: {'username': 'hptabster', 'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com'}Message: (cherry picked from commit d6837a12b3586b0738dcd4214951a1d6f6b1415e) |
| Comment by Githook User [ 11/May/18 ] |
|
Author: {'name': 'Jonathan Abrahams', 'email': 'jonathan@mongodb.com', 'username': 'hptabster'}Message: |