Re: CI, macports, darwin version problems
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2024-06-27T06:32:52Z
Lists: pgsql-hackers
Attachments
- v3-0001-ci-Upgrade-macOS-version-from-13-to-14.patch (text/x-patch) patch v3-0001
- v3-0002-ci-Find-appropriate-MacPorts-package-automaticall.patch (text/x-patch) patch v3-0002
On Wed, Jun 26, 2024 at 4:04 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Thomas Munro <thomas.munro@gmail.com> writes: > > But I thought of an easier way: instead of trying to do my own cache > > invalidation with shell script and duct tape, I can include the > > current OS major version in the cache key used to carry the > > macports directory between CI runs. Hopefully Cirrus's cache machinery > > is smart enough to age out the old stuff eventually. > > Sounds reasonable. cfbot didn't like v2. It seems that github accounts using "instance:OSXCommunityInstance" are forced to use ghcr.io/cirruslabs/macos-runner:sonoma no matter what you ask for (example: [1]), while accounts configured to use user-supplied runners like the Mac Minis that cfbot is using *can't* use ghcr.io/cirruslabs/macos-runner:sonoma, and fail (example: [2]). I don't know why. So I think we should request ghcr.io/cirruslabs/macos-sonoma-base:latest. Personal github accounts will use macos-runner:sonoma instead, but at least it's the same OS release. Here's a new version like that, to see if cfbot likes it. Given that the OS release affects the macports_url we have to specify, I think this either means that we'll have to stay in sync with whatever macOS version is being forced for "instance:OSXCommunityInstance" users, or construct the macports_url automatically. Here is an attempt at the latter, as a second patch. Seems to work OK. For example, the setup_additional_packages step currently prints out: [06:23:08.584] macOS major version: 14 [06:23:09.672] MacPorts package URL: https://github.com/macports/macports-base/releases/download/v2.9.3/MacPorts-2.9.3-14-Sonoma.pkg As for the difference between the two types of image, they're described at [3]. The -runner images seem to be part of a project for faster starting VMs[4], which sounds like a pretty good reason to want to standardise on images to make pre-started instances fungible but there is perhaps also potential for selecting different xcode versions. > > FTR there is a newer macOS release that recently came out, Sequoia aka > > macOS 15, but the image available to us for CI is marked beta so I > > figured we can wait a bit longer for that. > > Indeed not; that's only beta and will be so till September-ish. > We don't really want to touch it yet because of this issue: > > https://www.postgresql.org/message-id/flat/CAMBWrQnEwEJtgOv7EUNsXmFw2Ub4p5P%2B5QTBEgYwiyjy7rAsEQ%40mail.gmail.com > > I'm not sure what the resolution of that will be, but we surely > don't want to gate CI improvement on that. Urgh. Also we have to wait for MacPorts to make a release for Sequoia, which might involve lots of maintainers hunting stuff like that. (If Cirrus starts forcing people to use Sequoia before then, that'd be a problem.) [1] https://cirrus-ci.com/task/4747151899623424 [2] https://cirrus-ci.com/task/6601239016767488 [3] https://github.com/cirruslabs/macos-image-templates [4] https://cirrus-runners.app/blog/2024/04/11/optimizing-startup-time-of-cirrus-runners/
Commits
-
ci: Pin MacPorts version to 2.9.3.
- 541f493dc128 15.8 landed
- daca4f1419e8 16.4 landed
- 5f03da8518ce 17.0 landed
- 64c39bd5047e 18.0 landed
-
ci: Upgrade macOS version from 13 to 14.
- 0151b4d6bdf0 15.8 landed
- 9302f6fa58ba 16.4 landed
- f8c1bb2bb90d 17.0 landed
- d01ce180d9b5 18.0 landed