Upload only the failed tests logs to the Postgres CI (Cirrus CI)
Nazir Bilal Yavuz <byavuz81@gmail.com>
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-07T16:18:49Z
Lists: pgsql-hackers
Attachments
- v1-0001-ci-Don-t-collect-successful-tests-logs.patch (text/x-patch) patch v1-0001
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