fix: prevent testdb_* accumulation in production .dolt-data#2184
Closed
DreadPirateRobertz wants to merge 2 commits intogastownhall:mainfrom
Closed
fix: prevent testdb_* accumulation in production .dolt-data#2184DreadPirateRobertz wants to merge 2 commits intogastownhall:mainfrom
DreadPirateRobertz wants to merge 2 commits intogastownhall:mainfrom
Conversation
Root cause: gastown's test infrastructure blindly reuses GT_DOLT_PORT when set, including the production port 3307. beads SDK v0.56.1 (used by gastown) lacks the production port firewall that newer beads has, so tests connecting to port 3307 create testdb_* databases directly on the production Dolt server. Two-layer fix: 1. Port guard: startDoltServer() now skips GT_DOLT_PORT=3307 and always starts an isolated ephemeral server for tests. 2. Defense-in-depth: cleanProductionTestDBs() runs at test startup to remove any already-leaked testdb_*/beads_t*/doctest_* dirs from ~/gt/.dolt-data/. Fixes: gt-l98j Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Old bd init naming convention created databases with beads_<prefix> format. After migration to <rigname> convention, orphans like beads_gastown, beads_gt, etc. persisted in .dolt-data/ indefinitely. Adds targeted cleanup during EnsureRunning() that uses the existing FindOrphanedDatabases() to detect beads_* databases not referenced by any workspace's metadata.json, then removes them before the server starts serving them. Fixes: gt-7d4f Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
This PR has a merge conflict after recent merges on main. Could you rebase onto main? The change itself looks good — just needs a clean merge. |
Collaborator
|
The testutil infrastructure was significantly restructured on main ( |
steveyegge
added a commit
that referenced
this pull request
Mar 1, 2026
Auto-remove orphaned beads_* databases on Dolt server startup and replace Docker-based test containers with a local dolt sql-server using file locks for cross-process coordination. PR: #2184 Co-authored-by: Chris Deal <DreadPirateRobertz@users.noreply.github.com>
Collaborator
|
Merged via fix-merge with conflict resolution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes gt-l98j