Support MacOS 14 github runner (which is now default)#12617
Support MacOS 14 github runner (which is now default)#12617notatallshaw wants to merge 2 commits intopypa:mainfrom
Conversation
7397f6e to
d10bd54
Compare
|
Pip's I've removed Python 3.8 and 3.9 in this PR to fix CI with |
| exclude: | ||
| # MacOS Arm supports Python 3.10+ | ||
| - os: MacOS | ||
| python: "3.8" | ||
| - os: MacOS | ||
| python: "3.9" |
There was a problem hiding this comment.
Is there no way to test 3.8 and 3.9 against Mac?
There was a problem hiding this comment.
python-versions does not support 3.8 and 3.9 (actions/setup-python#808) for macos-14 runner, seems there is a PR to help fix it that is currently open: actions/python-versions#259
There was a problem hiding this comment.
Seems this partly caused by old versions of Python not bundling new versions of pip, which was recently discussed: https://discuss.python.org/t/update-strategy-for-pip-in-ensurepip-for-security-maintenance-releases
There was a problem hiding this comment.
You can re-include 3.8 and 3.9 on macos-13 or macos-12, for example:
Or like this:
This allows us to keep testing 3.8+, covering both architectures, and unlike #12593, doesn't ~double the number of macOS jobs.
There was a problem hiding this comment.
This PR was an attempt to be a much simpler change to CI to support macos-latest only.
From my point of view if you're going to test both x86 and ARM you should test all Python versions available to test. I strongly prefer #12593 to this PR.
Otherwise, it looks like python-versions is very close to adding 3.8 and 3.9 for macos-14 (macos-latest): actions/python-versions#264
There was a problem hiding this comment.
3.8 and 3.9 are now available on macos-14 but it looks like something is wrong because almost every integration test fails with:
ERROR: virtualenv is not compatible with this system or executable
There was a problem hiding this comment.
Old versions of virtualenv are seemingly not compatible with macos-14, I removed the restriction on virtualenv which seems to have a long sordid history last updated in #11288
Most integration tests now pass on Python 3.8 and 3.9 but one fails (seemingly on macos-14 only):
2024-04-25T16:21:21.1996150Z �[31mFAILED�[0m tests/functional/test_uninstall_user.py::�[1mTests_UninstallUserSite::test_uninstall_editable_from_usersite�[0m - AssertionError: Script result: python -m pip install --user -e /private/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/pytest-of-runner/pytest-1/popen-gw2/test_uninstall_editable_from_u0/data/packages/FSPkg
2024-04-25T16:21:21.1996700Z -- stdout: --------------------
2024-04-25T16:21:21.1998990Z Obtaining file:///private/var/folders/3m/p59k4qdj0f17st0gn2cmj3640000gn/T/pytest-of-runner/pytest-1/popen-gw2/test_uninstall_editable_from_u0/data/packages/FSPkg
2024-04-25T16:21:21.1999880Z Preparing metadata (setup.py): started
2024-04-25T16:21:21.2000610Z Preparing metadata (setup.py): finished with status 'done'
2024-04-25T16:21:21.2000920Z Installing collected packages: FSPkg
2024-04-25T16:21:21.2001380Z Running setup.py develop for FSPkg
2024-04-25T16:21:21.2001540Z Successfully installed FSPkg
2024-04-25T16:21:21.2001540Z
2024-04-25T16:21:21.2001680Z -- created: -------------------
2024-04-25T16:21:21.2001770Z venv/user/lib/python3.9
2024-04-25T16:21:21.2001860Z site-packages
2024-04-25T16:21:21.2002000Z FSPkg.egg-link (146 bytes)
2024-04-25T16:21:21.2002100Z -- updated: -------------------
2024-04-25T16:21:21.2002160Z venv/user/lib
I have no way to reproduce this locally, and I am unsure what the issue is.
There was a problem hiding this comment.
@uranusjr Unless this happens to be a flaky test (which it doesn't look like) one of the following needs to happen:
- Someone else needs to fix the test (I have no idea where to start and can't reproduce)
- Python 3.8 and 3.9 need excluding
- Or, an alternative PR like Run CI Tests on both MacOS Arm and x86 #12593 needs accepting which runs 3.8 and 3.9 for x86 but not for ARM
71e4662 to
912e840
Compare
912e840 to
43eb1ac
Compare
|
Going to close this as I am not in a position to be able to test and fix the failing 3.8 and 3.9 tests on MacOS Latest (M1). |
Github's macos-14 runner is rolling out as macos-latest over the following weeks: https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/
macos-14 no longer includes SVN by defeault: https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
Where as macos-12 (the previous macos and the one pip runners still appear to be on) did: https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
When pip's macos-latest runners get updated to macos-14 CI tests will currently fail due to lack of subversion. This PR preempts that by explicitly installing SVN.
I have a secondary PR to explictly support both x86 and M1 runners: #12593