-
released this
2026-04-27 09:09:50 -04:00 | 138 commits to main since this releaseSummary
Daily ~17:00 UTC
Publish Endpoint LatencyandAvailability < 95%
alerts are caused by both registry pods exit-0'ing within seconds of
each other and racing with the still-recoveringregistry-pg-rw
endpoint on restart. Separately, the default compute SA had no project
IAM roles, sofluentbit-gkeand the GMP collector were silently
dropping every log line and time series — which is why none of this was
visible in Cloud Logging.All Kubernetes/IAM changes apply uniformly to staging and prod.
Changes
- GCP IAM (
deploy/pkg/providers/gcp/provider.go) — grant the
default compute SAlogging.logWriter,monitoring.metricWriter,
monitoring.viewer, andstackdriver.resourceMetadata.writer. Already
applied live; this just encodes it in Pulumi. - Pod resilience (
deploy/pkg/k8s/registry.go) — PodDisruptionBudget(minAvailable: 1) prevents a synchronized
voluntary disruption.TopologySpreadConstraints(ScheduleAnyway, hostname) keeps the PDB
from deadlocking node drains when both pods co-locate.StartupProbe(30 × 5s = 150s) protects the DB-retry budget from the
liveness probe.- Memory bump 128→256Mi request, 256→512Mi limit.
- Startup retry (
cmd/registry/main.go) — replace silentreturn
on initial DB-ping failure with bounded retry-with-backoff (8 attempts,
1→8s capped, 10s per-attempt). A brief endpoint flap no longer cascades
into a restart loop. - Diagnostic log (
internal/service/registry_service.go) — emit
validate_mson each publish (success and failure). Validate fans out
to npm/PyPI/OCI with 10s per-host timeouts and is the most likely
contributor to publish latency. Total request duration is already
covered by the existinghttp.request.durationhistogram.
Calibration
The IAM, PDB, topology-spread, startup-probe, and DB-retry pieces are
mitigations — they reduce blast radius regardless of root cause. The
validate_mslog is the diagnostic for identifying the trigger when the
alert fires next. Single-PG SPOF (deploy/pkg/k8s/postgres.go:57)
remains a follow-up; today's evidence shows PG was a victim, not the
cause.Test plan
go build ./...andgo vet ./...clean for both modulesmake lintclean (12 pre-existing issues underdeploy/are not
inmake lint)go test -race -count=1 ./internal/... ./cmd/...green- IAM applied live;
fluentbit-gkeand GMP no longer hitting
IAM_PERMISSION_DENIED - After deploy, verify the next 17:00 UTC firing surfaces
validate_msin Cloud Logging
🤖 Generated with Claude Code
Co-authored-by: Claude Opus 4.7 (1M context) noreply@anthropic.com
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
0 downloads
- GCP IAM (