Skip to content

Conversation

@aemerson
Copy link
Contributor

If postgresql isn't installed on the test machine this test fails
during the attempt to build the psycopg2 package with error:
Error: pg_config executable not found.

If postgresql isn't installed on the test machine this test fails
during the attempt to build the psycopg2 package with error:
Error: pg_config executable not found.
@aemerson aemerson requested a review from ldionne October 22, 2025 06:36
@ldionne
Copy link
Member

ldionne commented Oct 22, 2025

I think this makes sense for now, but in fact I was thinking about requiring postgres in order to run the tests. That way we'd always ensure that we run all the tests. Do you have an opinion about that?

@ldionne ldionne merged commit 2b1e74f into main Oct 22, 2025
15 checks passed
@ldionne ldionne deleted the users/amara/psycopg2-fix branch October 22, 2025 12:59
@aemerson
Copy link
Contributor Author

I think this makes sense for now, but in fact I was thinking about requiring postgres in order to run the tests. That way we'd always ensure that we run all the tests. Do you have an opinion about that?

I don't have a strong opinion, but postgresql is quite a heavy dependency when lnt uses sqlite by default isn't it? There's also a binary package that I tested fixes this issue too, psycopg2-binary but it's only suggested for dev/testing and not for production. Maybe we could somehow use that for tests.

@ldionne
Copy link
Member

ldionne commented Oct 24, 2025

I think this makes sense for now, but in fact I was thinking about requiring postgres in order to run the tests. That way we'd always ensure that we run all the tests. Do you have an opinion about that?

I don't have a strong opinion, but postgresql is quite a heavy dependency when lnt uses sqlite by default isn't it? There's also a binary package that I tested fixes this issue too, psycopg2-binary but it's only suggested for dev/testing and not for production. Maybe we could somehow use that for tests.

I ended up not requiring postgres all the time, but instead detecting whether it's installed and automatically enabling the tests in that case. And we now have coverage with Github actions that have (and don't have) Postgres installed.

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.

3 participants