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

Deprecate running on macOS 12 (and 13, for arm64) #21569

Merged
merged 7 commits into from
Oct 30, 2024
Merged

Conversation

huonw
Copy link
Contributor

@huonw huonw commented Oct 24, 2024

This PR sets up infrastructure for deprecating running Pants on macOS versions, as they go out of support, and uses it to deprecate:

  • macOS 12 (x86-64, and arm64)
  • macOS 13 (arm64)

Thus, after this PR, Pants supports running on macOS 13 or newer on x86-64, and macOS 14 or newer on arm64. (Why different? Github provides macOS 14 arm64 runners, but not macOS 13.)

The infrastructure is general (rather than specific like #21326), anticipating deprecating one macOS version a year. For instance, we'll need to deprecate support for macOS 13 (on x86-64) as it approaches end-of-life in the middle of 2025. From https://en.wikipedia.org/wiki/MacOS#Timeline_of_releases, it seems like Apple supports operating systems for about 3 years, e.g. GA macOS 12 was released October 2021, and the final release was July 2024.

The new [GLOBAL].allow_deprecated_macos_versions option is an allow-list of versions that are permitted, rather than a plain boolean, to ensure new deprecations are still visible. For instance, I think that someone who's opted-in to running on macOS 12 (allow_deprecated_macos_versions = ["12"]) should still get new alerts when they upgrade Pants to a version where macOS 13 is deprecated, when running on macOS 13, and similarly if they run on macOS 11 without realising it.

Broader discussion/macOS platform support

Pants currently explicitly supports running on versions of macOS that are not maintained, and is built on such systems (e.g. we have a self-hosted arm64 runner with macOS 11). macOS 12 recently reached end-of-life, and Github is phasing out its (free) hosted runners in December 2024 (https://github.blog/changelog/2024-08-19-notice-of-upcoming-deprecations-and-breaking-changes-in-github-actions-runners/, #21333).

There's a desire to reduce Pantsbuild's costs, since it's now volunteer driven project, so using free runners is much better than relying on self-hosted ones (both direct money costs to pay for the machines, and volunteer time to maintain the machines).

To achieve this, we'll need to stick closer to what Github supports, which seems to be close to what Apple supports. Thus, by deprecating macOS 12 in Pants 2.24.x, we can limit ourselves to macOS 13+ in 2.25+, and reduce how long we need to keep macOS 12 machines around. (That is, as soon as we close off the 2.24.x release series, we can jettison any macOS 12 machines.)

That is, under the process being implied here, we'll end up with something like for macOS version support:

Pants series x86-64, not deprecated x86-64, supported-but-deprecated arm64, not deprecated arm64, supported-but-deprecated
2.22.x macOS 10.15 - macOS 11 -
2.23.x (#21326) 12 10.15, 11 12 11
2.24.x (this PR) 13 12 14 12, 13
2.25.x 13 - 14 -
...
2.A.x (mid 2025) 14 13 14 -
2.(A+1).x 14 - 14 -
...
2.B.x (mid 2026) 15 14 15 14
2.(B+1).x 15 - 15 -

Note: this may be too annoying for our users: it's a pain if a build tool has restrictive system support. I note that, for example, Rust supports 10.15+ (x86-64) and 11.0+ (arm64): https://doc.rust-lang.org/nightly/rustc/platform-support/apple-darwin.html

Fixes #21333

@huonw huonw force-pushed the huonw/21333-macos-12 branch 2 times, most recently from ac33e76 to 42d663b Compare October 28, 2024 04:13
@huonw huonw changed the title WIP: Deprecate running on macOS 12 Deprecate running on macOS 12 (and 13, for arm64) Oct 28, 2024
@huonw huonw marked this pull request as ready for review October 28, 2024 22:28
@huonw huonw requested a review from benjyw October 28, 2024 22:30
Copy link
Contributor

@benjyw benjyw left a comment

Choose a reason for hiding this comment

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

LG, except that maybe saying "will only run on" is overly harsh. Is it in fact true? "is only supported on" conveys more of a "you can try running on earlier versions, and it may or may not work, but we can't support it" vibe.

@huonw
Copy link
Contributor Author

huonw commented Oct 29, 2024

Yeah, I like it, softened!

@huonw huonw enabled auto-merge (squash) October 30, 2024 01:03
@huonw huonw merged commit ddee75f into main Oct 30, 2024
24 checks passed
@huonw huonw deleted the huonw/21333-macos-12 branch October 30, 2024 01:24
huonw added a commit that referenced this pull request Nov 8, 2024
…ed (#21417)" (#21623)

This reverts commit ae20980 / #21417 to
restore current-`main`/version 2.24.x to using our self-hosted macOS
10.15 runner, rather than the Github-hosted macOS 12 runner that is
being deprecated on 2024-12-03.

This ensures we'll be able to do the 2.24.0 release and patch releases
after that. This doesn't change the deprecation of macOS versions 10.15,
11 (in 2.23, #21326) and 12 (in 2.24, #21569). We'll be "unnecessarily"
building on 10.15 for 2.24 even though it's not actually supported. The
warnings/errors about the lack of support will still occur, though.

Once we branch for 2.24 and `main` switches over to 2.25, we can switch
this over to using the GitHub hosted macOS 13 runner (not 12).

See
#21333 (comment)
for more discussion.
huonw added a commit that referenced this pull request Nov 18, 2024
This follows-up on the deprecation of support for older macOS versions
that happened in 2.24.x and earlier, by switching `main` (2.25.x) to be
building on macOS 13 for x86-64 (upgrading from 10.15) and macOS 14 for
arm64 (upgrading from 11). These particular versions are dictated by
Github's hosted runners: there's no arm64 macos-13 runners.

| version | branch | supported (x86-64) | built-on (x86-64)   | supported (arm64) | built-on (arm64) | refs                                        |        |
|---------|--------|--------------------|---------------------|-------------------|------------------|---------------------------------------------|--------|
| 2.22.x  | 2.22.x | 10.15              | 10.15 (self-hosted) | 11                | 11 (self)        | #21074                                      | #21326 |
| 2.23.x  | 2.23.x | 12                 | 10.15 (self)        | 12                | 11 (self)        | #21569 (also #21417 but reverted in #21623) |        |
| 2.24.x  | 2.24.x | 13                 | 10.15 (self)        | 14                | 11 (self)        | #21333, #21623                              |        |
| 2.25.x  | main   | 13                 | 13 (Github hosted)  | 14                | 14 (GH)          | #21333, #21413, this PR                     |        |

This is _preparation_ for scaling down our self-hosted macOS runners,
but we cannot do that yet. They're still used by:

- 2.24.x branches and earlier (in this repo)
- scie-pants' CI (pantsbuild/scie-pants#421)

Thus, we at least need to wait a few months for the 2.24.x milestone to
be closed before we can reduce that spend.

(NB. despite the title, this doesn't _start_ testing on arm64 macOS: see
separate issue #20993.)

Fixes #21413
Fixes #21333
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

macOS 12 GitHub-hosted runners will stop working from 2024-12-03
2 participants