Skip to content

PG-2189 Rewrite CI pipelines#620

Open
artemgavrilov wants to merge 1 commit intomainfrom
PG-2189-rewrite-ci
Open

PG-2189 Rewrite CI pipelines#620
artemgavrilov wants to merge 1 commit intomainfrom
PG-2189-rewrite-ci

Conversation

@artemgavrilov
Copy link
Contributor

@artemgavrilov artemgavrilov commented Feb 12, 2026

PG-2189

Description

This PR rewrites CI workflows in a way that we use in pg_tde repo.

  1. Covers PGDG and PPG compatibility for versions 14-18
  2. Covers MacOS compatibility
  3. Covers ARM compatibility (only on main branch)
  4. Checks C files formatting
  5. Checks Perl files fromatting (temporary disabled, will enable in following PR)
  6. Checks license
  7. Collects code coverage
  8. Sanitizers workflow added, but disabled as it has some performance issues. See: https://perconadev.atlassian.net/browse/PG-2243

All code was formatted according to latest pgindent and pgperltidy.

Links

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.96%. Comparing base (769e34e) to head (ce18304).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #620      +/-   ##
==========================================
+ Coverage   85.28%   85.96%   +0.67%     
==========================================
  Files           3        3              
  Lines        1339     1354      +15     
  Branches      217      218       +1     
==========================================
+ Hits         1142     1164      +22     
+ Misses         93       90       -3     
+ Partials      104      100       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@artemgavrilov artemgavrilov marked this pull request as ready for review March 9, 2026 13:05
@AndersAstrand
Copy link
Contributor

AndersAstrand commented Mar 9, 2026

Hmm... the Makefile uses typedefs.list and the dump-typedefs.sh script expects a postgres with the correct scripts at ../postgres/

I don't think this is a reasonable expectation for an extension. It's fine to assume in the ci scripts i guess, but they should be moved to somewhere under .github/ to clearly signify that they are not for general use.

If we no longer want make update-typedefs to work we should remove it. I would prefer if it still worked however.

(Also I think you didn't mean to commit results/ 🙂 )

I think you should break out the format changes to a separate PR.

@artemgavrilov artemgavrilov force-pushed the PG-2189-rewrite-ci branch 3 times, most recently from 491fefc to 379889f Compare March 9, 2026 17:07
@artemgavrilov
Copy link
Contributor Author

Hmm... the Makefile uses typedefs.list and the dump-typedefs.sh script expects a postgres with the correct scripts at ../postgres/

This is how it's done in pg_tde and I tried to keep things as close as possible. So to make formatting work you need actually both. dump-typedefs.sh creates type defenitions file to PGSM sources and update-typedefs mixes it with PG definitions.

I don't think this is a reasonable expectation for an extension. It's fine to assume in the ci scripts i guess, but they should be moved to somewhere under .github/ to clearly signify that they are not for general use.

Agree, I wanted to suggest this change, but decided that it will be too much for this PR. Changed.

(Also I think you didn't mean to commit results/ 🙂 )

No comments 🤦. Cleaned.

I think you should break out the format changes to a separate PR.

Together with related CI workflows or just formatting?

@AndersAstrand
Copy link
Contributor

AndersAstrand commented Mar 10, 2026

Hmm... the Makefile uses typedefs.list and the dump-typedefs.sh script expects a postgres with the correct scripts at ../postgres/

This is how it's done in pg_tde and I tried to keep things as close as possible. So to make formatting work you need actually both. dump-typedefs.sh creates type defenitions file to PGSM sources and update-typedefs mixes it with PG definitions.

pg_tde has a quite different intended audience though. pg_stat_monitor is a generic postgres plugin so very little should be assumed about the setup of whoever clones the repo imho. pg_tde is a psp plugin so the audience for that development setup is only the people working with psp.

That said, I think it's fine to move the script to under .github and remove the target from the Makefile.

Together with related CI workflows or just formatting?
I think only formatting is fine. Add the missing typedef to the list and such so that it passes the existing CI.

Rewrite CI pipelines to match CI setup in pg_tde repository.
Calls
Counters
ErrorInfo
HistogramTimingType
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept this file to prevent code formating workflow fail. Will remove it in favor of auto-generated in following PR.

Comment on lines +46 to +47
# - name: Run pgperltidy
# run: src/.github/scripts/run-pgperltidy.sh --assert-tidy --standard-error-output
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabled to prevent perl files format failure. Will enable it in following PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants