CNV-97765: Normalize ARM machine platform #6727
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.55) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 500 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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.372
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #6727"
general
weight: 0.35
RoniKishner
##### What this PR does / why we need it:
platform.machine()on ARM hosts returnsaarch64, while ConsoleCLIDownload / virtctl artifact URLs usearm64(same pattern asx86_64→amd64). Without normalizing that spelling,get_and_extract_file_from_cluster()cannot match the Linux ARM download URL, and the execute path intest_disconnected_virtctlnever runsvirtctl versionon ARM.In short we need this fix to generate proper link to download virtctl.
platform.machine()returnsaarch64, where on arm machine we generate the download endpoints like:This PR:
AARCH_64 = "aarch64"and mapsaarch64→arm64(and keepsx86_64→amd64) inget_machine_platform()utilities/infra.py(per review on #6452 — avoid a new tiny module just for unit-testability)utilities/unittests/test_infra.py(including unknown-arch pass-through)##### Which issue(s) this PR fixes:
Supersedes / continues https://github.com/RedHatQE/openshift-virtualization-tests/pull/6452
##### Special notes for reviewer:
Context carried over from review discussion on #6452:
AARCH_64exists (vs onlyARM_64): these are different string spellings, not two CPU architectures. Hosts reportaarch64; download links use arm64. Matching requires normalizing hostaarch64→ URLarm64, analogous tox86_64→amd64.utilities/machine_platform.pyto avoidsys.modulessurgery in unit tests. @geetikakay asked to keep it ininfra.pyinstead of proliferating tiny modules — addressed here; tests use the existing importlib dance for the realinframodule.get_and_extract_file_from_cluster/download_file_from_clusterfilter ConsoleCLIDownload hrefs bysystem_os+machine_typesubstrings;test_download_and_execute_virtcli_binary_linux[linux_arm64]only executes whenget_machine_platform() == "arm64".AARCH_64constant coverage lives inutilities/unittests/test_constants.py(value assertion).utilities/unittests/test_architecture.pycoversget_cluster_architecture()behavior and is unrelated to this constant spelling addition, so it was not modified.infra.py. Full ARM cluster/checkup-image E2E remains the strongest pre-merge proof for the download+execute path; local ARM VM snippet validation was attached in PR comments as a lighter alternative to reserving AWS ARM64 capacity.<mijankow@redhat.com>.Signed-off-by: Michal Jankowski <mijankow@redhat.com>
##### jira-ticket:
https://issues.redhat.com/browse/CNV-97765
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
- Platform architecture names are now normalized to lowercase. The common
x86_64andaarch64names are reported asamd64andarm64, respectively; other architecture names are returned in lowercase.- Added the
aarch64architecture identifier.<!-- end of auto-generated comment: release notes by coderabbit.ai -->