RESOLVED FIXED284086
[ews][autoinstall] ModuleNotFoundError: No module named 'mock'
https://bugs.webkit.org/show_bug.cgi?id=284086
Summary [ews][autoinstall] ModuleNotFoundError: No module named 'mock'
Sam Sneddon [:gsnedders]
Reported 2024-12-04 18:30:43 PST
See, e.g., https://ews-build.webkit.org/#/builders/20/builds/72486, with the show-identifier step: ``` python3 Tools/Scripts/git-webkit find 174fb79a43803442ff7d96e99c87eecd853706d6 in dir /Volumes/Data/worker/JSC-Tests-EWS/build (timeout 300 secs) watching logfiles {} argv: [b'python3', b'Tools/Scripts/git-webkit', b'find', b'174fb79a43803442ff7d96e99c87eecd853706d6'] using PTY: False Traceback (most recent call last): File "/Volumes/Data/worker/JSC-Tests-EWS/build/Tools/Scripts/git-webkit", line 63, in <module> sys.exit(program.main( File "/Volumes/Data/worker/JSC-Tests-EWS/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 154, in main repository = local.Scm.from_path( File "/Volumes/Data/worker/JSC-Tests-EWS/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/scm.py", line 45, in from_path if local.Git.is_checkout(path): File "/Volumes/Data/worker/JSC-Tests-EWS/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 338, in is_checkout return run([cls.executable(), 'rev-parse', '--show-toplevel'], cwd=path, capture_output=True).returncode == 0 File "/Volumes/Data/worker/JSC-Tests-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/subprocess_utils.py", line 40, in run with Timeout.DisableAlarm(): File "/Volumes/Data/worker/JSC-Tests-EWS/build/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/timeout.py", line 62, in __init__ from mock import patch ModuleNotFoundError: No module named 'mock' program finished with exit code 1 elapsedTime=0.478130 ``` This isn't actually related to my change, because e.g., https://ews-build.webkit.org/#/builders/20/builds/72413 also hit this earlier. On the bot: ``` buildbot@ews251 ~ % ls -Tlh /Volumes/Data/worker/JSC-Tests-EWS/build/Tools/Scripts/libraries/autoinstalled/python-3-x86_64 | grep -E 'mock|manifest' -rw-r--r-- 1 buildbot admin 1.2K Oct 17 12:15:25 2024 manifest.json -rw-r--r-- 1 buildbot admin 70K Oct 17 12:15:25 2024 mock-4.tar.gz drwxr-xr-x 7 buildbot admin 224B Oct 16 14:33:37 2024 mock-5.1.0.dist-info ``` And the manifest.json contains: ``` "mock": { "index": "pypi.org", "version": "5.1" }, ``` So somehow we've ended up in a broken state where mock wasn't installed properly, and have been in this state for months seemingly? There's nothing to indicate how we've ended up with the mock-5.1.0.dist-info (presumably from the mock==5.1.0 wheel being installed) but not the other files. https://ews-build.webkit.org/#/builders/20/builds/65503 is right around Oct 17 12:15:25 2024, and is a PR on safari-7618-branch (technically a branch off of that, but that's close enough), which seems like a significant jump backwards from main. My best guess as to what happened here is the install of mock==4 failed, but we don't actually change the manifest until the very end after installation has succeeded — which provides ample opportunity for things to get out of sync. I don't know what the right fix is here, probably to remove any instance of package X from the manifest just before we start installing a new version, or to do that when we've failed to install. Probably one of the two?
Attachments
Sam Sneddon [:gsnedders]
Comment 1 2024-12-04 19:10:04 PST
Radar WebKit Bug Importer
Comment 2 2024-12-05 10:18:20 PST
EWS
Comment 3 2024-12-05 18:54:29 PST
Committed 287426@main (881ba2ce3758): <https://commits.webkit.org/287426@main> Reviewed commits have been landed. Closing PR #37474 and removing active labels.
EWS
Comment 4 2024-12-06 20:53:53 PST
Committed 283286.568@safari-7620-branch (0fd9aaf87eef): <https://commits.webkit.org/283286.568@safari-7620-branch> Reviewed commits have been landed. Closing PR #2379 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.