Hive Hive
Sign in

fix(kura): improve extension routing and observability

GitHub issue · Closed

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

Resolves N/A

This PR improves Kura extension reliability and observability when managed eu-central instances call back to the Tuist server.

  • Injects TUIST_KURA_TUIST_BASE_URL from the Helm release context so managed eu-central Kura instances use the in-cluster Tuist service URL for production, canary, and staging instead of the public application URL.
  • Reads that URL through the region provisioner config, keeping the Kubernetes controller generic and avoiding hardcoded environment-to-namespace branching.
  • Adds bounded-cardinality metrics for extension HTTP client calls, including normalized client, route, result, status class, and error kind labels.
  • Retries transient extension HTTP transport failures once and includes richer reqwest error classification in hook failures.

How to test locally

  • mise exec -- cargo fmt --check
  • mise exec -- cargo test retries_introspection_transport_failures_once -- --nocapture
  • mise exec -- cargo test authorizes_from_local_jwt_cache_grants_without_introspection -- --nocapture
  • mise exec -- cargo test falls_back_to_introspection_when_jwt_cache_grants_do_not_cover_requested_project -- --nocapture
  • mise exec -- cargo test metrics -- --nocapture
  • mise exec -- cargo clippy --all-targets -- -D warnings
  • mix format server/lib/tuist/environment.ex server/lib/tuist/kura/regions.ex server/lib/tuist/kura/provisioner/kubernetes_controller.ex server/test/tuist/kura/regions_test.exs server/test/tuist/kura/provisioner/kubernetes_controller_test.exs
  • helm template tuist infra/helm/tuist -n tuist-canary -f infra/helm/tuist/values-managed-common.yaml -f infra/helm/tuist/values-managed-canary.yaml --set kuraController.image.tag=test --set kuraRuntime.image.tag=test | rg -n -C 1 "TUIST_KURA_TUIST_BASE_URL|tuist-tuist-server.tuist-canary.svc.cluster.local"
  • helm template tuist infra/helm/tuist -n tuist -f infra/helm/tuist/values-managed-common.yaml -f infra/helm/tuist/values-managed-production.yaml --set kuraController.image.tag=test --set kuraRuntime.image.tag=test | rg -n -C 1 "TUIST_KURA_TUIST_BASE_URL|tuist-tuist-server.tuist.svc.cluster.local"
  • Not completed: mix test test/tuist/kura/provisioner/kubernetes_controller_test.exs test/tuist/kura/regions_test.exs because this worktree is missing server dependencies and Mix reports running mix deps.get is required.
Comments
TA
tuist-atlas[bot] Jun 5, 2026

The changes from this PR are now available in release xcresult-processor-image@0.11.0. Extension routing and observability improvements are now live.