Re: ci: Follow-up CI patches

From: Andres Freund <andres(at)anarazel(dot)de>
To: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Subject: Re: ci: Follow-up CI patches
Date: 2026-11-05 19:29:41
Message-ID: phhtcfs6urwclaluudo55gzr7bnpt2mnv6helbrgcfjksv4yqs@ia3thcijffai
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-11-04 09:36:03 -0500, Andres Freund wrote:
> Peter, after all of this, I'd like to backpatch CI back to where we used to
> have CI support. One of the things that makes that slightly more painful is
> that there already are divergences between 19 and master. I'd like to
> backport
>
> 2026-10-25 4075409de08 ci: Enable PCH in mingw cross job
> 2026-10-25 3ca57291ff3 ci: Convert CompilerWarnings job to meson
>
> to 19, to keep the divergences smaller.

> I think
> 2026-10-19 0f3b42ce806 Add missing dependencies to meson headerscheck target
>
> ought to be in 19 regardless of anything, given that meson headerscheck was
> added to 19?

I'll do those backpatches in the next hour, unless somebody protests soon.

> > @@ -154,7 +148,8 @@ jobs:
> > warn-if-not-opted-in:
> > name: Report if not opted into CI
> > if: ${{vars.PG_CI_ENABLED != '1'}}
> > - runs-on: ubuntu-slim
> > + # See the setup task for an explanation
> > + runs-on: ${{ case(vars.PG_CI_RUNS_ON_SETUP != '', vars.PG_CI_RUNS_ON_SETUP, 'ubuntu-slim') }}
> > steps:
> > - name: Warn
> > env:
> > ...
> > + runs_on_linux: ${{ case(vars.PG_CI_RUNS_ON_LINUX != '', vars.PG_CI_RUNS_ON_LINUX, 'ubuntu-24.04') }}
>
> I'd love if there were a neater way to do this, but I don't know of any :(.
>
> I'll play around with it to see if I can come up with something neater,
> particularly the repetition of the variable name is annoying.

It turns out one can just do ${{ vars.PG_CI_RUNS_ON_LINUX || 'ubuntu-24.04' }}.
Not super well documented, but looks to be fairly widely used. Think that's a
good bit neater.

Also worked on making the image: simpler. There's now one format() template
(still a long line), but the individual tasks now are
- image: ${{ needs.setup.outputs.container_linux_ci_base }}/linux-autoconf:${{ needs.setup.outputs.container_tag }}
+ image: ${{ format(needs.setup.outputs.container_image, 'linux-autoconf') }}

which seems a lot easier to read to me.

Here's a mildly polished version:

- Adoped the simpler runs-on: and image: formulations

- An AI review raised the following, which I addressed:

- location: ${{github.workspace}} is suboptimal, because it means that the
directory will be searched for logs in case of a failure. Testing shows
that setup-msys2 will pick a sane directory, so I think just not
specifying a directory makes sense

- CHERE_INVOKING is now obsolete

- The socket dir could end up with a too long path. I don't entirely remember
how I ended up with the previous formulation, I think it had to do with
issues around the paths in the container being different than outside.
The new formulation of just creating it in the container seemed better

- added the discussion links, dropped references, as mentioned in my earlier
email

What do you think?

Greetings,

Andres Freund

Attachment Content-Type Size
v15a-0001-ci-Get-build-test-concurrency-from-environment.patch text/x-diff 5.4 KB
v15a-0002-ci-Make-msys2-install-smaller.patch text/x-diff 2.0 KB
v15a-0003-ci-Use-setup-msys2-instead-of-relocating-preins.patch text/x-diff 5.6 KB
v15a-0004-ci-Make-runs-on-overridable.patch text/x-diff 10.1 KB
v15a-0005-ci-Move-to-per-job-naming-for-containers.patch text/x-diff 5.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ayoub Kazar 2026-11-05 19:32:50 Re: Fix DEFAULT marker handling in COPY FROM ... HEADER MATCH
Previous Message Greg Burd 2026-11-05 19:15:11 Re: [RFC] Property-based testing for Postgres