Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: use container with Postgres 13 for dump.sql #15411

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

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

hugodutka
Copy link
Contributor

@hugodutka hugodutka commented Nov 6, 2024

Changes from #15336 made the coderd/database/gen/dump/main.go script used by make gen connect to the Postgres container running at localhost:5432 if it was available. Previously a new Postgres 13 container would be created every time.

This is annoying during development - if you're running a Postgres 16 container in the background you'll get a different dump.sql than with Postgres 13. This PR reverts the script to create a fresh Postgres 13 container on each run.

@hugodutka hugodutka changed the title fix: open container with Postgres 13 for dump.sql fix: use container with Postgres 13 for dump.sql Nov 6, 2024
@hugodutka hugodutka marked this pull request as ready for review November 6, 2024 17:01
@hugodutka hugodutka requested a review from Emyrk November 6, 2024 17:01
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

Does this kill the PG 16 db?

@hugodutka
Copy link
Contributor Author

Does this kill the PG 16 db?

It only starts a new pg 13 container on a random port and then cleans it up. Doesn't affect other containers.

@hugodutka hugodutka merged commit f85ef84 into main Nov 7, 2024
42 checks passed
@hugodutka hugodutka deleted the hugodutka/containerized-dbgen branch November 7, 2024 15:49
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