Skip to content

Commit e0ed6eb

Browse files
EDsCODEclaude
andcommitted
Gate ready transition on Crossplane Ready condition
The controller was marking infrastructure as ready when individual status fields appeared (e.g. Aurora endpoint), but the Aurora instance could still be configuring. Now requires the Crossplane Ready condition to be True before transitioning to ready, ensuring all composed resources (cluster + instance + S3 + IAM) are fully reconciled. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4749e9e commit e0ed6eb

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

controlplane/provisioner/controller.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,16 @@ func (c *Controller) reconcileProvisioning(ctx context.Context, w *configstore.M
202202
updates["identity_state"] = configstore.ManagedWarehouseStateReady
203203
}
204204

205-
// Infrastructure is ready when S3, Aurora, secrets, and IAM are all provisioned.
205+
// Infrastructure is ready when all components are provisioned AND the
206+
// Crossplane Ready condition is True. The Ready condition ensures all
207+
// composed resources (including the Aurora instance) are fully reconciled,
208+
// not just that individual status fields are populated.
206209
s3Ready := w.S3State == configstore.ManagedWarehouseStateReady || updates["s3_state"] == configstore.ManagedWarehouseStateReady
207210
metaReady := w.MetadataStoreState == configstore.ManagedWarehouseStateReady || updates["metadata_store_state"] == configstore.ManagedWarehouseStateReady
208211
secretsReady := w.SecretsState == configstore.ManagedWarehouseStateReady || updates["secrets_state"] == configstore.ManagedWarehouseStateReady
209212
identReady := w.IdentityState == configstore.ManagedWarehouseStateReady || updates["identity_state"] == configstore.ManagedWarehouseStateReady
210213

211-
if s3Ready && metaReady && secretsReady && identReady {
214+
if s3Ready && metaReady && secretsReady && identReady && status.ReadyCondition {
212215
now := time.Now().UTC()
213216
updates["state"] = configstore.ManagedWarehouseStateReady
214217
updates["status_message"] = "Infrastructure ready"

0 commit comments

Comments
 (0)