Skip to content

testing: Add a system-provided postgres for testing #8323

New issue

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

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

Already on GitHub? # to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

cdecker
Copy link
Member

@cdecker cdecker commented Jun 6, 2025

  • testing: Add a system-postgres mode for faster testing

Postgres can be slow to spin up and down clusters for each test. This
patch allows us to just test against an externally managed postgres
instance. This is particularly interesting in CI, where we can run a
postgres service in a separate container.

The provider still uses nonce-based multitenancy. It tries to clean
up, but it can fail if a test gets interrupted or teardown fails.

Checklist

Before submitting the PR, ensure the following tasks are completed. If an item is not applicable to your PR, please mark it as checked:

  • The changelog has been updated in the relevant commit(s) according to the guidelines.
  • [-] Tests have been added or modified to reflect the changes.
  • [-] Documentation has been reviewed and updated as needed.
  • Related issues have been listed and linked, including any that this PR closes.

Changelog-None

@cdecker cdecker force-pushed the 202506-system-postgres branch 4 times, most recently from c1fbeef to 4841a58 Compare June 12, 2025 12:33
Postgres can be slow to spin up and down clusters for each test. This
patch allows us to just test against an externally managed postgres
instance. This is particularly interesting in CI, where we can run a
postgres service in a separate container.

The provider still uses nonce-based multitenancy. It tries to clean
up, but it can fail if a test gets interrupted or teardown fails.
@cdecker cdecker force-pushed the 202506-system-postgres branch from 0de761a to 59d8e65 Compare June 12, 2025 13:43
@cdecker
Copy link
Member Author

cdecker commented Jun 12, 2025

I am having a bit of trouble with the separate postgres service running out of disk space. I am trying a couple of things, but maybe this will be kept as a sped up developer option, rather than running it in CI.

cdecker added 3 commits June 12, 2025 16:22
Running against a `system-postgres` can cause the disk to fill
up. Cleaning up some more space hopefully makes them work
again. Technically the postgres DBs are deleted after the test,
however that may be delayed, and many nodes in parallel will cause the
disk to fill up.
@cdecker cdecker force-pushed the 202506-system-postgres branch from 59d8e65 to f825602 Compare June 12, 2025 14:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant