[4.22] Remove DataSource storage class fallback from DV template helper (#4985)#5156
Conversation
…HatQE#4985) ##### What this PR does / why we need it: When calling `data_volume_template_with_source_ref_dict` we should either use it with explicit `storage_class` field, or omit the field and use the default storage class. Relying on the storage class of the DataSources can cause miss interpretations, while also causing issues since it is not possible to match the storage class to the DataSource, if a snap shot storage class is used. ##### Which issue(s) this PR fixes: Failing tests when snapshot storage classes are set. ##### Special notes for reviewer: Since we could not decide the storage class according to the `VolumeSnapshot` that was used when creating the VM, this is the approach we decided to use. ##### 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-88988 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Data volumes now use only an explicitly provided storage class and no longer inherit or default from referenced sources, preventing unexpected storage-class selection. * **Tests** * Test suite updated to validate scoped storage-class selection; test fixtures adjusted to consistently provide the chosen storage class across scopes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Roni Kishner <rkishner@redhat.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (5)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Report bugs in Issues Welcome! 🎉This pull request will be automatically processed with the following features: 🔄 Automatic Actions
📋 Available CommandsPR Status Management
Review & Approval
Testing & Validation
Container Operations
Cherry-pick Operations
Label Management
✅ Merge RequirementsThis PR will be automatically approved when the following conditions are met:
📊 Review ProcessApprovers and ReviewersApprovers:
Reviewers:
Available Labels
AI Features
💡 Tips
For more information, please refer to the project documentation or contact the maintainers. |
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/verified |
Test execution plan request detailsCRITICAL: You MUST post an inline review comment on the first changed line of the first file. As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan. Analysis Requirements:
Output rules: Your deliverable: Test Execution Plan
Use these formats:
Real test commands (MANDATORY when changes affect session/runtime code): When the affected code runs at session/collection time (conftest fixtures, pytest plugins,
Example output for a session-startup fix: Guidelines:
Hardware-Related Checks (SR-IOV, GPU, DPDK): When PR modifies fixtures for hardware-specific resources:
CRITICAL WORKFLOW COMPLETION RULES: When responding to this test execution plan request, you MUST follow these rules EXACTLY:
ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):
Remember: The pull request review is visible to users. Additional comments are redundant noise. CRITICAL — Verification rules for smoke and gating decisions: |
|
/approve |
|
/approve cancel |
|
/lgtm cancel |
rnetser
left a comment
There was a problem hiding this comment.
this is a manual chery pick; please use the standard PR description template
Done |
|
/cherry-pick cnv-4.21 |
|
Cherry-pick branch created, but PR creation failed |
|
New container for quay.io/openshift-cnv/openshift-virtualization-tests:cnv-4.22 published |
…er (RedHatQE#4985) (RedHatQE#5156) ##### What this PR does / why we need it: When calling `data_volume_template_with_source_ref_dict` we should either use it with explicit `storage_class` field, or omit the field and use the default storage class. Relying on the storage class of the DataSources can cause miss interpretations, while also causing issues since it is not possible to match the storage class to the DataSource, if a snap shot storage class is used. ##### Which issue(s) this PR fixes: Failing tests when snapshot storage classes are set. ##### Special notes for reviewer: Cherry-pick from main branch, original PR: RedHatQE#4985 ##### 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-88988 Signed-off-by: Roni Kishner <rkishner@redhat.com> Signed-off-by: Jose Manuel Castano <joscasta@redhat.com>
What this PR does / why we need it:
When calling
data_volume_template_with_source_ref_dictwe should either use it with explicitstorage_classfield, or omit the field and use the default storage class.Relying on the storage class of the DataSources can cause miss interpretations, while also causing issues since it is not possible to match the storage class to the DataSource, if a snap shot storage class is used.
Which issue(s) this PR fixes:
Failing tests when snapshot storage classes are set.
Special notes for reviewer:
Cherry-pick from main branch, original PR: #4985
jira-ticket:
https://redhat.atlassian.net/browse/CNV-88988