Commit Graph

697 Commits

Author SHA1 Message Date
svc.kargo a8f98a1419 chore(kargo): update image tag tournament to 0.6.0 on staging (#462) 2026-06-23 10:21:01 +02:00
svc.kargo 4adbf38b2b chore(kargo): update image tag official-bots to 0.28.0 on staging (#461) 2026-06-23 10:17:32 +02:00
svc.kargo 67bf5e4560 chore(kargo): update image tag frontend to 0.6.0-x86_v2 on htwg-1-prod (#460) 2026-06-23 09:49:05 +02:00
svc.kargo d8967f09f4 chore(kargo): update image tag official-bots to 0.27.0-x86_v2 on htwg-1-prod (#459) 2026-06-23 09:48:59 +02:00
svc.kargo 7a736c41d0 chore(kargo): update image tag frontend to 0.6.0 on staging (#458) 2026-06-23 09:45:02 +02:00
svc.kargo 1487b4b840 chore(kargo): update image tag official-bots to 0.27.0 on staging (#457) 2026-06-22 22:51:42 +02:00
svc.kargo 462a9830e5 chore(kargo): update image tag official-bots to 0.26.0-x86_v2 on htwg-1-prod (#456) 2026-06-22 21:58:29 +02:00
svc.kargo df0ff57707 chore(kargo): update image tag official-bots to 0.26.0 on staging (#455) 2026-06-22 21:54:28 +02:00
svc.kargo be4c9721ad chore(kargo): update image tag official-bots to 0.25.0-x86_v2 on htwg-1-prod (#453) 2026-06-22 20:56:10 +02:00
svc.kargo bc6bbc7b71 chore(kargo): update image tag official-bots to 0.25.0 on staging (#452) 2026-06-22 20:51:24 +02:00
svc.kargo 4efe1c2d92 chore(kargo): update image tag account to 0.26.0 on eu-central-1-prod (#451) 2026-06-22 19:59:44 +02:00
svc.kargo 6d481363ad chore(kargo): update image tag account to 0.26.0-x86_v2 on htwg-1-prod (#450) 2026-06-22 19:58:37 +02:00
svc.kargo 183bb029ff chore(kargo): update image tag official-bots to 0.24.0 on eu-central-1-prod (#449) 2026-06-22 19:58:31 +02:00
svc.kargo 574e849d46 chore(kargo): update image tag official-bots to 0.24.0-x86_v2 on htwg-1-prod (#448) 2026-06-22 19:58:30 +02:00
svc.kargo b65ddd0a49 chore(kargo): update image tag official-bots to 0.24.0 on staging (#447) 2026-06-22 19:54:29 +02:00
svc.kargo 674049e10e chore(kargo): update image tag account to 0.26.0 on staging (#446) 2026-06-22 19:52:16 +02:00
Janis Eccarius c133447ea6 chore(htwg-1): disable OTEL SDK to stop Grafana export noise
Sets OTEL_SDK_DISABLED=true in htwg-1-prod overlay so the OTel SDK
never initializes — eliminates export attempts to Grafana Alloy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 19:17:17 +02:00
svc.kargo 07a453a05e chore(kargo): update image tag tournament to 0.5.0-x86_v2 on htwg-1-prod (#444) 2026-06-21 22:31:41 +02:00
svc.kargo 4b1df75d7a chore(kargo): update image tag official-bots to 0.23.0-x86_v2 on htwg-1-prod (#443) 2026-06-21 22:24:22 +02:00
svc.kargo 4ab804f3bd chore(kargo): update image tag official-bots to 0.23.0 on eu-central-1-prod (#442) 2026-06-21 22:24:14 +02:00
svc.kargo df44bd176e chore(kargo): update image tag tournament to 0.5.0 on staging (#441) 2026-06-21 22:24:11 +02:00
svc.kargo 7a60f2865c chore(kargo): update image tag official-bots to 0.23.0 on staging (#440) 2026-06-21 22:20:03 +02:00
svc.kargo f823e06971 chore(kargo): update image tag frontend to 0.5.0 on eu-central-1-prod (#439) 2026-06-21 22:15:44 +02:00
svc.kargo 654e97957f chore(kargo): update image tag frontend to 0.5.0-x86_v2 on htwg-1-prod (#438) 2026-06-21 22:15:43 +02:00
svc.kargo 7d2b4774c7 chore(kargo): update image tag frontend to 0.5.0 on staging (#437) 2026-06-21 22:11:49 +02:00
Janis Eccarius 6abed9bb6e feat(nowchess): add TOURNAMENT_EXTERNAL_SERVERS env var to tournament rollout
htwg-1-prod seeds 141.37.123.132:8086 (primary bridge server) on startup
so the registry is populated without manual API calls after pod restarts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:34:05 +02:00
Janis Eccarius a84f62f972 fix(nowchess): correct tournament service port to 8088 and SELF_URL
- TOURNAMENT_SERVICE_URL was 8086 but K8s service and app both use 8088
- TOURNAMENT_SELF_URL on htwg-1 should be base ingress URL (port 80),
  not a direct service port — ingress routes /api/tournament to tournament service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:31:16 +02:00
Janis Eccarius 3e6a7be274 fix(htwg-1): correct TOURNAMENT_SELF_URL to htwg-1 own IP
Was pointing at third-party server (141.37.123.132). Should be htwg-1's
own tournament service IP so remote clusters can proxy mutations back here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:29:40 +02:00
Janis Eccarius b82a0919e9 feat(nowchess): wire TOURNAMENT_SERVICE_URL and TOURNAMENT_SELF_URL
- Official-bots now targets local tournament service (TOURNAMENT_SERVICE_URL)
  instead of calling remote cluster directly
- TOURNAMENT_SELF_URL tells each cluster's tournament and official-bots
  services their own public URL for cross-cluster replication
- htwg-1-prod: remove TOURNAMENT_SERVER_URL, add both new vars with correct
  values (tournament active service + node IP for self-announcement)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 21:23:58 +02:00
Janis Eccarius 521a39fa04 fix(official-bots): point ACCOUNT_SERVICE_URL to correct K8s service name
Service is named nowchess-account-active, not nowchess-account. DNS resolution
failed on startup causing official bots to never sync and appear unavailable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 20:59:39 +02:00
Janis Eccarius f2aeea1b40 fix(kustomization): update API and WebSocket URLs for frontend environment 2026-06-21 20:49:52 +02:00
Janis Eccarius 587ea19e0e fix(spark-analytics): increase NIM timeout and trim max_tokens to avoid read timeouts
70B model at 30-50 tok/s was exceeding the 30s urllib timeout for larger
outputs. Raise server timeout to 60s, add browser AbortController at 65s
so the UI fails gracefully. Trim max_tokens (row: 300, dataset: 512) to
keep generation well inside the window.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:58:29 +02:00
Janis Eccarius 1ab9d60dd2 fix(spark-analytics): use ThreadingHTTPServer to prevent probe starvation
Single-threaded HTTPServer blocked readiness probes during long NIM API
calls (~30s), causing Kubernetes to flip the pod unhealthy until the
request completed. ThreadingHTTPServer handles each request in its own
thread so probes are never starved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:53:31 +02:00
Janis Eccarius ac51ad09a4 feat(spark-analytics): per-row AI analysis with queue and rate-limit handling
- Add  button on each row (first 200) — clicking analyses that specific
  row with a chess-expert prompt tailored to the entry type (opening,
  player, etc.)
- Cache results per row so already-analysed rows skip re-requests
- Serialise all NIM requests through a promise queue to avoid bursting
- Pass 429 + Retry-After through from NIM to the browser; JS surfaces
  "Rate limited — retry in Ns" error and re-enables the button for retry
- Dataset-level "Analyse top 10 rows" now sends a per-row numbered prompt
  asking for chess-specific analysis of each entry rather than a vague
  dataset summary
- Store first 200 rows in window.DATASET.rows for client-side row access

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:48:10 +02:00
Janis Eccarius 7f11de365c fix(spark-analytics): proxy NIM API calls through server to avoid CORS
Browser cannot call integrate.api.nvidia.com directly — no CORS headers.
Add POST /explain endpoint: browser sends key + dataset, server calls NIM
with urllib, returns JSON. Key is never logged or stored server-side.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:36:04 +02:00
Janis Eccarius 60467d8ff6 fix(spark-analytics): escape \\n in JS userPrompt strings
Python triple-quoted string interprets \n as literal newlines,
producing invalid JS string literals and a SyntaxError that
killed the entire script block.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:25:20 +02:00
Janis Eccarius 9074c3fbd0 fix(spark-analytics): replace multiline JS template literals with concatenation
Multi-line template literals spanning unindented continuation lines break the
YAML block scalar indentation, causing kustomize to fail with MalformedYAMLError.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:19:00 +02:00
Janis Eccarius 7aa3bd3b12 fix: update CORS_ORIGINS to new IP address 2026-06-21 17:16:59 +02:00
Janis Eccarius 252c543fed feat(spark-analytics): add per-user NVIDIA NIM AI explanations to webview
Each dataset page now has an "Explain this dataset" button that calls the
NVIDIA NIM chat completions API (meta/llama-3.3-70b-instruct) directly from
the browser with headers + first 10 rows as context. API key is entered via
a settings modal and stored in localStorage only — never sent to the server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 17:16:26 +02:00
Janis Eccarius c1c81f2507 chore(staging): bump analytics image to 0.7.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:55:52 +02:00
Janis Eccarius 42cb4efc05 fix(staging): add NOWCHESS_PGN_CACHE_DIR to all analytics CronJobs
Points to /spark-output/.pgn-cache so the decompressed Lichess PGN file
is written to the shared PVC, accessible by both driver and executor pods.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:31:20 +02:00
svc.kargo ce56b7cc8b chore(kargo): update image tag official-bots to 0.22.0-x86_v2 on htwg-1-prod (#436) 2026-06-21 16:30:58 +02:00
svc.kargo 433227e132 chore(kargo): update image tag official-bots to 0.22.0 on staging (#435) 2026-06-21 16:22:26 +02:00
svc.kargo e1e501766b chore(kargo): update image tag frontend to 0.4.4-x86_v2 on htwg-1-prod (#434) 2026-06-21 16:22:25 +02:00
svc.kargo 5423f0000a chore(kargo): update image tag frontend to 0.4.4 on staging (#433) 2026-06-21 16:12:22 +02:00
Janis Eccarius f2d13efcd7 fix: co-locate analytics driver pods with spark-worker for RWO PVC access
do-block-storage only supports ReadWriteOnce. Executor tasks failed with
`Mkdirs failed` because the executor ran on the spark-worker node which
had no mount of the spark-analytics-output PVC.

- Mount spark-analytics-output PVC on spark-worker pod at /spark-output
- Add podAffinity to all 11 analytics CronJob driver pods to schedule on
  the same node as spark-worker, ensuring the RWO PVC is accessible by
  both driver and executor

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 16:06:51 +02:00
Janis Eccarius 283c6728d4 fix(spark-analytics): batch index COUNT queries in one connection, suppress BrokenPipeError
13 separate DB connections on index page caused readiness probe timeout.
Now all counts share one connection. BrokenPipeError on probe disconnect silenced.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 15:52:34 +02:00
Janis Eccarius 609a222211 fix(spark-analytics): robust JDBC URL parsing, log resolved DB host on startup
Handle URLs without explicit port, show DB_HOST:PORT/DB_NAME in error messages
and startup log to simplify connection debugging.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 15:47:48 +02:00
Janis Eccarius bdc3efc878 fix(spark-analytics): install psycopg2 to /tmp/pkg, set PYTHONPATH so it is importable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 15:44:09 +02:00
Janis Eccarius 6765c5162d fix(spark-analytics): set HOME=/tmp so pip can write under non-root user 65534
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-21 15:42:50 +02:00