fix: rebind selected workspace before db command startup#3230
fix: rebind selected workspace before db command startup#3230julianknutsen merged 5 commits intomainfrom
Conversation
|
Tracking down some gnarly rogue dbs in gascity and I think this may be one of the culprits. |
|
Reviewed — the rebinding fix looks good and the Linux CI is solid. One blocker: Sibling test // cmd/bd/doctor_context_test.go:202
if got := selectedDoltBeadsDir(); utils.CanonicalizePath(got) != utils.CanonicalizePath(targetBeadsDir) {
t.Fatalf("selectedDoltBeadsDir() = %q, want %q", got, targetBeadsDir)
}
The |
b662a61 to
9a16b2d
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary
--dband selector env precedenceBEADS_DIRconfig isolationRoot cause
bdresolved the target workspace for DB commands too late. Global config and ambient caller state could leak into commands targeting another workspace, which let dolt server mode, auto-start settings, and config values come from the caller repo instead of the selected repo.Testing
go test ./cmd/bd -count=1make testgolangci-lint run ./cmd/bd/... ./internal/config/...Notes