← Back to Pull requests

ROSAENG-67141 | fix: skip IAM upgrade mode for HCP managed policies #3597

Closed
unknown closed this pull request without merging on Sep 29, 2026 22:18 UTC
View on GitHub
unknown unknown commented on Sep 29, 2026 15:25 UTC
Author

Summary


Skip the IAM Roles/Policies upgrade mode prompt and Classic roles-compat path during rosa upgrade cluster for Hosted Control Plane clusters with managed policies. HCP managed policies are maintained by Red Hat/AWS outside the cluster upgrade lifecycle, so customers never need an IAM policy action at upgrade time. Keep a quiet attachment validation so upgrades still fail if managed policies were detached. Explicit --mode is warned and ignored for backward compatibility.

Jira


  • ROSAENG-67141
  • Type of Change


  • feat

  • fix

  • docs / style / refactor / test / chore / build / ci / perf
  • Testing


  • Unit: go test ./cmd/upgrade/cluster/ ./pkg/helper/roles/ -count=1

  • Local gates: make fmt, make lint, make rosa

  • Coverage: make coverage-changed-files (changed-lines delta ≥80%)

  • CodeRabbit review of uncommitted/branch changes (0 findings)

  • E2E assertions updated for HCP cluster upgrade success path; detach-failure case (id:62161) still expects validation failure

  • Manual: on an HCP managed-policy cluster, run rosa upgrade cluster -c <cluster> --version <ver> -y and confirm no IAM mode prompt / no “compatible with upgrade” / “upgrade isn't needed” noise; with --mode auto, confirm a non-fatal warning that --mode is ignored

  •   > ./rosa upgrade cluster -c daxelrod-bgp-docs-2
      ? Version (default = '4.22.14'): 4.22.14
      ? Are you sure you want to upgrade cluster to version '4.22.14'? No
      > rosa upgrade cluster -c daxelrod-bgp-docs-2
      ? IAM Roles/Policies upgrade mode: auto
      ? Version (default = '4.22.14'): 4.22.14
      I: Ensuring account and operator role policies for cluster '2t42dm05q9kc9vrssbimrvq07lds6a9l' are compatible with upgrade.
      I: Account roles with the prefix 'ManagedOpenShift' have attached managed policies.
      I: Cluster 'daxelrod-bgp-docs-2' operator roles have attached managed policies. An upgrade isn't needed
      I: Account and operator roles for cluster 'daxelrod-bgp-docs-2' are compatible with upgrade
      ? Are you sure you want to upgrade cluster to version '4.22.14'? No
      > ./rosa upgrade cluster -c daxelrod-bgp-docs-2 --mode auto
      W: The '--mode' flag is not applicable for Hosted Control Plane clusters with managed policies and will be ignored
      ? Version (default = '4.22.14'):  [Use arrows to move, type to filter, ? for more help]
      

    Breaking Changes


  • No breaking changes
  • Checklist


  • Commit format follows OCM-XXXXX | type: description

  • make install-hooks has been run

  • Tests added/updated where appropriate

  • Manually tested the change
  • [ROSAENG-67141]: https://redhat.atlassian.net/browse/ROSAENG-67141?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Upgrade Experience
    Hosted Control Plane clusters using managed policies can schedule upgrades without selecting or validating an IAM upgrade mode. If --mode is explicitly provided, the command warns that it will be ignored.
    Before scheduling, the command verifies that required account and operator managed policies are attached and reports an error if validation fails.
    Other clusters retain their existing upgrade-mode selection and role-validation behavior.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 436 lines (+327 / -109) across 5 files Reviewer: michaelryanmcneill Review duration: 412m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 436 lines diff across 5 files
    0.45
    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.364
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3597"
    general weight: 0.35
    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: 45.2% (MEDIUM) · Higher = larger blast radius
    45.2%
    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.9% · Safe to merge
    17.9%
    Repository