← Back to Pull requests

feat: add admin API endpoint to set per-nodepool minimum version #6375

Closed
unknown closed this pull request without merging on Aug 10, 2026 11:04 UTC
View on GitHub
unknown unknown commented on Aug 03, 2026 11:34 UTC
Author

What

  • Add MinimumVersion field to ServiceProviderNodePoolSpecVersion — an SRE-controlled semver floor per node pool, nil when unset

  • New admin API endpoint POST .../nodepools/{nodepoolName}/minimumversion to set or clear the minimum version

  • Update nodePoolVersionSyncer to select max(customerDesiredVersion, sreMinimumVersion) as the target version before validation

  • Handler tests use callback-based table pattern (setup/validate); controller tests consolidate SRE minimum version cases into the existing _IntentFailed table
  • Why

    SRE needs to enforce a version floor on individual node pools, ensuring they don't remain on versions below a required threshold. When set, the minimum version overrides the customer's desired version if it is higher; when cleared, the customer's version is used as before.

    Testing

  • Unit tests for the admin handler (callback-based table-driven, covering validation errors, set, overwrite, and clear)

  • Controller tests extended with SRE minimum version cases in the _IntentFailed table test
  • Special notes for your reviewer

    Why is this WIP?
    Once we add the SRE selection of a minimumVersion, there will be nodepool updated. This nodepool will be represented in the RP/CosmosDB with a different version that they really have. We need to agree on a correct solution to reflect this reality.

    Usage example:

    Set a minimum version:

    curl -X POST \
      "https://<admin-api>/admin/v1/hcp/subscriptions/<subscription-id>/resourcegroups/<resource-group>/providers/microsoft.redhatopenshift/hcpopenshiftclusters/<cluster-name>/nodepools/<nodepool-name>/minimumversion" \
      -H "Content-Type: application/json" \
      -H "X-Ms-Client-Principal-Name: user@example.com" \
      -d '{"minimumVersion": "4.21.0"}'
    

    Response:

    {"minimumVersion": "4.21.0"}
    

    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 graph/UI/metrics changes)

  • Self-reviewed the diff

  • CI/CD checks are passing (ignore Tide)

  • Draft PR used for WIP (if applicable)

  • Commit history is clean (rebased/squashed)

  • Tricky code blocks are commented

  • Specific reviewers tagged

  • All comment threads resolved before merge
  • Diff: 312 lines (+234 / -78) across 3 files Reviewer: ahitacat Review duration: 10049m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 312 lines diff across 3 files
    0.40
    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.344
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6375"
    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: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    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.9% · Safe to merge
    15.9%
    Repository