Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MacOS 14 github runner (which is now default) #12617

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

notatallshaw
Copy link
Contributor

@notatallshaw notatallshaw commented Apr 9, 2024

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

@notatallshaw notatallshaw changed the title Install SVN on MacOS to support MacOS 14 Install SVN on MacOS CI to support MacOS 14 (which will soon be default) Apr 11, 2024
@notatallshaw notatallshaw changed the title Install SVN on MacOS CI to support MacOS 14 (which will soon be default) Install SVN on MacOS CI to support MacOS 14 runner (which will soon be default) Apr 11, 2024
@notatallshaw notatallshaw force-pushed the install-svn-to-support-macos-14-tests branch from 7397f6e to d10bd54 Compare April 25, 2024 02:01
@notatallshaw notatallshaw changed the title Install SVN on MacOS CI to support MacOS 14 runner (which will soon be default) Support MacOS 14 github runner (which is now default) Apr 25, 2024
@notatallshaw
Copy link
Contributor Author

Pip's macos-latest runner is now macos-14 causing pip CI to fail: https://github.com/pypa/pip/actions/runs/8825862850/job/24230722241

I've removed Python 3.8 and 3.9 in this PR to fix CI with macos-latest.

Comment on lines 117 to 122
exclude:
# MacOS Arm supports Python 3.10+
- os: MacOS
python: "3.8"
- os: MacOS
python: "3.9"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to test 3.8 and 3.9 against Mac?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can re-include 3.8 and 3.9 on macos-13 or macos-12, for example:

python/peps#3763

Or like this:

hugovk/pepotron#63

This allows us to keep testing 3.8+, covering both architectures, and unlike #12593, doesn't ~double the number of macOS jobs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

@notatallshaw notatallshaw force-pushed the install-svn-to-support-macos-14-tests branch from 71e4662 to 912e840 Compare April 27, 2024 22:16
@notatallshaw notatallshaw mentioned this pull request Apr 28, 2024
@notatallshaw notatallshaw force-pushed the install-svn-to-support-macos-14-tests branch from 912e840 to 43eb1ac Compare April 29, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants