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

From Nazir Bilal Yavuz
Subject Upload only the failed tests logs to the Postgres CI (Cirrus CI)
Date
Msg-id CAN55FZ24VXAJPnN+LgEw-MSgA2AnoURA2Eo6DF1MfZUah0=8XA@mail.gmail.com
Whole thread
Responses Re: Upload only the failed tests logs to the Postgres CI (Cirrus CI)
List pgsql-hackers
Hi,

Currently, all test logs are uploaded to Postgres CI regardless of
whether the tests pass or fail. This approach has a few drawbacks:

- It can be difficult to identify failed tests quickly. You need to
remember which tests failed and then locate them within the CI
artifacts, which often requires scrolling and can be frustrating.

- Uploading all test logs adds unnecessary overhead. For example,
uploading artifacts when only a single test fails takes approximately
300 seconds on macOS and 70 seconds on other CI platforms [1].

- There may also be associated storage or transfer costs, although I
am not certain about this.

To improve this, I propose removing the output folders of successful
tests before uploading artifacts. In Meson builds, a 'test.success'
file is created in the test output directory when a test passes. I
have written a Python script that traverses these directories and
removes those directories which contain this file. At the moment, this
solution only applies to Meson builds, since the test.success file is
not generated in the Autoconf build system.

I would appreciate any thoughts or feedback on this approach.

Note: Currently NetBSD is failing with: 'env: python3: No such file or
directory', this can be fixed separately but I wanted to hear your
thoughts first.

Example CI Run after the patch is applied and CI is intentionally
broken to show how patch works:
https://cirrus-ci.com/build/6514731441192960


[1] https://cirrus-ci.com/build/6045972905590784

-- 
Regards,
Nazir Bilal Yavuz
Microsoft

Attachment

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: EXPLAIN: showing ReadStream / prefetch stats
Next
From: Andrew Jackson
Date:
Subject: Re: Add ldapservice connection parameter