From dc318048213d7abe658b395e2e17daa9c568e2ee Mon Sep 17 00:00:00 2001 From: Sam Calder-Mason Date: Mon, 22 Jun 2026 16:02:10 +1000 Subject: [PATCH] fix(bounds-seeder): target clickhouse namespace + cbt-redis after raw migration The external-bounds seeder pulled production bounds from `-xatu-cbt-redis-node-0` (secret `-xatu-cbt-redis`) in the `xatu` namespace. Since the clickhouse-raw migration, prod cbt and its Redis moved to the `clickhouse` namespace and dropped the `xatu-` prefix (`-cbt-redis-node-0`, secret `-cbt-redis`). The stale coordinates made `SeedFromProduction` fail silently (non-fatal), leaving local Redis empty so CBT fell back to multi-billion-row min/max scans of external tables on cold start. Verified: lab up now seeds 58 cbt:external:* bound keys into local Redis from mainnet-cbt-redis-node-0 (e.g. canonical_execution_logs min 52029 / max 25371147). --- pkg/infrastructure/bounds_seeder.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/infrastructure/bounds_seeder.go b/pkg/infrastructure/bounds_seeder.go index d34b9aa..5f649bd 100644 --- a/pkg/infrastructure/bounds_seeder.go +++ b/pkg/infrastructure/bounds_seeder.go @@ -13,8 +13,10 @@ import ( const ( // Production cluster hardcoded details. + // The cbt deployment (and its Redis) lives in the clickhouse namespace since the + // clickhouse-raw migration; it was previously xatu-cbt in the xatu namespace. prodK8sContext = "platform-analytics-hel1-production" - prodNamespace = "xatu" + prodNamespace = "clickhouse" // localRedisContainer is the local Docker container name for xatu-cbt Redis. localRedisContainer = "xatu-cbt-redis" @@ -258,8 +260,8 @@ func (s *BoundsSeeder) bulkInsertLocal(ctx context.Context, redisDB int, bounds // prodRedisDetails returns the production Redis pod name and password k8s secret name for a network. func prodRedisDetails(network string) (podName, secretName string) { - return fmt.Sprintf("%s-xatu-cbt-redis-node-0", network), - fmt.Sprintf("%s-xatu-cbt-redis", network) + return fmt.Sprintf("%s-cbt-redis-node-0", network), + fmt.Sprintf("%s-cbt-redis", network) } // stripRedisPrefix removes the "N) " prefix that redis-cli adds to array elements.