Skip to content

[Main] Storage: Change Cirros images for RHEL from DataSource into upgrade tests#5003

Open
josemacassan wants to merge 4 commits into
RedHatQE:mainfrom
josemacassan:improve-datasource-upgrade-test-4.20-main
Open

[Main] Storage: Change Cirros images for RHEL from DataSource into upgrade tests#5003
josemacassan wants to merge 4 commits into
RedHatQE:mainfrom
josemacassan:improve-datasource-upgrade-test-4.20-main

Conversation

@josemacassan

@josemacassan josemacassan commented May 26, 2026

Copy link
Copy Markdown
Contributor
Short description:

Forwardport: #2917

More details:
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:
jira-ticket:

Summary by CodeRabbit

  • Tests

    • Updated storage snapshot-restore upgrade tests to use RHEL 10 VMs instead of CirrOS.
    • Standardized expected upgrade artifact filenames and contents via shared constants.
    • Adjusted upgrade test flows to provision the new VMs, inject the expected files over SSH, and verify presence/absence before and after restore.
  • Refactor

    • Removed a CirrOS-specific guest command helper and replaced it with SSH-based verification utilities, including a disk-serial assertion helper.

@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 071e1e9f-6ccc-4fe2-a7e5-d57a3d6204cc

📥 Commits

Reviewing files that changed from the base of the PR and between 33a3a3f and 99ec8ef.

📒 Files selected for processing (5)
  • tests/storage/upgrade/conftest.py
  • tests/storage/upgrade/constants.py
  • tests/storage/upgrade/test_upgrade_storage.py
  • tests/storage/upgrade/utils.py
  • utilities/storage.py

📝 Walkthrough

Walkthrough

Replace CirrOS-based snapshot-upgrade VMs with RHEL10 fixtures, add shared upgrade-file constants, refactor VM creation to accept data-source-backed volumes and inject files via SSH, update three snapshot/restore tests to use RHEL VMs and generic SSH-based command helpers, and remove the CirrOS console-based helper while adding disk-serial assertion.

Changes

Storage Upgrade Test Enhancements

Layer / File(s) Summary
Upgrade test file constants
tests/storage/upgrade/constants.py
New module with four string constants: UPGRADE_FIRST_FILE_NAME, UPGRADE_FIRST_FILE_CONTENT, UPGRADE_SECOND_FILE_NAME, UPGRADE_SECOND_FILE_CONTENT for shared use across fixtures, utilities, and tests.
Utilities refactor: imports and VM creation
tests/storage/upgrade/utils.py
Rework imports from create_cirros_vm/write_file to VirtualMachineForTests/running_vm, data_volume_template_with_source_ref_dict, and write_file_via_ssh; update create_vm_for_snapshot_upgrade_tests to accept a data_source parameter, provision VMs via templated data volumes, and write the first upgrade file via SSH using constants; update create_snapshot_for_upgrade to inject the second file via SSH using constants.
RHEL10 VM and snapshot fixtures
tests/storage/upgrade/conftest.py
Add session-scoped rhel_vm_for_upgrade_a and rhel_vm_for_upgrade_b fixtures using modern_cpu_for_migration and rhel10_data_source_scope_session; update snapshots_for_upgrade_a/b to source snapshots from RHEL VM fixtures instead of removed CirrOS fixtures.
Test module import updates
tests/storage/upgrade/test_upgrade_storage.py
Import upgrade file constants and replace CirrOS console-specific helpers with run_command_on_vm_and_check_output for generic SSH-based file verification.
Test method rewrites: snapshot/restore verification
tests/storage/upgrade/test_upgrade_storage.py
Rewrite test_vm_snapshot_restore_before_upgrade, test_vm_snapshot_restore_check_after_upgrade, and test_vm_snapshot_restore_create_after_upgrade to use RHEL VM fixtures, conditionally stop the VM if running, wait for restore completion, ensure the VM is running, then assert first-file presence/content and second-file absence using shared constants and generic SSH command helper.
Storage utility helper replacement
utilities/storage.py
Remove run_command_on_cirros_vm_and_check_output (CirrOS console-based); add assert_disk_serial that SSH-runs disk-by-id listing via run_ssh_commands and asserts HOTPLUG_DISK_SERIAL presence.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • RedHatQE/openshift-virtualization-tests#4928: Both PRs modify the storage upgrade test setup by changing fixtures in tests/storage/upgrade/conftest.py and expectations in tests/storage/upgrade/test_upgrade_storage.py, specifically around VM-based snapshot/upgrade fixtures.

Suggested reviewers

  • jpeimer
  • kgoldbla
  • dshchedr
  • rlobillo
  • dalia-frank
  • ema-aka-young
  • acinko-rh
  • Ahmad-Hafe
  • kshvaika
  • rnetser

Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Description check ❌ Error The PR description is largely incomplete. Only the 'Short description' section (forwardport reference) is filled; critical template fields like 'What this PR does / why we need it', 'Which issue(s) this PR fixes', 'Special notes for reviewer', and 'jira-ticket' are empty or missing. Complete the description template: explain the rationale for replacing CirrOS with RHEL VMs, reference the related issue/JIRA ticket, provide reviewer notes about the storage class optimization mentioned in comments, and fill all required sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: replacing CirrOS with RHEL images in upgrade tests, is under 120 chars, and accurately reflects the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stp Link Required ✅ Passed No newly added test files or test functions found. PR modifies existing test functions and adds constants file, which are not subject to STP link requirement.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Linked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped RedHatQE/openshift-virtualization-tests-design-docs.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

Report bugs in Issues

Welcome! 🎉

This pull request will be automatically processed with the following features:

🔄 Automatic Actions

  • Reviewer Assignment: Reviewers are automatically assigned based on the OWNERS file in the repository root
  • Size Labeling: PR size labels (XS, S, M, L, XL, XXL) are automatically applied based on changes
  • Issue Creation: A tracking issue is created for this PR and will be closed when the PR is merged or closed
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified
  • Labels: Enabled categories: branch, can-be-merged, cherry-pick, has-conflicts, hold, needs-rebase, size, verified, wip

📋 Available Commands

PR Status Management

  • /wip - Mark PR as work in progress (adds WIP: prefix to title)
  • /wip cancel - Remove work in progress status
  • /hold - Block PR merging (approvers only)
  • /hold cancel - Unblock PR merging
  • /verified - Mark PR as verified
  • /verified cancel - Remove verification status
  • /reprocess - Trigger complete PR workflow reprocessing (useful if webhook failed or configuration changed)
  • /regenerate-welcome - Regenerate this welcome message

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /assign-reviewers - Assign reviewers based on OWNERS file
  • /assign-reviewer @username - Assign specific reviewer
  • /check-can-merge - Check if PR meets merge requirements

Testing & Validation

  • /retest tox - Run Python test suite with tox
  • /retest build-container - Rebuild and test container image
  • /retest verify-bugs-are-open - verify-bugs-are-open
  • /retest all - Run all available tests

Container Operations

  • /build-and-push-container - Build and push container image (tagged with PR number)
    • Supports additional build arguments: /build-and-push-container --build-arg KEY=value

Cherry-pick Operations

  • /cherry-pick <branch> - Schedule cherry-pick to target branch when PR is merged
    • Multiple branches: /cherry-pick branch1 branch2 branch3

Label Management

  • /<label-name> - Add a label to the PR
  • /<label-name> cancel - Remove a label from the PR

✅ Merge Requirements

This PR will be automatically approved when the following conditions are met:

  1. Approval: /approve from at least one approver
  2. LGTM Count: Minimum 2 /lgtm from reviewers
  3. Status Checks: All required status checks must pass
  4. No Blockers: No wip, hold, has-conflicts labels and PR must be mergeable (no conflicts)
  5. Verified: PR must be marked as verified

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • jpeimer
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Ahmad-Hafe
  • RoniKishner
  • acinko-rh
  • dalia-frank
  • dshchedr
  • ema-aka-young
  • geetikakay
  • hmeir
  • josemacassan
  • jpeimer
  • kgoldbla
  • kshvaika
  • rlobillo
  • rnetser
  • vsibirsk
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6[1m])

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is removed on new commits unless the push is detected as a clean rebase
  • Cherry-picking: Cherry-pick labels are processed when the PR is merged
  • Container Builds: Container images are automatically tagged with the PR number
  • Permission Levels: Some commands require approver permissions
  • Auto-verified Users: Certain users have automatic verification and merge privileges

For more information, please refer to the project documentation or contact the maintainers.

@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.65%. Comparing base (a2dc143) to head (99ec8ef).
⚠️ Report is 136 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5003      +/-   ##
==========================================
- Coverage   98.67%   98.65%   -0.02%     
==========================================
  Files          25       25              
  Lines        2487     2461      -26     
==========================================
- Hits         2454     2428      -26     
  Misses         33       33              
Flag Coverage Δ
utilities 98.65% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/storage/upgrade/utils.py (1)

20-27: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

HIGH: Add explicit type hints to updated public helpers.

Both context-manager helpers are public and changed in this PR, but they remain untyped. Please add full parameter and return annotations to keep these utilities strict and self-documenting.

💡 Proposed typing shape
 from contextlib import contextmanager
+from collections.abc import Generator
+from typing import Any

 `@contextmanager`
 def create_vm_for_snapshot_upgrade_tests(
-    vm_name,
-    namespace,
-    client,
-    storage_class_for_snapshot,
-    cpu_model,
-    data_source,
-):
+    vm_name: str,
+    namespace: str,
+    client: Any,
+    storage_class_for_snapshot: str,
+    cpu_model: str,
+    data_source: Any,
+) -> Generator[VirtualMachineForTests]:
@@
 `@contextmanager`
-def create_snapshot_for_upgrade(vm, client):
+def create_snapshot_for_upgrade(vm: VirtualMachineForTests, client: Any) -> Generator[VirtualMachineSnapshot]:

As per coding guidelines: "Type hints are MANDATORY."

Also applies to: 52-53

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/storage/upgrade/utils.py` around lines 20 - 27, The public
context-manager helpers (notably create_vm_for_snapshot_upgrade_tests and the
other context-manager helper in this module) lack type hints; add explicit
annotations for all params and returns using typing (e.g., import Any, Dict,
Optional, Generator) and annotate parameters as vm_name: str, namespace: str,
client: Any, storage_class_for_snapshot: str, cpu_model: str, data_source:
Optional[Dict[str, Any]] (or a more precise dict type if known), and change the
return type to a context-manager generator like Generator[Any, None, None] or
Generator[Dict[str, Any], None, None] (use the precise VM type if available) and
apply the same full-parameter/return annotations to the other helper mentioned.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/storage/upgrade/conftest.py`:
- Around line 59-61: The test fixture calls update_scratch_space_sc but that
symbol is not defined or imported, causing a NameError at runtime; fix by
importing update_scratch_space_sc from its module (or add a local definition)
and ensure the import is added to tests/storage/upgrade/conftest.py so the
with-statement using update_scratch_space_sc (and the variable
edited_cdi_config) resolves correctly at runtime.
- Line 27: Rename the verb-named fixtures to noun-style names: change
skip_if_less_than_two_storage_classes to two_storage_classes_required and
skip_if_not_override_cdiconfig_scratch_space to
cdiconfig_scratch_space_override_required (leave
storage_class_for_updating_cdiconfig_scratch as-is); update the fixture
definitions accordingly and then update every test, conftest import or parameter
that references skip_if_less_than_two_storage_classes or
skip_if_not_override_cdiconfig_scratch_space to use the new names
two_storage_classes_required and cdiconfig_scratch_space_override_required so
all usages match the renamed fixtures.

In `@tests/storage/upgrade/test_upgrade_storage.py`:
- Around line 55-61: Remove the duplicated client keyword argument passed to the
VirtualMachineRestore constructor calls; each invocation (e.g., the one creating
vm_restore with name=f"restore-snapshot-{rhel_vm_for_upgrade_a.name}" and
namespace=snapshots_for_upgrade_a.namespace and the other similar invocation
later) currently contains client=admin_client twice — keep a single
client=admin_client and remove the redundant one so the
VirtualMachineRestore(...) calls (and variables like vm_restore,
rhel_vm_for_upgrade_a, snapshots_for_upgrade_a) use only one client kwarg.

---

Outside diff comments:
In `@tests/storage/upgrade/utils.py`:
- Around line 20-27: The public context-manager helpers (notably
create_vm_for_snapshot_upgrade_tests and the other context-manager helper in
this module) lack type hints; add explicit annotations for all params and
returns using typing (e.g., import Any, Dict, Optional, Generator) and annotate
parameters as vm_name: str, namespace: str, client: Any,
storage_class_for_snapshot: str, cpu_model: str, data_source: Optional[Dict[str,
Any]] (or a more precise dict type if known), and change the return type to a
context-manager generator like Generator[Any, None, None] or Generator[Dict[str,
Any], None, None] (use the precise VM type if available) and apply the same
full-parameter/return annotations to the other helper mentioned.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 687c7ce5-f291-469c-852b-658c127810ca

📥 Commits

Reviewing files that changed from the base of the PR and between 06b7e39 and 5f13ae0.

📒 Files selected for processing (5)
  • tests/storage/upgrade/conftest.py
  • tests/storage/upgrade/constants.py
  • tests/storage/upgrade/test_upgrade_storage.py
  • tests/storage/upgrade/utils.py
  • utilities/storage.py
💤 Files with no reviewable changes (1)
  • utilities/storage.py

Comment thread tests/storage/upgrade/conftest.py Outdated
Comment thread tests/storage/upgrade/conftest.py Outdated
Comment thread tests/storage/upgrade/test_upgrade_storage.py
@josemacassan

Copy link
Copy Markdown
Contributor Author

/build-and-push-container

@openshift-virtualization-qe-bot-4

Copy link
Copy Markdown

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5003 published

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #4985.

Overlapping files

utilities/storage.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
tests/storage/upgrade/conftest.py (1)

1-1: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

HIGH: Restore meaningful PR template content in “What this PR does / why we need it”.

The PR description still contains placeholder-only content for ##### What this PR does / why we need it:. This blocks reviewers from validating intent/scope and must be replaced with concrete rationale and expected behavior changes before merge.

As per coding guidelines: ##### What this PR does / why we need it: must be present and have meaningful content; placeholder-only text is a HIGH-severity violation.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/storage/upgrade/conftest.py` at line 1, Replace the placeholder under
the PR heading "##### What this PR does / why we need it:" with a concise,
concrete summary that states the change being introduced, the rationale, the
scope (which modules/functions are affected), and the expected behavior or
observable outcomes (including any test or migration impacts); ensure the
section mentions any relevant functions/classes or test files affected (e.g.,
tests/storage/upgrade/conftest.py) so reviewers can validate intent and scope.
tests/storage/upgrade/test_upgrade_storage.py (1)

39-40: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

HIGH: Restore required PR template content before merge.

##### What this PR does / why we need it: is currently placeholder-only in the PR description. This blocks reviewability and must be meaningful content.

As per coding guidelines: “What this PR does / why we need it: — MUST be present AND have meaningful content.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/storage/upgrade/test_upgrade_storage.py` around lines 39 - 40, The PR
description is missing meaningful content for the required template section;
update the PR body so the "##### What this PR does / why we need it:" section
contains a concise explanation of the change and its rationale (e.g., what
TestUpgradeStorage covers and why the updated_default_storage_class_ocs_virt
fixture is needed for this upgrade test), then push the corrected PR description
before merging so the template requirement is satisfied.
utilities/storage.py (1)

689-693: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

HIGH: New utility function is missing required typing and docstring contract.

assert_disk_serial is a new public helper in utilities/ and should include type hints and a Google-style docstring.

Proposed fix
-def assert_disk_serial(vm, command=_DEFAULT_DISK_SERIAL_COMMAND):
+def assert_disk_serial(
+    vm: virt_util.VirtualMachineForTests,
+    command: list[str] = _DEFAULT_DISK_SERIAL_COMMAND,
+) -> None:
+    """Assert that the VM exposes the expected hotplug disk serial in /dev/disk/by-id.
+
+    Args:
+        vm: VM to inspect over SSH.
+        command: Command token list used to query disk identifiers.
+    """
     assert (
         HOTPLUG_DISK_SERIAL
         in run_ssh_commands(host=vm.ssh_exec, commands=command, wait_timeout=TIMEOUT_2MIN, sleep=TIMEOUT_5SEC)[0]
     ), f"hotplug disk serial id {HOTPLUG_DISK_SERIAL} is not in VM"

As per coding guidelines: “Type hints are MANDATORY… all new public functions under utilities” and “Write Google-format docstrings for all public functions with non-obvious return values or side effects.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@utilities/storage.py` around lines 689 - 693, Add type hints and a
Google-style docstring to the new public function assert_disk_serial: annotate
parameters (vm: virtual machine type — e.g., VM or whatever class represents vm
in this module — and command: str = _DEFAULT_DISK_SERIAL_COMMAND) and the return
type as None; then add a Google-format docstring above the function that
describes the purpose, parameters (vm, command), the side effect (raises
AssertionError if HOTPLUG_DISK_SERIAL not present), and mentions it calls
run_ssh_commands and checks HOTPLUG_DISK_SERIAL in the command output to help
locate behavior; keep the existing assertion logic unchanged and reference
HOTPLUG_DISK_SERIAL and run_ssh_commands in the docstring.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@tests/storage/upgrade/conftest.py`:
- Line 1: Replace the placeholder under the PR heading "##### What this PR does
/ why we need it:" with a concise, concrete summary that states the change being
introduced, the rationale, the scope (which modules/functions are affected), and
the expected behavior or observable outcomes (including any test or migration
impacts); ensure the section mentions any relevant functions/classes or test
files affected (e.g., tests/storage/upgrade/conftest.py) so reviewers can
validate intent and scope.

In `@tests/storage/upgrade/test_upgrade_storage.py`:
- Around line 39-40: The PR description is missing meaningful content for the
required template section; update the PR body so the "##### What this PR does /
why we need it:" section contains a concise explanation of the change and its
rationale (e.g., what TestUpgradeStorage covers and why the
updated_default_storage_class_ocs_virt fixture is needed for this upgrade test),
then push the corrected PR description before merging so the template
requirement is satisfied.

In `@utilities/storage.py`:
- Around line 689-693: Add type hints and a Google-style docstring to the new
public function assert_disk_serial: annotate parameters (vm: virtual machine
type — e.g., VM or whatever class represents vm in this module — and command:
str = _DEFAULT_DISK_SERIAL_COMMAND) and the return type as None; then add a
Google-format docstring above the function that describes the purpose,
parameters (vm, command), the side effect (raises AssertionError if
HOTPLUG_DISK_SERIAL not present), and mentions it calls run_ssh_commands and
checks HOTPLUG_DISK_SERIAL in the command output to help locate behavior; keep
the existing assertion logic unchanged and reference HOTPLUG_DISK_SERIAL and
run_ssh_commands in the docstring.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 41eb2313-9769-4270-a656-c35eb83f69a8

📥 Commits

Reviewing files that changed from the base of the PR and between 7a56b07 and 33a3a3f.

📒 Files selected for processing (5)
  • tests/storage/upgrade/conftest.py
  • tests/storage/upgrade/constants.py
  • tests/storage/upgrade/test_upgrade_storage.py
  • tests/storage/upgrade/utils.py
  • utilities/storage.py

@josemacassan

Copy link
Copy Markdown
Contributor Author

/build-and-push-container

1 similar comment
@josemacassan

Copy link
Copy Markdown
Contributor Author

/build-and-push-container

@openshift-virtualization-qe-bot-5

Copy link
Copy Markdown

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5003 published

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

/build-and-push-container

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5003 published

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

Verification failed for PR #5003 (image: openshift-virtualization-tests:pr-5003).
Result: UNSTABLE
Job: openshift-virtualization-tests-runner #5549

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

/build-and-push-container

@openshift-virtualization-qe-bot-4

Copy link
Copy Markdown

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5003 published

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

Verification failed for PR #5003 (image: openshift-virtualization-tests:pr-5003).
Result: ABORTED
Job: openshift-virtualization-tests-runner #5559

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

/build-and-push-container

@openshift-virtualization-qe-bot-2

Copy link
Copy Markdown
Contributor

New container for quay.io/openshift-cnv/openshift-virtualization-tests:pr-5003 published

@openshift-virtualization-qe-bot

Copy link
Copy Markdown

Verification failed for PR #5003.
Result: UNSTABLE
Job: openshift-virtualization-tests-runner #5574

Execution details
pytest -s -o log_cli=true -m tier2 --jira --skip-deprecated-api-test --upgrade cnv --cnv-version 4.22.0 --cnv-channel=candidate --storage-class-matrix=hostpath-csi-basic,ocs-storagecluster-ceph-rbd-virtualization --cluster-sanity-skip-check -m 'not
Image: openshift-virtualization-tests:pr-5003

@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

/retest all

Auto-triggered: Files in this PR were modified by merged PR #5120.

Overlapping files

utilities/storage.py

@josemacassan

Copy link
Copy Markdown
Contributor Author

/wip

@jpeimer

jpeimer commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Execution details
pytest -s -o log_cli=true -m tier2 --jira --skip-deprecated-api-test --upgrade cnv --cnv-version 4.22.0 --cnv-channel=candidate --storage-class-matrix=hostpath-csi-basic,ocs-storagecluster-ceph-rbd-virtualization

We run upgrades without HPP, so we can pass OCS only - to save some time and resources:
--storage-class-matrix=ocs-storagecluster-ceph-rbd-virtualization

@josemacassan

Copy link
Copy Markdown
Contributor Author

/wip cancel

josemacassan and others added 4 commits June 22, 2026 09:03
…tests. (RedHatQE#2917)

Change use of Cirros images coming from artifactory to RHEL coming from
DataSource into upgrade tests. `tests/storage/upgrade`.
We are refactoring tests by using RHEL images from DataSource, for this
I have changed all the Cirros resources into upgrade tests as well as
RHEL utilities and config functions
I have added a function called `write_file_via_ssh` that writes a file
using `run_ssh_commands` function. It has an internal import to avoid
circular import errors I was facing. Programmatically I think is not a
very good practice so I appreciate some comments specially in there
(perhaps `utilities/storage.py` is not the best place to locate it, and
other place might avoid those errors).
https://issues.redhat.com/browse/CNV-69123

---------

Signed-off-by: Jose Manuel Castano <joscasta@redhat.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Remove unused fixtures that reference non-existent update_scratch_space_sc
function (removed in fbda8ef). Fix duplicate client keyword arguments in
VirtualMachineRestore constructor calls.

Signed-off-by: Jose Manuel Castano <joscasta@redhat.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixes B008 ruff violation by using _DEFAULT_DISK_SERIAL_COMMAND
instead of calling shlex.split() in function argument default.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Jose Manuel Castano <joscasta@redhat.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
utilities/storage.py (1)

111-111: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

HIGH: Restore required PR template sections before merge

The PR description is missing required template content (especially meaningful text under ##### What this PR does / why we need it:), which is a mandatory repo policy and should be fixed before approval.

As per coding guidelines, required PR template sections must be present and “What this PR does / why we need it:” must have meaningful content.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@utilities/storage.py` at line 111, Update the PR description by restoring all
required template sections, particularly ensuring that the "What this PR does /
why we need it:" section is present and contains meaningful, descriptive content
that clearly explains the purpose and rationale for the changes being made. This
is a mandatory repository policy that must be satisfied before the PR can be
approved.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/storage/upgrade/test_upgrade_storage.py`:
- Line 1: The pull request template is incomplete and missing required sections
that must be filled before merge. Update the PR description to include all
mandatory template headers, and specifically ensure that the "What this PR does
/ why we need it:" section contains meaningful, substantive text that clearly
explains the purpose and rationale for the changes rather than leaving it blank
or with placeholder text. This is a required process step that must be completed
prior to merge approval.

---

Outside diff comments:
In `@utilities/storage.py`:
- Line 111: Update the PR description by restoring all required template
sections, particularly ensuring that the "What this PR does / why we need it:"
section is present and contains meaningful, descriptive content that clearly
explains the purpose and rationale for the changes being made. This is a
mandatory repository policy that must be satisfied before the PR can be
approved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 071e1e9f-6ccc-4fe2-a7e5-d57a3d6204cc

📥 Commits

Reviewing files that changed from the base of the PR and between 33a3a3f and 99ec8ef.

📒 Files selected for processing (5)
  • tests/storage/upgrade/conftest.py
  • tests/storage/upgrade/constants.py
  • tests/storage/upgrade/test_upgrade_storage.py
  • tests/storage/upgrade/utils.py
  • utilities/storage.py

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
utilities/storage.py (1)

111-111: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

HIGH: Restore required PR template sections before merge

The PR description is missing required template content (especially meaningful text under ##### What this PR does / why we need it:), which is a mandatory repo policy and should be fixed before approval.

As per coding guidelines, required PR template sections must be present and “What this PR does / why we need it:” must have meaningful content.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@utilities/storage.py` at line 111, Update the PR description by restoring all
required template sections, particularly ensuring that the "What this PR does /
why we need it:" section is present and contains meaningful, descriptive content
that clearly explains the purpose and rationale for the changes being made. This
is a mandatory repository policy that must be satisfied before the PR can be
approved.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/storage/upgrade/test_upgrade_storage.py`:
- Line 1: The pull request template is incomplete and missing required sections
that must be filled before merge. Update the PR description to include all
mandatory template headers, and specifically ensure that the "What this PR does
/ why we need it:" section contains meaningful, substantive text that clearly
explains the purpose and rationale for the changes rather than leaving it blank
or with placeholder text. This is a required process step that must be completed
prior to merge approval.

---

Outside diff comments:
In `@utilities/storage.py`:
- Line 111: Update the PR description by restoring all required template
sections, particularly ensuring that the "What this PR does / why we need it:"
section is present and contains meaningful, descriptive content that clearly
explains the purpose and rationale for the changes being made. This is a
mandatory repository policy that must be satisfied before the PR can be
approved.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 071e1e9f-6ccc-4fe2-a7e5-d57a3d6204cc

📥 Commits

Reviewing files that changed from the base of the PR and between 33a3a3f and 99ec8ef.

📒 Files selected for processing (5)
  • tests/storage/upgrade/conftest.py
  • tests/storage/upgrade/constants.py
  • tests/storage/upgrade/test_upgrade_storage.py
  • tests/storage/upgrade/utils.py
  • utilities/storage.py
📜 Review details
🔇 Additional comments (5)
utilities/storage.py (1)

145-148: LGTM!

tests/storage/upgrade/constants.py (1)

1-9: LGTM!

tests/storage/upgrade/utils.py (1)

3-16: LGTM!

Also applies to: 26-47, 61-64

tests/storage/upgrade/conftest.py (1)

27-43: LGTM!

Also applies to: 45-52, 54-71, 73-79

tests/storage/upgrade/test_upgrade_storage.py (1)

1-13: LGTM!

Also applies to: 23-36, 60-86, 135-150, 164-191, 203-208, 218-218

🛑 Comments failed to post (1)
tests/storage/upgrade/test_upgrade_storage.py (1)

1-1: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

HIGH: PR template sections are missing/empty and should be restored before merge.

The PR description must include all required template headers, and What this PR does / why we need it: must contain meaningful text (not placeholders/blank).
As per coding guidelines, PR template sections are mandatory and this should be treated as a high-severity process blocker.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/storage/upgrade/test_upgrade_storage.py` at line 1, The pull request
template is incomplete and missing required sections that must be filled before
merge. Update the PR description to include all mandatory template headers, and
specifically ensure that the "What this PR does / why we need it:" section
contains meaningful, substantive text that clearly explains the purpose and
rationale for the changes rather than leaving it blank or with placeholder text.
This is a required process step that must be completed prior to merge approval.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants