feat : ARO-24013 | Remove direct autoscaler patch call from RP and pass autoscaler via patch cluster #5784
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 496 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.371
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5784"
general
weight: 0.35
nimrodshn
Jira Issue
Remove direct autoscaler patch call from RP and pass autoscaler via patch cluster
What
Why
<!-- Briefly explain why this change is needed -->
Testing
Testing is required for feature completion and tests should be part of the pull
request along with the feature changes.
Describe the testing provided. If you did not add tests, provide a clear
justification.
(internal/ocm/convert_test.go) - Already test autoscaler builder construction
Updated mock properly extracts autoscaler history for verification
No New Tests Required: This is a refactoring change that doesn't alter external behavior - the ARM API contract remains unchanged. Existing tests validate the consolidated approach.
Manual Testing
1. patch autoscaler call was present in patch cluster RP call. After changes it is removed and confirmed using logs
Before changes patch cluster and patch autoscaler call is present in logs-

<img width="2994" height="364" alt="image" src="https://github.com/user-attachments/assets/2b3bfd37-8c70-426f-a64e-6fae8142bf0d" />
After changes only patch cluster call is present in logs -
<img width="1498" height="217" alt="image" src="https://github.com/user-attachments/assets/475993d0-5e83-4630-aeec-16f8768e4028" />
2. Patch Cluster with autoscaler payload. Check the autoscaler is updated.

Autoscaler values before patch
<img width="2994" height="398" alt="image" src="https://github.com/user-attachments/assets/26c92869-4912-48c9-9d7b-217897041c0f" />
Patch cluster payload -
Success -
<img width="2994" height="1752" alt="image" src="https://github.com/user-attachments/assets/14bba6aa-aa24-4ac6-a5a7-0083d5551476" />
Get Autoscaler changes to check the updation -
<img width="2950" height="436" alt="image" src="https://github.com/user-attachments/assets/03621c5d-d566-4799-a09e-b78738469ed8" />
Special notes for your reviewer
<!-- optional -->
PR Checklist
If E2E tests are included:
E2E test will be covered in https://github.com/Azure/ARO-HCP/pull/5932 this PR.