← Back to Pull requests

SPLAT-2655: Report worker rollout progress and surface stalled old-worker deletion #96

Closed
unknown closed this pull request without merging on Aug 25, 2026 12:09 UTC
View on GitHub
unknown unknown commented on Aug 20, 2026 20:42 UTC
Author

Summary

Closes the remaining gaps for SPLAT-2655 (Worker Node Rolling Replacement — IPI). The existing WorkloadMigrated phase already creates target worker MachineSets, waits for readiness, rolls the control plane, and scales down/deletes source MachineSets. This PR hardens the two gaps against the acceptance criteria:

1. Worker rollout progress in status — the target-worker wait now reports readiness counts instead of a static message:
Waiting for target workers (machines 5/6 ready, nodes 4/6 ready)
2. Stalled old-worker deletion (PDB-blocked drains) — when old machines/nodes linger after scale-down, the condition message names the machines with age and error reason (this is where drain/PDB violations surface), logs per-machine detail at V(1), and emits a debounced Warning OldWorkersStalled event (at most one per 5 minutes per distinct lingering-machine set).

Waiting for old worker deletion: source-worker-a has 1 machine(s) [source-worker-a-0 (12m0s old, DrainError)] and 1 node(s) remaining

No changes to the ordered-condition workflow, CRD, RBAC, or requeue intervals.

Changes

  • internal/openshift/machines.go: new ListMachinesForMachineSet (metadata-preserving machine listing)

  • internal/controller/vmwarecloudfoundationmigration_controller.go:

  • - checkWorkerReadiness returns aggregate machine/node readiness counts feeding the progress message
    - new oldWorkerStallDetail helper builds per-MachineSet stall detail + a stable debounce key
    - logControlPlaneMachine renamed to logMachineDetail (shared by rollout and stall logging)
    - debounced OldWorkersStalled Warning event on the reconciler (in-memory; a leader restart may re-emit one event, which is harmless)
  • Tests: new unit tests for ListMachinesForMachineSet; new orchestration cases for the progress message, stall detail, and event debounce

  • docs/plans/splat-2655-worker-rolling-replacement.md: implementation plan
  • Verification

  • make fmt, make vet, make lint (0 issues), make test (all packages + envtest), go build ./... — all passing on the branch

  • Per-task code reviews + whole-branch review: no blocking findings
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    New Features
    Added detailed diagnostics for stalled old-worker deletion, including machine names, ages, remaining nodes, and error reasons.
    Added bounded, deduplicated warning events for stalled rollouts.
    Improved worker rollout progress reporting with aggregate machine and node readiness counts.

    Bug Fixes
    Improved detection and reporting of machines associated with a worker machine set.

    Tests
    Added coverage for readiness reporting, stall diagnostics, machine matching, and warning-event debouncing.

    Documentation
    Added an implementation plan for addressing worker rollout gaps.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 379 lines (+284 / -95) across 4 files Reviewer: jcpowermac Review duration: 6687m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 379 lines diff across 4 files
    0.43
    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.355
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #96"
    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: 42.9% (MEDIUM) · Higher = larger blast radius
    42.9%
    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: 17.0% · Safe to merge
    17.0%