Hive Hive
Sign in

fix(server): skip large recent bucket backfills

GitHub issue · Closed

Metadata
Source
tuist/tuist #11245
Updated
Jun 24, 2026
Domains
Kura
Details

What changed

  • Skip the historical backfill for the 500 and 750 test-case recent bucket aggregate tables in the ClickHouse migration.
  • Keep creating the 500 and 750 aggregate tables and materialized views, so new test case runs will populate them going forward.
  • Restore the legacy TUIST_KURA_INTROSPECTION_CLIENT_ID and TUIST_KURA_INTROSPECTION_CLIENT_SECRET keys in the server ExternalSecret template alongside the newer KURA_CONTROL_PLANE_* keys.

Why

The production deploy is still getting stuck in the migration hook. The 100 and 250 bucket backfills complete, but the 500 bucket historical backfill can still exceed ClickHouse’s memory cap even after the previous chunking changes. We do not need to force that larger historical backfill as part of the hotfix release; allowing those tables to populate from new data lets the deploy proceed without dropping the future-facing views.

The server rollout can also wedge because existing pods still reference the legacy Kura introspection env var names. The ExternalSecret currently renders only the newer control-plane aliases, so fresh pods can fail secret-key resolution before the release completes.

Impact

  • The release should no longer spend migration-hook time trying to backfill the 500/750 historical buckets.
  • The 500/750 bucket tables will be empty for historical data until we run a safer offline backfill later, but they will receive new rows through the materialized views.
  • Existing and new server specs can resolve both Kura env var naming schemes during the rollout.

Validation

  • Parsed and format-checked server/priv/ingest_repo/migrations/20260515100000_create_test_case_runs_recent_buckets_per_case_mvs.exs with Elixir.
  • Rendered infra/helm/tuist/templates/external-secrets.yaml for production and confirmed the server ExternalSecret includes both KURA_CONTROL_PLANE_* and TUIST_KURA_INTROSPECTION_* keys.
  • Ran helm lint for production values.
  • Ran helm lint for canary values.
  • Ran git diff --check.
Comments
TA
tuist-atlas[bot] Jun 12, 2026

The fix to skip large recent bucket backfills (and restore the legacy Kura introspection env vars) is now available in server@1.210.5. Update to this version to apply these changes.