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

chore: add broker for test databases#19791

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

Closed
spikecurtis wants to merge1 commit intomainfromspike/internal-927-dbtestbroker

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedSep 12, 2025
edited
Loading

Adds a new test database broker, that runs in a subprocess, to clone test databases.

relates tocoder/internal#927

Moving to a subprocess allows us to still clean up the test databases if the main test process dies (panics, times out, or is killed). We communicate with the subprocess over dRPC over yamux over stdio. When the main test process dies, the stdin pipe is closed, which triggers the broker to clean up any databases it cloned that were not explicitly discarded.

@spikecurtisGraphite App
Copy link
ContributorAuthor

spikecurtis commentedSep 12, 2025
edited
Loading


func NewClient() (client *Client, err error) {
client = &Client{
cmd: exec.Command("go", "run", "github.com/coder/coder/v2/cmd/dbtestbroker"),
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

This breaks if you are outside the directory tree of the repo, but I think that's pretty rare.

Still, in the PR above this on the stack I had to move some code around in templatepull_test.go

@spikecurtisspikecurtisforce-pushed thespike/internal-927-dbtestbroker branch 3 times, most recently from0758e24 toa7e3c5dCompareSeptember 12, 2025 11:51
@spikecurtisspikecurtisforce-pushed thespike/internal-927-dbtestbroker branch froma7e3c5d to9191ef7CompareSeptember 12, 2025 11:57
@spikecurtisspikecurtis marked this pull request as ready for reviewSeptember 12, 2025 11:58
@spikecurtis
Copy link
ContributorAuthor

closing in favor of stack at#19844

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 18, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@deansheatherdeansheatherAwaiting requested review from deansheather

Assignees

@spikecurtisspikecurtis

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@spikecurtis

[8]ページ先頭

©2009-2025 Movatter.jp