Hive Hive
Sign in

refactor(capi-scaleway): drop auto-order + terminate paths, pool only

GitHub issue · Closed

Metadata
Source
tuist/tuist #10927
Updated
Jun 24, 2026
Domains
Compute
Details

Purpose

Every managed environment already runs the CAPI Scaleway provider with Spec.AdoptPoolPrefix set, and the operator-owned pre-order workflow is the only sane path on Scaleway Apple Silicon (24h Apple licensing floor, flaky inventory). The companion tuist.dev/release-policy: terminate opt-out that #10922 added was extra surface nobody used, plus a shouldReleaseToPool decision that had to be re-derived on every delete. Collapse it to the pool path.

What changed

  • acquireServer always calls AdoptByPrefix. An empty Spec.AdoptPoolPrefix now surfaces a MissingAdoptPoolPrefix condition + event instead of silently falling through to CreateServer.
  • reconcileDelete always calls ReleaseToPool. The ReleasePolicyAnnotation / ReleasePolicyPool / ReleasePolicyTerminate constants and the shouldReleaseToPool helper are gone. Operators retiring a broken host do so via the Scaleway console.
  • scaleway.Client drops CreateServer, DeleteServer, resolveOSID, and isPreconditionFailed. The AppleSiliconAPI interface loses the four SDK methods nothing calls anymore (CreateServer, DeleteServer, WaitForServer, ListOS).
  • Spec.AdoptPoolPrefix is now required: no omitempty on the type, required: [adoptPoolPrefix] in both CRDs, and chart templates emit the field unconditionally guarded by a required helper. Chart defaults flip to "tuist-pool-" so a greenfield install matches the managed envs.
  • Docs: AGENTS.md, CRDs, values.yaml, values-managed-production.yaml, and the controller’s surrounding prose stop referencing the removed paths. The detach-without-release runbook now points at ReleaseToPool rather than DeleteServer.
  • Tests: removed the TestShouldReleaseToPool_*, TestReconcileDelete_TerminateAnnotationFallsBackToDeleteServer, TestReconcileDelete_AutoOrderUsesDeleteServer, and the four TestDeleteServer_* cases. The remaining delete-path test is TestReconcileDelete_ReleasesToPool.

How to test locally

From the provider module:

```bash cd infra/cluster-api-provider-scaleway-applesilicon go build ./… go vet ./… go test ./… ```

Render the chart against each managed env to confirm the new `adoptPoolPrefix` field is emitted everywhere:

```bash helm template tuist infra/helm/tuist -f infra/helm/tuist/values-managed-canary.yaml | grep adoptPoolPrefix helm template tuist infra/helm/tuist -f infra/helm/tuist/values-managed-staging.yaml | grep adoptPoolPrefix helm template tuist infra/helm/tuist -f infra/helm/tuist/values-managed-production.yaml | grep adoptPoolPrefix ```

🤖 Generated with Claude Code

Comments

No GitHub comments yet.