Hive Hive
Sign in

fix(server): fall back from empty Kura endpoints

GitHub issue · Closed

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

What changed

  • Canary Kura acceptance tests now reuse the existing tuist account and create random projects under it, instead of creating random temporary organizations.
  • The production deployment workflow no longer strips TUIST_FEATURE_FLAG_KURA from the acceptance test step, so the canary leg exercises Kura again.
  • Server Kura endpoint resolution now falls back to the existing cache endpoints when the account-scoped Kura endpoint list is empty or the configured global Kura endpoint list only contains blanks.
  • Canary cluster config now declares a kura worker pool labeled with node.cluster.x-k8s.io/pool=kura, matching the scheduler selector used by Kura pods.

Why

Kura servers are scoped to an account. In canary, the Kura servers are bound to tuist, but the acceptance tests were creating temporary organizations. With TUIST_FEATURE_FLAG_KURA=1, those temporary accounts requested Kura endpoints and got no usable endpoint back, which led the CLI into a bad cache URL path.

There was also an infrastructure issue in canary: the Kura StatefulSet pods were pending because they select node.cluster.x-k8s.io/pool=kura, but the cluster had no nodes with that pool label.

Impact

The acceptance tests create isolated random projects while using the account that owns the canary Kura nodes. When Kura is unavailable or has no endpoints, clients still receive the normal cache endpoints instead of an empty list.

Validation

  • swiftformat cli/Sources/TuistAcceptanceTesting/TuistAcceptanceTestFixtureTestingTrait.swift cli/Tests/TuistCacheEEAcceptanceTests/TuistCacheEECanaryAcceptanceTests.swift
  • tuist install
  • mise run cli:ee
  • TUIST_EE=1 tuist generate TuistAcceptanceTesting TuistCacheEEAcceptanceTests --no-open
  • xcodebuild build -workspace Tuist.xcworkspace -scheme TuistCacheEEAcceptanceTests CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY=""
  • mix format --check-formatted lib/tuist/accounts.ex test/tuist_web/controllers/api/cache_controller_test.exs
  • MIX_ENV=test mix ecto.reset
  • mix test test/tuist_web/controllers/api/cache_controller_test.exs
  • git diff --check origin/main...HEAD
  • Canary diagnosis with kubectl: kura-tuist-eu-central-1-0 was pending because no node matched node.cluster.x-k8s.io/pool=kura.
Comments
TA
tuist-atlas[bot] Jun 2, 2026

This fix is now available in server@1.203.1. Update to this version to get the fallback behavior when Kura endpoint lists are empty.

TA
tuist-atlas[bot] Jun 5, 2026

The changes from this PR are now available in release xcresult-processor-image@0.11.0. The system now falls back from empty Kura endpoints.