← Back to Pull requests

CNV-97765: Normalize ARM machine platform #6452

Closed
unknown closed this pull request without merging on Oct 29, 2026 15:52 UTC
View on GitHub
unknown unknown commented on Oct 05, 2026 15:11 UTC
Author

##### What this PR does / why we need it:

Normalize aarch64 to the existing ARM_64 (arm64) value in get_machine_platform() so ARM machine names match the architecture spelling used for binary artifacts. Preserve the existing x86_64 to amd64 mapping and pass-through behavior for other architectures.

Add AARCH_64 to the architecture constants and isolate the pure normalization helper in utilities/machine_platform.py. utilities.infra re-exports it for existing callers. Focused constants/helper tests import the real helper directly, without sys.modules manipulation or module-mock restoration.

##### Which issue(s) this PR fixes:

ARM architecture-name normalization in cluster binary-artifact selection.

##### Special notes for reviewer:

Source inspection confirms the ARM execution guard in tests/install_upgrade_operators/console_cli_download/test_disconnected_virtctl.py can now match hosts reporting aarch64: its get_machine_platform() == platform comparison can match the ARM parameter's arm64 value. This is source-level verification, not evidence of an ARM cluster or full-image E2E run.

Rebased onto main at 7902463e5c659109c872ac938069f73ec6ff164c, preserving the original normalization changes. A follow-up adds only a descriptive assertion failure message required by the current test policy.

Local validation on commit f74a10e3e3280f8dd187146ea64e166e00d71025:

  • uv run pre-commit run --all-files: all hooks passed.

  • uv run tox -e utilities-unittests: 935 tests passed, 99.33% coverage against the required 95%.

  • uv run tox: all six configured local environments passed. These include collection checks and do not establish end-to-end ARM cluster validation.

  • Focused constants/helper tests: 24 passed in the repository-supported unit-test context.

  • Repository policy checks: all five policy families passed against the complete staged PR delta; the audited tree matches the final committed tree.
  • A prior standalone import-order probe without Kubernetes configuration failed. It was not rerun for this rebase and is not counted as passing validation.

    To repeat the focused verification:

    uv run --extra utilities-test pytest utilities/unittests/test_machine_platform.py utilities/unittests/test_constants.py -v
    

    Image-based ARM end-to-end validation is pending. Before merge, verify a full checkup image containing this tests revision through the checkup project's matching self-validation procedure on ARM nodes. Local unit tests are not a substitute for that verification.

    Jira integration is intentionally not enabled: no ticket URL is supplied below.

    ##### jira-ticket:
    NONE

    ---
    AI-generated. Review for accuracy.

    @dominikholler requested from Slack

    Diff: 342 lines (+256 / -86) across 4 files Reviewer: geetikakay Review duration: 34600m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 342 lines diff across 4 files
    0.42
    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.349
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #6452"
    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.3% (MEDIUM) · Higher = larger blast radius
    42.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: 16.7% · Safe to merge
    16.7%