Re: CI and test improvements

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Noah Misch <noah(at)leadboat(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Anastasia Lubennikova <lubennikovaav(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: CI and test improvements
Date: 2022-09-10 20:05:42
Message-ID: 20220910200542.GX31833@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Aug 28, 2022 at 02:28:02PM -0700, Andres Freund wrote:
> On 2022-08-28 12:10:29 -0500, Justin Pryzby wrote:
> > On Sun, Aug 28, 2022 at 09:07:52AM -0700, Andres Freund wrote:
> > > > --- /dev/null
> > > > +++ b/src/tools/ci/windows-compiler-warnings
> > >
> > > Wouldn't that be doable as something like
> > > sh -c 'if test -s file; then cat file;exit 1; fi"
> > > inside .cirrus.yml?
> >
> > I had written it inline in a couple ways, like
> > - sh -exc 'f=msbuild.warn.log; if [ -s "$f" ]; then cat "$f"; exit 1; else exit 0; fi'
> >
> > but then separated it out as you suggested in
> > 20220227010908(dot)vz2a7dmfzgwg742w(at)alap3(dot)anarazel(dot)de
> >
> > after I complained about cmd.exe requiring escaping for && and ||
> > That makes writing any shell script a bit perilous and a separate script
> > seems better.
>
> I remember that I suggested it - but note that the way I wrote above doesn't
> have anything needing escaping.

It doesn't require it, but that still gives the impression that it's
normally possible to write one-liner shell scripts there, which is
misleading/wrong, and the reason why I took your suggestion to use a
separate script file.

> Anyway, what do you think of the multiline split I suggested?

Done, and sorted.

> That's what should have been in the commit message.

Sure. I copied into the commit message the explanation that I had
written in June's email.

> > > > xi-os-only: freebsd
> > >
> > > Typo.
> >
> > No - it's deliberate so I can switch to and from "everything" to "this
> > only".
>
> I don't see the point in posting patches to be applied if they contain lots of
> such things that a potential committer would need to catch and include a lot
> of of fixup patches.

I get that you disliked that I disabled the effect of a CI tag by
munging "c" to "x". I've amended the message to avoid confusion. But,
lots of what such things ? "ci-os-only" would be removed before being
pushed anyway.

"catching things" is the first part of the review process, which (as I
understand) is intended to help patch authors to improve their patches.
If you found lots of problems in my patches, I'd need to know about
them; but most of what I heard seem like quibbles about the presentation
of the patches. It's true that some parts are dirty/unclear, and that
seems reasonable for patches most of which haven't yet received review,
for which I asked whether to pursue the patch at all, and how best to
present them. This is (or could be) an opportunity to make
improvements.

I renamed the two, related patches to Cluser.pm which said "f!", which
are deliberately separate but looked like "fixup" patches. Are you
interested in any combination of those three, related changes to move
logic from Makefile to perl ? If not, we don't need to debate the
merits of spliting the patch.

What about the three, related changes for ccache compression ?

Should these be dropped in favour of meson ?
- cirrus/vcregress: test modules/contrib with NO_INSTALLCHECK=1
- vcregress: add alltaptests

I added: "WIP: skip building if only docs have changed"

changesInclude() didn't seem to work right when I first tried to use it.
Eventually, I realized that it seems to use something like "git log",
and not "git diff" (as I'd thought). It seems to work fine now that I
know what to expect.

git commit --amend --no-edit
git diff --stat @{1}(dot)(dot)(at){0} # this outputs nothing
git log --stat @{1}(dot)(dot)(at){0} # this lists the files changed by the tip commit

It'd be nice to be have cfbot inject this patch into each commitfest
patch for awhile, to make sure everything works as expected. Same for
the code coverage patch and the doc artifacts patch. (These patches
currently assume that the base commit is HEAD~1, which is correct for
cfbot, and that would also provide code coverage and docs until such
time as cfbot is updated to apply and preserve the original series of
patches).

--
Justin

Attachment Content-Type Size
0001-cirrus-windows-add-compiler_warnings_script.patch text/x-diff 2.6 KB
0002-cirrus-vcregress-test-modules-contrib-with-NO_INSTAL.patch text/x-diff 8.2 KB
0003-cirrus-ccache-disable-compression-and-show-stats.patch text/x-diff 4.8 KB
0004-cirrus-ccache-add-explicit-cache-keys.patch text/x-diff 1.5 KB
0005-cirrus-enable-various-runtime-checks-on-macos-and-fr.patch text/x-diff 1.8 KB
0006-cirrus-freebsd-run-build-check-in-a-make-vpath.patch text/x-diff 1.4 KB
0007-cirrus-freebsd-run-with-more-CPUs-RAM-and-do-not-rep.patch text/x-diff 1.9 KB
0008-cirrus-linux-compile-with-fsanitize.patch text/x-diff 2.1 KB
0009-vcregress-add-alltaptests.patch text/x-diff 5.1 KB
0010-tmp-run-tap-tests-first.patch text/x-diff 1.2 KB
0011-set-TESTDIR-from-src-test-perl-rather-than-Makefile-.patch text/x-diff 4.2 KB
0012-.also-set-PATH.patch text/x-diff 3.2 KB
0013-.and-chdir.patch text/x-diff 4.0 KB
0014-vcregress-run-alltaptests-in-parallel.patch text/x-diff 2.9 KB
0015-another-way-to-install-uri_regress-testclient.patch text/x-diff 3.9 KB
0016-Move-libpq_pipeline-test-into-src-interfaces-libpq.patch text/x-diff 9.4 KB
0017-cirrus-code-coverage.patch text/x-diff 3.3 KB
0018-cirrus-build-docs-as-a-separate-task.patch text/x-diff 2.2 KB
0019-cirrus-upload-changed-html-docs-as-artifacts.patch text/x-diff 2.8 KB
0020-html-index-file.patch text/x-diff 3.3 KB
0021-cirrus-warnings-use-.-configure-cache-in-headerschec.patch text/x-diff 1.1 KB
0022-cirrus-warnings-move-use-a-single-common-always-bloc.patch text/x-diff 3.6 KB
0023-WIP-skip-building-if-only-docs-have-changed.patch text/x-diff 991 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2022-09-10 20:12:03 Re: Schema variables - new implementation for Postgres 15
Previous Message Tom Lane 2022-09-10 19:35:05 Re: Splitting up guc.c