← Back to Pull requests

refactor(api): remove ActualHostedCluster from ServiceProviderCluster #7485

Closed
unknown closed this pull request without merging on Oct 15, 2026 13:56 UTC
View on GitHub
unknown unknown commented on Oct 12, 2026 23:56 UTC
Author

Summary

Removes the ActualHostedCluster field from ServiceProviderClusterStatus and all of its usages, now that the admission plugin consults the dedicated ImageContentSources field added in #7484.

Tracking

No Jira tracking ticket — this is an incremental API change requested directly by the ARO-HCP team. A tracking issue can be linked if one is required.

Stacked on #7484. This branch is based on that PR's branch. Until #7484 merges, the diff shown here also includes its commits — review the removal commit c6f94bff9 in isolation, or review after #7484 merges (GitHub will then narrow this PR to just the removal). This PR should merge after #7484.

Changes (removal commit c6f94bff9)

  • Remove ActualHostedCluster v1beta1.HostedCluster from ServiceProviderClusterStatus (internal/api/coreapi/types_serviceprovider_cluster.go); regenerate deepcopy.

  • Controller (backend/pkg/controllers/cluster/hostedcluster/actual_hosted_cluster_controller.go): stop populating ActualHostedCluster; populate only ImageContentSources; write-suppression adjusted.

  • Admission (internal/admission/admit_cluster.go): drop the ActualHostedCluster fallback in admitClusterV5DataPlaneMirror — a nil ImageContentSources now fails closed (unavailable), and a non-nil value is checked via ImageContentSourcesHaveSource.

  • Remove the now-unused HostedClusterHasImageContentSource helper (kept ImageContentSourcesHaveSource).

  • Update tests and docs (docs/cosmos-data-flow.md, internal/admission/CLAUDE.md).
  • Note: the controller type/file/metrics names deliberately retain the "ActualHostedCluster" identity to preserve controller and metrics continuity; only the API field and its usages are removed. (10 files, +79/−217.)

    Validation

  • make deepcopy + make verify-deepcopy: clean

  • make lint: 0 issues

  • make verify: pass

  • Unit tests: internal (48 packages) and backend (56 packages) pass
  • ---
    AI-generated. Review for accuracy.*

    @deads2k requested from Slack

    Diff: 252 lines (+189 / -63) across 3 files Reviewer: machi1990 Review duration: 3720m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.39) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 252 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%
    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.331
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7485"
    general weight: 0.35
    Reviewers
    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: 39% (MEDIUM) · Higher = larger blast radius
    39%
    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: 16.9% · Safe to merge
    16.9%
    Repository