Re: Upload only the failed tests logs to the Postgres CI (Cirrus CI) - Mailing list pgsql-hackers

From Nazir Bilal Yavuz
Subject Re: Upload only the failed tests logs to the Postgres CI (Cirrus CI)
Date
Msg-id CAN55FZ33vfTqM8zySpz_WdnLd=eFROodLB9z4XLuCMaMdNGRww@mail.gmail.com
Whole thread
In response to Re: Upload only the failed tests logs to the Postgres CI (Cirrus CI)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Hi,

Thank you for looking into this!

On Mon, 8 Jun 2026 at 18:10, Andres Freund <andres@anarazel.de> wrote:
>
> On 2026-06-05 15:23:52 +0300, Nazir Bilal Yavuz wrote:
> > I implemented it as another step which will run if the job fails.
> > Alternatively, we can put 'the clearing command' into the
> > meson_test_world step, this makes the change simpler but then this
> > command will run although tests don't fail.
>
> I think it's the right thing to have it as a dedicated step. That way it can
> work with things like the running tests etc as well.
>
>
> >
> > +      # Clear test folder so only failed tests are left
>
> FWIW, I'd much rather see this copy the to-be-archived logs to a different
> location, instead of removing the unneeded logs.

Should we upload these logs too? If so, perhaps we can have something like:

build/testrun/successful_tests/*
build/testrun/failed_tests/*

Do you think this makes sense?


> > +      - &clear_test_folder_step
> > +        name: Clear test folder
> > +        if: failure() && !cancelled()
> > +        run: |
> > +          meson compile clear_testrun_folder -C build
>
> I don't think I see what we gain from invoking this via meson compile, given
> that we invoke ninja directly elsewhere.  Not that that's going to make the
> difference, but meson compile, which internally invokes ninja, is noticeably
> slower than going through ninja directly.

I got it, I will change this.


> But I suspect this shouldn't be integrated into the build system directly, as
> I think we should eventually make this work for autoconf as well.

There were couple of reasons:

1- That was easy to implement for meson build because we have a
'test.success' file for the successful tests, AFAIK we don't have a
similar thing for the autoconf.

2- python3 was not available on the PATH for some OSes, so I
indirectly used python3 from the meson.

-- 
Regards,
Nazir Bilal Yavuz
Microsoft



pgsql-hackers by date:

Previous
From: Álvaro Herrera
Date:
Subject: Re: Logging parallel worker draught
Next
From: Sami Imseih
Date:
Subject: Re: Report oldest xmin source when autovacuum cannot remove tuples