fix: HA checks resolve service targets over project network; persist checks

- Health checks for local services dialed 127.0.0.1 from inside the backend
  container — the host's published port is unreachable there. Service-bound
  checks now resolve the service's DNS name on its project network (backend
  joins on demand), falling back to the service's stored port. A resolver
  failure surfaces as TARGET_UNRESOLVED instead of a fake loopback probe.
- Checks lived only in memory: a backend restart silently deleted every
  configured health check. ha_health_checks table + write-through on
  add/update/tick and hydrate-on-boot, matching the scaling-policy pattern.
- sqlc schema.sql gained the runtime columns added by later migrations —
  the stale snapshot already caused one silently-dropped-column bug.
- OpenAPI: runtime response now documents ports and health fields; types
  regenerated.
- Buttons no longer wrap ("+ new project" rendered on two lines).

Verified live: service check probes whoami-web:80 via DNS → healthy;
check survives a backend restart and rehydrates.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-10-04 09:31:53 +02:00
1 parent 32b52d121f
commit f1543120fb
8 files changed
+216 -21

No files matched your search

+8
View File
@@ -637,7 +637,15 @@ export interface paths {
desired?: number;
/** @enum {string} */
status?: "running" | "degraded" | "stopped";
/** @description Reachable service URLs; rewritten to the request Host for remote clients. Null/empty when nothing is published. */
urls?: string[];
/** @description Host ports actually bound for replica 0+; persisted on the service so restarts reuse the same public port. Null/empty when nothing is published. */
ports?: number[];
/**
* @description Result of the backend's HTTP probe of the service on its project network. Omitted when the service declares no healthcheck path.
* @enum {string}
*/
health?: "healthy" | "unhealthy" | "unreachable";
containers?: {
id?: string;
name?: string;
+2
View File
@@ -1523,6 +1523,7 @@ textarea {
background: var(--accent-primary); color: var(--accent-on);
border: none; border-radius: 8px; padding: 9px 17px;
font: 700 12px 'JetBrains Mono', monospace; cursor: pointer;
white-space: nowrap; flex-shrink: 0;
transition: background 0.15s, transform 0.15s;
box-shadow: 0 2px 12px rgba(180, 227, 74, 0.22);
}
@@ -1534,6 +1535,7 @@ textarea {
background: var(--surface-card); color: var(--text-secondary);
border: 1px solid var(--border-subtle); border-radius: 8px; padding: 8px 16px;
font: 600 12px 'JetBrains Mono', monospace; cursor: pointer; transition: 0.15s;
white-space: nowrap; flex-shrink: 0;
}
.v-btn-ghost:hover { color: var(--text-primary); border-color: var(--border-default); }