carlos / platform Public

console: instances health degrades on a console with no registry

Opening "" hands sqlite a throwaway temp database and answers the same
"Setting up" a page later, having created a file to do it. A console with
no registry configured simply cannot know any route's state — say so up
front, the same way every other failure in this helper degrades.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 0958fa361d7d9173893e396fc905a56505ea358a parent 6330f32
1 file changed, +6 −0
  • internal/console/apiinstances.go +6 −0
diff --git a/internal/console/apiinstances.go b/internal/console/apiinstances.go
index 59c25f09f..52e72dc27 100644
--- a/internal/console/apiinstances.go
+++ b/internal/console/apiinstances.go
@@ -204,6 +204,12 @@ func (s *Server) instanceHealth(ctx context.Context, recs []provision.Record) ma
for _, rec := range recs {
out[rec.Host] = "Setting up"
}
+ if s.cfg.Registry == "" {
+ // A console with no registry configured cannot know any route's
+ // state; opening "" would hand sqlite a throwaway temp DB and answer
+ // the same "Setting up" a page later, having created a file for it.
+ return out
+ }
reg, err := openRegistry(s.cfg.Registry)
if err != nil {
log.Printf("console: api instances health: registry %s: %v", s.cfg.Registry, err)