Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix socket leak, clean up single use postgres databases#2413

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
spikecurtis merged 3 commits intomainfromspike/2347_postgres_flakes
Jun 16, 2022

Conversation

spikecurtis
Copy link
Contributor

First PR for#2347

This fixes up a socket leak in our use of Migrate.

It also introduces cleanup of single-use databases in postgres, since the postgres container outlives the test run, if we don't clean up these databases the container will continue to grow in size until it is restarted.

Lastly, this extends the timeout for postgres tests to 30 minutes. I'm seeing several minutes on my machine, and we don't want to set this aspirationally---it's a backstop for when things are going really wrong. It removes the limit of 1 parallel test per package, on the theory that the socket leak was actually the source of our CI problems. We can add parallel limits back in if the CI buckles under this pressure.

@spikecurtisspikecurtis requested a review froma teamJune 16, 2022 15:27

// MigrateUp runs SQL migrations to ensure the database schema is up-to-date.
funcMigrateUp(db*sql.DB)error {
funcMigrateUp(db*sql.DB)(retErrerror) {
Copy link
Member

Choose a reason for hiding this comment

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

Tip (non-blocking): It would be OK to call thiserr, at the timedefer func runs, the value oferr would be that of thereturn statement.

Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtisspikecurtis merged commita82c0eb intomainJun 16, 2022
@spikecurtisspikecurtis deleted the spike/2347_postgres_flakes branchJune 16, 2022 16:01
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mafredrimafredrimafredri approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

@kylecarbskylecarbskylecarbs approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@spikecurtis@mafredri@johnstcn@kylecarbs

[8]ページ先頭

©2009-2025 Movatter.jp