← Back to Pull requests

OCPEDGE-2747: feat: add topology transition controller for day-2 SNO to HA transitions #495

Closed
unknown closed this pull request without merging on Sep 10, 2026 14:54 UTC
View on GitHub
unknown unknown commented on Jun 26, 2026 12:32 UTC
Author

Summary

  • Vendors updated openshift/api (Infrastructure spec.controlPlaneTopology, MutableTopology feature gate) and openshift/client-go (operator clientset, informers, listers for Etcd CR access)

  • Adds a new TopologyTransitionController gated behind the MutableTopology feature gate that manages day-2 control plane topology transitions (initial: SNO → HA Compact on platform type None)

  • Wires the controller into RunOperator with dedicated informer factories for the Etcd operator CR and openshift-etcd ConfigMaps
  • Controller behavior

    1. Preflight validation — verifies control plane node count, readiness, schedulability, etcd quorum, voting members, and absence of dedicated workers before allowing a transition
    2. Condition management — sets TopologyTransitionControllerProgressing and TopologyTransitionControllerUpgradeable conditions to block cluster upgrades during transitions
    3. Status update — applies the topology change to Infrastructure status with conflict retry and spec-change detection
    4. Reconciliation monitoring — waits for all ClusterOperators to stabilize (Available=True, Progressing=False, Degraded=False) with a 5-minute soak timer before re-enabling upgrades
    5. Crash recovery — handles partial failures where operator conditions were set but the Infrastructure status update didn't complete

    Test plan

  • Unit tests pass: go test -v -count=1 ./pkg/operator/topology_transition_controller/... (46 tests covering controller sync, preflight validators, reconciliation checks, soak timer, crash recovery, and spec-change-during-retry)

  • make build succeeds

  • make verify passes (gofmt, govet, deps, bindata)

  • E2E: deploy on a SNO cluster with MutableTopology feature gate enabled, scale to 3 control plane nodes, set spec.controlPlaneTopology: HighlyAvailable, verify transition completes and upgrades are re-enabled
  • Assisted-by: Claude <noreply@anthropic.com>

    Diff: 244 lines (+183 / -61) across 3 files Reviewer: jeff-roche Review duration: 109582m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 244 lines diff across 3 files
    0.39
    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%
    60%
    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.329
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #495"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 38.8% (MEDIUM) · Higher = larger blast radius
    38.8%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 15.3% · Safe to merge
    15.3%