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

Remove postgres service for Github Action #899

Closed
jtwalsh0 opened this issue Jun 5, 2022 · 3 comments
Closed

Remove postgres service for Github Action #899

jtwalsh0 opened this issue Jun 5, 2022 · 3 comments
Assignees

Comments

@jtwalsh0
Copy link
Member

jtwalsh0 commented Jun 5, 2022

The postgres service in the github test suite is unnecessary:

services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

testing.postgresql initializes a local database. The service is created but goes unused.

I ran test.yaml without the service and it still passed: https://github.com/jtwalsh0/triage/actions/runs/2443440699

@jtwalsh0 jtwalsh0 self-assigned this Jun 5, 2022
rayidghani added a commit that referenced this issue Feb 22, 2023
…-test-runner

Remove postgres service from github action [Resolves #899]
@thcrock
Copy link
Contributor

thcrock commented Feb 24, 2023

I'm surprised this works. testing.postgresql doesn't install Postgres; it expects to interface with a Postgres server that already exists. I would find it surprising for the base image to come with a server that is auto started. If this continues to work, well, that's fine, but I don't think it's out of a question that a change like this would initially work due to how CI's tend to cache the build environment but then later fail when the cache expires

@jtwalsh0
Copy link
Member Author

@jtwalsh0
Copy link
Member Author

I think the biggest reason the tests take so long is that every call to testing.postgresql.Postgresql initiates a db cluster.

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

No branches or pull requests

2 participants