Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify PostgreSQL setup in Github Actions #4568

Closed
roji opened this issue Jul 21, 2022 · 7 comments · Fixed by #5632
Closed

Simplify PostgreSQL setup in Github Actions #4568

roji opened this issue Jul 21, 2022 · 7 comments · Fixed by #5632

Comments

@roji
Copy link
Member

roji commented Jul 21, 2022

Our CI builds currently download various versions of PostgreSQL and install them; this is sometimes the source of flakiness (e.g. when the EnterpriseDB Windows distribution isn't accessible) and is generally complex (e.g. download and parse an XML to find the latest EDB version). At the same time, Github Actions machine images come with a recent version of PostgreSQL pre-installed (currently 14).

We could simplify our CI as follows:

  1. Switch the Windows and MacOS builds to use the built-in PostgreSQL.
  2. Possibly switch to using Docker to get PostgreSQL on Linux.

This would mean that we continue testing all versions of PG (10-15) on Linux, but only test the latest recent (14) on Windows/MacOS; that seems like good enough coverage (there's unlikely be a bug in some version of PG which only affects non-Linux, etc.). Similarly, PostGIS may end up getting tested on Linux only (not sure if it's pre-installed on Windows/MacOS), which again seems fine.

@roji roji added this to the Backlog milestone Sep 25, 2022
@roji
Copy link
Member Author

roji commented Jun 19, 2023

We should do the first part, i.e. switch Windows/Mac to just use the PG version that comes built-in; PG 10 is no longer installable on Windows (we could also just drop it entirely but why not continue testing for Linux). In addition, the Windows installation is slow, sometimes flaky, and testing the multiple versions on Windows doesn't seem like it provides much coverage beyond doing it on Linux.

@vonzshik @Brar @NinoFloris any thoughts on this?

@vonzshik
Copy link
Contributor

We can still install pg 10 on windows, we just have to use a specific version (10.23-1) instead of relying on getting the latest version from postgresql site.

All in all, I'm ok with using the pre installed version of pg on windows/macos.

@NinoFloris
Copy link
Member

PG doesn't really have a long history of diverging behavior across OSes.

So indeed let's use linux to test compatibility of all versions with npgsql. The one version on Windows/macOS would just be there as a smoke test for cross platform compliance.

Also, officially PG 10 went out of support since the issue was opened so I wouldn't mind dropping it at all

@NinoFloris
Copy link
Member

@roji @vonzshik Are we still OK with dropping the pg version matrix on windows?

@roji
Copy link
Member Author

roji commented Mar 13, 2024

I personally am...

@vonzshik
Copy link
Contributor

I'm also OK with it.

@roji
Copy link
Member Author

roji commented Mar 17, 2024

Cool... Now we can consider doing the Linux PG via a docker service container if we want to...

There's also the testcontainer option, but I'm not sure to what extent there's enough extensibility there to allow us to configure PG exactly as we want to..

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

Successfully merging a pull request may close this issue.

3 participants