storage: Refactor data_volume_template functions #5622
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 165 lines diff across 2 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.306
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #5622"
general
weight: 0.35
geetikakay
##### What this PR does / why we need it:
- Passes an explicit client to the
DataVolumeobjects built indata_volume_template_dict_with_pvc_sourceanddata_volume_template_with_source_ref_dict- Simplifies
data_volume_template_dict_with_pvc_sourceto no longer fall back to the source PVC'sstorageClassName/volumeMode/api_name, using the caller-provided storage_class/volume_mode and a fixedapi_name="storage"instead.##### Which issue(s) this PR fixes:
FutureWarningshowing when running tests##### Special notes for reviewer:
##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->
https://redhat.atlassian.net/browse/CNV-68519
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
Summary by CodeRabbit
Bug Fixes
Improved reliability when creating storage-backed data volume templates.
Ensured generated templates consistently use the originating storage connection.
Prevented unintended automatic overrides of storage class and volume mode settings when values are not explicitly provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->