fix: fail doctor when shared Dolt rig databases are missing#3449
Open
Bella-Giraffety wants to merge 4 commits intogastownhall:mainfrom
Open
fix: fail doctor when shared Dolt rig databases are missing#3449Bella-Giraffety wants to merge 4 commits intogastownhall:mainfrom
Bella-Giraffety wants to merge 4 commits intogastownhall:mainfrom
Conversation
Author
|
Rebuilt this PR on a clean upstream main base and force-pushed it so it now contains only the doctor shared-Dolt database verification change and its focused tests. |
6a5eb2d to
e4f194f
Compare
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.
Summary
dolt-server-reachableverify expected server-mode databases instead of treating a listening TCP socket as healthydolt_databasediffers from the rig nameRelated Issue
gs-635Changes
internal/doctor/migration_check.goso the doctor reachability check:VerifyExpectedDatabasesAtConfigininternal/doltserver/doltserver.goso doctor can check a specific configured server address without relying on the town default Dolt configinternal/doctor/migration_check_test.gofor:Bug
During the coder_dotfiles bootstrap investigation,
gt doctorcould report shared Dolt as healthy as soon as the socket accepted connections even when one or more configured rig databases were absent or unreadable. That hid the real failure mode: HQ looked reachable, but the rig database needed by the town was missing from the running server.Why this fix
The smallest safe fix is to keep the change inside the existing doctor reachability check and reuse explicit
SHOW DATABASESverification against the server address declared by rig metadata. This avoids broad startup or repair changes while making the health signal honest for the exact failure we reproduced.Testing
Focused command run:
GOTOOLCHAIN=auto go test ./internal/doctor -run 'TestDoltServerReachableCheck|TestGetServerAddr'Regression cases added:
TestDoltServerReachableCheck_FailsWhenExpectedRigDatabaseMissingTestDoltServerReachableCheck_FailsWhenDatabaseVerificationErrorsTestDoltServerReachableCheck_UsesConfiguredDatabaseNameNotRigNameTestGetServerAddr_UsesConfigYAMLPortReview process
This branch was reviewed in five independent passes before implementation and five more passes against the implementation branch. The final patch incorporates review findings about:
dolt_database != rig nameChecklist