← Back to Pull requests

fix: require all operator identities on cluster create #6969

Closed
unknown closed this pull request without merging on Sep 29, 2026 00:13 UTC
View on GitHub
unknown unknown commented on Sep 15, 2026 23:29 UTC
Author

https://redhat.atlassian.net/browse/ARO-29253

Reviewers: 138 files, but only one changes behaviour —

internal/validation/validate_cluster.go, which adds two checks. The other 137 are tests

and fixtures.

What

Cluster create is now rejected synchronously if it omits any operator identity the cluster
cannot come up without: 8 always-required control plane operators, 3 always-required data
plane operators, and kms when etcd encryption is CustomerManaged. Requirements are read
from azure.ClusterScopedIdentitiesConfig, which already describes them.

Operator names must also match a recognized operator exactly. A mis-cased or misspelled name
was previously accepted and then failed asynchronously.

Create-only, since operatorsAuthentication is immutable and running this on update would
permanently block clusters created before it existed.

Why

A customer created a cluster with customer-managed etcd encryption but omitted the kms
identity. ARM returned 201 Accepted, the create stalled indefinitely, and it took a Sev2 to
diagnose.

The existing cross-check only compares the two customer-supplied identity lists against each
other
— omit an operator from both and they stay consistent, so it passes. Nothing checked
completeness. Several downstream consumers assume the full set, including the role-assignment
and identity-sync controllers, and the failure surfaces as a stalled create rather than an
error.

Same request: upstream/main returns 201 Accepted plus an Azure-AsyncOperation header and
polls forever. This branch returns 400 InvalidRequestContent naming the missing identity.

Testing

Unit — internal/validation drops each of the 12 required identities in turn and asserts
the create is rejected for exactly that operator. Verified by mutation: neutering either
requirement loop fails these tests and nothing else.

Contract test — internal/azure/cluster_scoped_identities_config_test.go pins the expected
operator sets with hardcoded names, since validation and its fixtures both derive from the same
config and would otherwise only prove they agree with each other.

Integration — two new cases, create-without-kms-identity and
create-without-ingress-identity. Both were run against upstream/main with only the test
directory copied in; they fail there with An error is expected but got nil and pass here,
confirming they detect the defect rather than just agreeing with the new code.

No new E2E tests — the E2E framework already supplies all 12 identities.

Special notes for reviewer

Names are rejected, not normalized. "KMS" could be lowercased so it just works, but
that's a silent mutation — you PUT "KMS" and GET "kms" back. Strict-to-lenient is safe to
loosen later; the reverse isn't. Happy to switch if you'd prefer.

CI is red for infrastructure reasons, not this change. All Prow jobs are failing to
schedule with nonretryable error: no build client found for cluster "build11"/"build13". Will retest once CI is healthy.

Two gaps left out of scope: serviceManagedIdentity has no requirement metadata to
validate against, and the MaximumSet_Gen.json examples (10 files across 5 API versions)
show empty operator maps, so they now document a request the RP rejects.

PR Checklist

  • PR is scoped to a single task (no mixed concerns)

  • Title follows Conventional Commits format

  • Summary explains the "Why" behind the change

  • Linked to relevant ticket/issue

  • Screenshots included (if dashboards or other UI changes) — N/A

  • Self-reviewed the diff

  • Draft PR used for WIP (if applicable)

  • Commit history is clean (rebased/squashed)

  • Tricky code blocks are commented

  • CI/CD checks are passing (ignore Tide)

  • Specific reviewers tagged

  • All comment threads resolved before merge
  • Diff: 498 lines (+373 / -125) across 6 files Reviewer: miguelsorianod Review duration: 18763m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.47) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 498 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.372
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6969"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.5% (MEDIUM) · Higher = larger blast radius
    47.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.5% · Safe to merge
    20.5%
    Repository