Re: CI, macports, darwin version problems

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: CI, macports, darwin version problems
Date: 2024-06-27 06:32:52
Message-ID: CA+hUKGLH_f8ddssvPXD31ZYYoHRnJOqP1DC7RAXBSeZwYC2X2w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jun 26, 2024 at 4:04 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)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/

Attachment Content-Type Size
v3-0001-ci-Upgrade-macOS-version-from-13-to-14.patch text/x-patch 2.4 KB
v3-0002-ci-Find-appropriate-MacPorts-package-automaticall.patch text/x-patch 2.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ikedarintarof 2024-06-27 07:09:37 Re: doc: modify the comment in function libpqrcv_check_conninfo()
Previous Message jian he 2024-06-27 06:25:25 Re: pgsql: Add more SQL/JSON constructor functions