Skip to content

fix: fall back to provider state when managed dolt is unpublished#1766

Open
azanar wants to merge 1 commit intogastownhall:mainfrom
azanar:upstream-main-fix-provider-state-fallback
Open

fix: fall back to provider state when managed dolt is unpublished#1766
azanar wants to merge 1 commit intogastownhall:mainfrom
azanar:upstream-main-fix-provider-state-fallback

Conversation

@azanar
Copy link
Copy Markdown
Contributor

@azanar azanar commented May 6, 2026

Summary

This teaches GC-managed Dolt target resolution to fall back to valid provider runtime state when the published managed-Dolt state file is still missing.

What changed

  • add currentResolvableManagedDoltPort() to prefer published runtime state but fall back to valid provider runtime state
  • allow resolvedRuntimeCityDoltTarget() to use that provider-state port during recovery when the canonical managed target is still unpublished
  • cover the gap with a focused regression test

Why

There is a startup window where managed Dolt is already running and provider state is valid, but the published runtime state file is not present yet. During that window, GC-managed startup paths could still resolve a local managed target without a port and fall through to 127.0.0.1:0 failures.

This keeps the target resolution aligned with the real managed runtime state during that gap.

Tests

  • go test ./cmd/gc -run 'TestBdRuntimeEnv(DoesNotUseStalePortFileWithoutManagedRuntimeState|UsesValidProviderStateWhenPublishedStateIsMissing)' -count=1

View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

@azanar azanar requested a review from julianknutsen as a code owner May 6, 2026 22:40
@github-actions github-actions Bot added the status/needs-triage Inbox — we haven't looked at it yet label May 6, 2026
@randy-release-manager randy-release-manager Bot added kind/bug Broken behavior priority/p1 High — core workflow broken and removed status/needs-triage Inbox — we haven't looked at it yet labels May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Broken behavior priority/p1 High — core workflow broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant