Skip to content

Conversation

@Ahmad-Hafe
Copy link
Contributor

@Ahmad-Hafe Ahmad-Hafe commented Dec 1, 2025

Short description:

Quarantine tests:
test_vm_storage_class_migration_windows_vm_with_vtpm
test_vm_storage_class_migration_with_hotplugged_volume
due to a Timeout waiting for succeeded MigMigration.

jira-ticket:

https://issues.redhat.com/browse/CNV-73329

Summary by CodeRabbit

  • Tests
    • Marked specific Windows migration test scenarios as expected failures due to timeout issues, preventing unnecessary test execution for known problematic conditions.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Walkthrough

This pull request modifies a storage migration test file to import the QUARANTINED constant and apply @pytest.mark.xfail(run=False) decorators to three test functions, marking them as quarantined to skip execution for specific Windows storage migration scenarios.

Changes

Cohort / File(s) Summary
Test quarantining for Windows storage migration
tests/storage/storage_migration/test_mtc_storage_class_migration.py
Updated imports to include QUARANTINED from utilities.constants; applied @pytest.mark.xfail(run=False, reason=QUARANTINED) decorators to three test functions to skip execution and indicate expected timeouts for Windows migration scenarios.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Simple import addition and consistent repetition of the same xfail decorator pattern across three tests
  • No logic changes or complex conditional logic to evaluate
  • Straightforward quarantine marker application

Possibly related PRs

Suggested labels

verified, size/XS, can-be-merged, branch-main, tox:verify-tc-requirement-polarion:passed, tox:verify-bugs-are-open:passed, sig-storage, lgtm-openshift-virtualization-qe-bot, commented-coderabbitai[bot]

Suggested reviewers

  • jpeimer
  • kgoldbla
  • stesrn
  • duyanyan
  • kshvaika

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: quarantining migration tests due to MigMigration timeout issues.
Description check ✅ Passed The PR description includes the short description and jira-ticket sections as required, but lacks other template sections like 'More details', 'What this PR does / why we need it', and 'Special notes for reviewer'.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 31945c1 and 712881f.

📒 Files selected for processing (1)
  • tests/storage/storage_migration/test_mtc_storage_class_migration.py (3 hunks)
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 2469
File: utilities/sanity.py:139-142
Timestamp: 2025-11-08T07:36:57.616Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers to keep refactoring PRs (like PR #2469) strictly focused on moving/organizing code into more granular modules without adding new functionality, error handling, or behavioral changes. Such improvements should be handled in separate PRs.
Learnt from: vamsikrishna-siddu
Repo: RedHatQE/openshift-virtualization-tests PR: 2199
File: tests/storage/test_online_resize.py:108-113
Timestamp: 2025-09-28T14:43:07.181Z
Learning: In the openshift-virtualization-tests repo, PR #2199 depends on PR #2139 which adds architecture-specific OS_FLAVOR attributes to the Images.Cirros class (OS_FLAVOR_CIRROS for x86_64/ARM64, OS_FLAVOR_FEDORA for s390x), enabling conditional logic based on the underlying OS flavor in tests.
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-09-29T19:05:24.987Z
Learning: For PR #1904 test execution, the critical validation point is test_connectivity_over_migration_between_localnet_vms which should fail gracefully on cloud clusters but pass on bare-metal/PSI clusters, representing the core nmstate conditional logic functionality.
Learnt from: vamsikrishna-siddu
Repo: RedHatQE/openshift-virtualization-tests PR: 2199
File: tests/storage/test_online_resize.py:108-113
Timestamp: 2025-09-28T14:43:07.181Z
Learning: In the openshift-virtualization-tests repo, PR #2199 depends on PR #2139 which adds the OS_FLAVOR attribute to the Images.Cirros class, making Images.Cirros.OS_FLAVOR available for conditional logic in tests.
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 2045
File: tests/virt/cluster/vm_lifecycle/conftest.py:46-47
Timestamp: 2025-09-15T06:49:53.478Z
Learning: In the openshift-virtualization-tests repo, large fixture refactoring efforts like the golden image data source migration are handled incrementally by directory/team ownership. The virt/cluster directory is handled separately from virt/node, tests/infra, tests/storage, etc., with each area managed by relevant teams in follow-up PRs.
Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/conftest.py:83-97
Timestamp: 2025-06-23T19:19:31.961Z
Learning: In OpenShift Virtualization mass machine type transition tests, the kubevirt_api_lifecycle_automation_job requires cluster-admin privileges to function properly, as confirmed by the test maintainer akri3i.
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1236
File: conftest.py:539-557
Timestamp: 2025-06-18T13:26:04.504Z
Learning: In the openshift-virtualization-tests repository, PR #1236 intentionally limits error extraction to the setup phase only in the pytest_runtest_makereport hook. The scope is deliberately restricted to setup failures, not all test phases.
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 1932
File: tests/virt/node/migration_and_maintenance/conftest.py:57-64
Timestamp: 2025-09-08T21:34:28.924Z
Learning: In OpenShift Virtualization tests, MigrationPolicy fixtures should use static names rather than unique suffixes to enable collision detection. If parallel test runs collide on cluster-scoped resource names like MigrationPolicy, it's better to know about the collision rather than hide it with unique naming, as confirmed by maintainer dshchedr.
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 2838
File: .github/workflows/net-utils-builder-staging.yml:37-37
Timestamp: 2025-11-25T01:56:54.902Z
Learning: In the openshift-virtualization-tests repository, when renaming container images that are built and used by GitHub Actions workflows, the changes must be done sequentially: first merge the workflow files (.github/workflows/) that update the image name in the CI/CD pipelines, then update the code references (like constants.py and manifest files) in a follow-up PR. This prevents the old workflow from running with mismatched image names during the transition.
Learnt from: SiboWang1997
Repo: RedHatQE/openshift-virtualization-tests PR: 1566
File: tests/global_config_x86_64.py:29-29
Timestamp: 2025-07-25T01:59:02.180Z
Learning: In the openshift-virtualization-tests repo, the s390x architecture still relies on Fedora 41 images, while only x86_64 is updated to Fedora 42 in PR #1566.
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1244
File: tests/virt/cluster/common_templates/windows/test_windows_custom_options.py:181-181
Timestamp: 2025-06-19T09:56:06.185Z
Learning: In tests/virt/cluster/common_templates/windows/test_windows_custom_options.py, the change from os.path.join to f-string path construction is intentional to handle cases where Images.Windows.WIN2k19_HA_IMG may be None during test collection on architectures where Windows images aren't available. The f-string approach allows pytest collection to succeed gracefully, while actual test execution is controlled by markers and environmental conditions.
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 954
File: tests/storage/storage_migration/test_mtc_storage_class_migration.py:68-74
Timestamp: 2025-06-03T12:36:36.982Z
Learning: In tests/storage/storage_migration/test_mtc_storage_class_migration.py, the broad Exception catching in the VM migration test is intentional - the user wants to catch every exception and save it for future triage rather than letting specific exceptions bubble up.
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/conftest.py:1065-1077
Timestamp: 2025-06-18T09:21:34.315Z
Learning: In tests/observability/metrics/conftest.py, when creating fixtures that modify shared Windows VM state (like changing nodeSelector), prefer using function scope rather than class scope to ensure ResourceEditor context managers properly restore the VM state after each test, maintaining test isolation while still reusing expensive Windows VM fixtures.
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 1224
File: tests/storage/storage_migration/conftest.py:419-425
Timestamp: 2025-06-17T14:45:39.291Z
Learning: In tests/storage/storage_migration/conftest.py, the PowerShell command using shlex.split() with properly escaped quotes works correctly and does not break the command structure when passed to run_ssh_commands.
📚 Learning: 2025-06-03T12:36:36.982Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 954
File: tests/storage/storage_migration/test_mtc_storage_class_migration.py:68-74
Timestamp: 2025-06-03T12:36:36.982Z
Learning: In tests/storage/storage_migration/test_mtc_storage_class_migration.py, the broad Exception catching in the VM migration test is intentional - the user wants to catch every exception and save it for future triage rather than letting specific exceptions bubble up.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-06-18T09:21:34.315Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/conftest.py:1065-1077
Timestamp: 2025-06-18T09:21:34.315Z
Learning: In tests/observability/metrics/conftest.py, when creating fixtures that modify shared Windows VM state (like changing nodeSelector), prefer using function scope rather than class scope to ensure ResourceEditor context managers properly restore the VM state after each test, maintaining test isolation while still reusing expensive Windows VM fixtures.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-06-18T09:19:05.769Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/test_vms_metrics.py:129-137
Timestamp: 2025-06-18T09:19:05.769Z
Learning: For Windows VM testing in tests/observability/metrics/test_vms_metrics.py, it's acceptable to have more fixture parameters than typical pylint recommendations when reusing expensive Windows VM fixtures for performance. Windows VMs take a long time to deploy, so reusing fixtures like windows_vm_for_test and adding labels via windows_vm_with_low_bandwidth_migration_policy is preferred over creating separate fixtures that would require additional VM deployments.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-10-16T12:47:04.521Z
Learnt from: rlobillo
Repo: RedHatQE/openshift-virtualization-tests PR: 2249
File: tests/install_upgrade_operators/must_gather/test_must_gather.py:428-441
Timestamp: 2025-10-16T12:47:04.521Z
Learning: In openshift-virtualization-tests repository, DataVolumes in the openshift-virtualization-os-images namespace are volatile resources managed by DataImportCron. They can be created/destroyed between must-gather collection listing and file retrieval, requiring FileNotFoundError exception handling in test_crd_resources to skip these volatile resources gracefully while still validating DataVolumes in other namespaces. There is no pytest_generate_tests hook that filters out datavolumes from test parametrization.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-08-13T06:27:29.727Z
Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 1641
File: tests/infrastructure/golden_images/test_common_templates_data_volumes.py:47-48
Timestamp: 2025-08-13T06:27:29.727Z
Learning: In tests/infrastructure/golden_images/test_common_templates_data_volumes.py, when set_storage_class is True but get_diff_storage_class_from_matrix returns None (indicating only one storage class is available), the test should continue using the default storage class rather than being skipped. This covers special cluster architectures that only have a single storage class available.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-09-03T07:23:37.045Z
Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 1946
File: tests/infrastructure/instance_types/supported_os/test_windows_os.py:30-31
Timestamp: 2025-09-03T07:23:37.045Z
Learning: In tests/infrastructure/instance_types/supported_os/test_windows_os.py, test_vm_deletion should depend on test_create_vm (not test_start_vm) to ensure resource cleanup happens even if the VM fails to start, preventing resource leaks in the test environment.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-05-26T13:36:16.136Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 584
File: tests/observability/metrics/conftest.py:1136-1136
Timestamp: 2025-05-26T13:36:16.136Z
Learning: For Windows VM testing in metrics tests, the `verify_wsl2_guest_works(vm=vm)` call in the `windows_vm_for_test` fixture uses a 60-second timeout as a deliberate "fail fast" validation. This upfront check prevents more expensive failures later since Windows VM deployment is time-consuming, and WSL2 functionality is critical for the Windows VM tests to work properly.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-06-22T13:47:35.014Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/conftest.py:1183-1186
Timestamp: 2025-06-22T13:47:35.014Z
Learning: In tests/observability/metrics/conftest.py, the `stopped_windows_vm` fixture is designed to temporarily stop the Windows VM for a test, then restart it during teardown (after yield) because the Windows VM is module-scoped and needs to be available for other tests that depend on it being in a running state.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-09-29T19:05:24.987Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-09-29T19:05:24.987Z
Learning: For PR #1904 test execution, the critical validation point is test_connectivity_over_migration_between_localnet_vms which should fail gracefully on cloud clusters but pass on bare-metal/PSI clusters, representing the core nmstate conditional logic functionality.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-08-04T15:27:14.175Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/conftest.py:1065-1082
Timestamp: 2025-08-04T15:27:14.175Z
Learning: In tests/observability/metrics/conftest.py, the `non_existent_node_windows_vm` fixture is used for tier3 Windows VM testing and must use Windows VMs rather than Linux VMs, even though it adds overhead, because it's specifically testing Windows VM status transition metrics as part of dedicated Windows VM test coverage.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
📚 Learning: 2025-05-27T11:44:14.859Z
Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 584
File: tests/observability/metrics/test_network_metrics.py:62-76
Timestamp: 2025-05-27T11:44:14.859Z
Learning: The windows_vm_for_test fixture in tests/observability/metrics/conftest.py does not have a request argument, so it cannot be parametrized using pytest.mark.parametrize with indirect=True. This is different from vm_for_test fixture which accepts parameters through parametrization.

Applied to files:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py
🔇 Additional comments (3)
tests/storage/storage_migration/test_mtc_storage_class_migration.py (3)

19-19: Importing QUARANTINED for standardized quarantine reasons looks good

Using the shared QUARANTINED constant in reasons keeps quarantine tagging consistent across the suite and aligns with the TIMEOUT_60MIN usage from the same module.


171-174: Quarantining test_vm_storage_class_migration_with_hotplugged_volume via xfail(run=False) matches the PR intent

Marking this test as xfail(run=False) with a clear QUARANTINED reason and CNV-73329 reference cleanly disables execution while documenting why. Since dependent tests use pytest.mark.dependency on this test, they will be affected by this status (likely skipped when the dependency is not satisfied); please confirm this is the desired behavior for all follow-up validations in this class.


242-245: Quarantining the Windows-with-vTPM migration test is correctly wired and well-documented

The xfail(run=False) marker with the shared QUARANTINED prefix and CNV-73329 creates a clear, searchable quarantine reason while preventing the fragile Windows vTPM migration test from running. As with the hotplug case, dependent tests in TestStorageClassMigrationWindowsWithVTPM rely on this test via pytest.mark.dependency; verify that the resulting skip/xfail behavior for those dependents is what you want while this Jira is open.


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
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
  • Pre-commit Checks: pre-commit runs automatically if .pre-commit-config.yaml exists
  • Branch Labeling: Branch-specific labels are applied to track the target branch
  • Auto-verification: Auto-verified users have their PRs automatically marked as verified

📋 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)

Review & Approval

  • /lgtm - Approve changes (looks good to me)
  • /approve - Approve PR (approvers only)
  • /automerge - Enable automatic merging when all requirements are met (maintainers and 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 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, or conflict labels
  5. Verified: PR must be marked as verified (if verification is enabled)

📊 Review Process

Approvers and Reviewers

Approvers:

  • jpeimer

Reviewers:

  • Ahmad-Hafe
  • dalia-frank
  • duyanyan
  • josemacassan
  • jpeimer
  • kgoldbla
  • kshvaika
  • stesrn
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
  • automerge

💡 Tips

  • WIP Status: Use /wip when your PR is not ready for review
  • Verification: The verified label is automatically removed on each new commit
  • 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.

@Ahmad-Hafe
Copy link
Contributor Author

/verified

In local env pytest

tests/storage/storage_migration/test_mtc_storage_class_migration.py::TestStorageClassMigrationWindowsWithVTPM::test_vm_storage_class_migration_windows_vm_with_vtpm

tests/storage/storage_migration/test_mtc_storage_class_migration.py::TestStorageClassMigrationWithVolumeHotplug::test_vm_storage_class_migration_with_hotplugged_volume

Cluster info:

CNV 4.21
Clsuter Domain: on-rhos-ipi

@openshift-virtualization-qe-bot-3
Copy link
Contributor

@coderabbitai

Test execution plan request details

CRITICAL: You MUST respond with a review comment on the Files Changed tab, NOT as a regular PR comment.
If it cannot be on the 1st line of the 1st file, add it to any other changed file.

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will create a change request comment on the 1st line of the 1st file in the pr with the test execution plan.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file
  2. Identify affected code paths, functions, and classes
  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes
  4. Trace test dependencies through imports, shared utilities, and fixture inheritance
  5. Detect new tests introduced in the PR

Your deliverable:
Your change request comment will be based on the following requirements:

Test Execution Plan

  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When specific marker(s) can be used to cover multiple cases.

Guidelines:

  • Include only tests directly affected by the changes
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name if only specific tests are needed
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Do not add a follow-up comment in the PR, only the change request one

@coderabbitai
Copy link

coderabbitai bot commented Dec 1, 2025

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the list of changed files in PR #2959
gh pr view 2959 --json files --jq '.files[].path'

Length of output: 67


🏁 Script executed:

#!/bin/bash
# Get the diff for the changed files to understand what was modified
gh pr diff 2959

Length of output: 1611


@openshift-virtualization-qe-bot-3

I cannot directly post review comments on the Files Changed tab as that requires GitHub UI integration. However, here's the test execution plan content that should be posted as a review comment:


Test Execution Plan

Quarantine Verification:

The following tests should be verified as properly skipped (xfail with run=False):

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py::TestStorageClassMigrationWithVolumeHotplug::test_vm_storage_class_migration_with_hotplugged_volume - Verify test is marked as XFAIL/skipped, not executed
  • tests/storage/storage_migration/test_mtc_storage_class_migration.py::TestStorageClassMigrationWindowsWithVTPM::test_vm_storage_class_migration_windows_vm_with_vtpm - Verify test is marked as XFAIL/skipped, not executed

Regression Verification:

  • tests/storage/storage_migration/test_mtc_storage_class_migration.py - Run entire file to ensure other tests still execute correctly and quarantine changes don't affect non-quarantined tests

Expected Results:

  • The two quarantined tests should appear as XFAIL (skipped) in pytest output
  • All other tests in the file should run normally without issues
  • No import errors or decorator syntax issues

Note: Since this is a quarantine PR with xfail(run=False) markers, the affected tests won't execute. The primary validation is ensuring the quarantine mechanism works correctly and doesn't break other tests in the file.


🧠 Learnings used
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-09-29T19:05:24.987Z
Learning: The test execution plan for PR #1904 focuses on cluster-type conditional logic where nmstate functionality is bypassed on cloud clusters (Azure/AWS) but fully functional on bare-metal/PSI clusters, requiring different test strategies for each environment type.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-09-29T19:05:24.987Z
Learning: For PR #1904 test execution, the critical validation point is test_connectivity_over_migration_between_localnet_vms which should fail gracefully on cloud clusters but pass on bare-metal/PSI clusters, representing the core nmstate conditional logic functionality.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 2469
File: utilities/sanity.py:139-142
Timestamp: 2025-11-08T07:36:57.616Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers to keep refactoring PRs (like PR #2469) strictly focused on moving/organizing code into more granular modules without adding new functionality, error handling, or behavioral changes. Such improvements should be handled in separate PRs.

Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 2045
File: tests/virt/cluster/vm_lifecycle/conftest.py:46-47
Timestamp: 2025-09-15T06:49:53.478Z
Learning: In the openshift-virtualization-tests repo, large fixture refactoring efforts like the golden image data source migration are handled incrementally by directory/team ownership. The virt/cluster directory is handled separately from virt/node, tests/infra, tests/storage, etc., with each area managed by relevant teams in follow-up PRs.

Learnt from: vamsikrishna-siddu
Repo: RedHatQE/openshift-virtualization-tests PR: 2199
File: tests/storage/test_online_resize.py:108-113
Timestamp: 2025-09-28T14:43:07.181Z
Learning: In the openshift-virtualization-tests repo, PR #2199 depends on PR #2139 which adds architecture-specific OS_FLAVOR attributes to the Images.Cirros class (OS_FLAVOR_CIRROS for x86_64/ARM64, OS_FLAVOR_FEDORA for s390x), enabling conditional logic based on the underlying OS flavor in tests.

Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/conftest.py:83-97
Timestamp: 2025-06-23T19:19:31.961Z
Learning: In OpenShift Virtualization mass machine type transition tests, the kubevirt_api_lifecycle_automation_job requires cluster-admin privileges to function properly, as confirmed by the test maintainer akri3i.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1236
File: conftest.py:539-557
Timestamp: 2025-06-18T13:26:04.504Z
Learning: In the openshift-virtualization-tests repository, PR #1236 intentionally limits error extraction to the setup phase only in the pytest_runtest_makereport hook. The scope is deliberately restricted to setup failures, not all test phases.

Learnt from: chandramerla
Repo: RedHatQE/openshift-virtualization-tests PR: 2577
File: tests/virt/node/hotplug/test_cpu_memory_hotplug.py:161-162
Timestamp: 2025-11-19T17:00:58.250Z
Learning: In the openshift-virtualization-tests repository, the s390x test execution strategy uses positive filtering: only tests explicitly marked with pytest.mark.s390x are executed on s390x clusters. Tests without the s390x marker are automatically excluded from s390x runs, so explicit skipif decorators are not needed to prevent execution on s390x.

Learnt from: vamsikrishna-siddu
Repo: RedHatQE/openshift-virtualization-tests PR: 2199
File: tests/storage/test_online_resize.py:108-113
Timestamp: 2025-09-28T14:43:07.181Z
Learning: In the openshift-virtualization-tests repo, PR #2199 depends on PR #2139 which adds the OS_FLAVOR attribute to the Images.Cirros class, making Images.Cirros.OS_FLAVOR available for conditional logic in tests.

Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 1776
File: libs/net/node_network.py:25-31
Timestamp: 2025-08-20T23:43:28.117Z
Learning: In the RedHatQE/openshift-virtualization-tests project, servolkov's team always uses bare metal (BM) clusters with IPv4 setup in their testing environment, making defensive checks for IPv4 data presence potentially redundant in their networking code.

Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 1160
File: tests/storage/storage_migration/test_mtc_storage_class_migration.py:165-176
Timestamp: 2025-06-17T07:45:37.776Z
Learning: In the openshift-virtualization-tests repository, user jpeimer prefers explicit fixture parameters over composite fixtures in test methods, even when there are many parameters, as they find this approach more readable and maintainable for understanding test dependencies.

Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/conftest.py:24-64
Timestamp: 2025-06-23T19:28:20.281Z
Learning: In OpenShift Virtualization mass machine type transition tests, the machine type glob pattern "pc-q35-rhel8.*.*" is intentionally hard-coded in the kubevirt_api_lifecycle_automation_job as it's used only once for this specific test case, with plans to update it in the future if the job needs to support other machine types.

Learnt from: RoniKishner
Repo: RedHatQE/openshift-virtualization-tests PR: 1411
File: utilities/os_utils.py:246-279
Timestamp: 2025-07-22T17:13:59.166Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, CentOS preferences follow the format "centos-stream<version>" (e.g., "centos-stream9", "centos-stream10"). The generate_instance_type_centos_os_matrix function correctly uses regex to extract numeric versions and constructs the latest version string in the same format as the input preferences for proper comparison.

Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 1716
File: tests/virt/conftest.py:289-297
Timestamp: 2025-08-09T01:52:26.683Z
Learning: When user dshchedr moves working code from one location to another in the openshift-virtualization-tests repository, they prefer not to modify it unless there's a real issue, maintaining the original implementation to avoid introducing unnecessary changes.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 2701
File: .github/scripts/coderabbit_workflow.py:45-46
Timestamp: 2025-11-27T11:45:54.224Z
Learning: In the openshift-virtualization-tests repository, when using the PyGithub library or similar API clients, rnetser prefers to rely on API-level validation rather than adding redundant client-side input validation, since the API will handle validation and raise appropriate errors.

Learnt from: SiboWang1997
Repo: RedHatQE/openshift-virtualization-tests PR: 1566
File: tests/global_config_x86_64.py:29-29
Timestamp: 2025-07-25T01:59:02.180Z
Learning: In the openshift-virtualization-tests repo, the s390x architecture still relies on Fedora 41 images, while only x86_64 is updated to Fedora 42 in PR #1566.

Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 1932
File: tests/virt/node/migration_and_maintenance/conftest.py:57-64
Timestamp: 2025-09-08T21:34:28.924Z
Learning: In OpenShift Virtualization tests, MigrationPolicy fixtures should use static names rather than unique suffixes to enable collision detection. If parallel test runs collide on cluster-scoped resource names like MigrationPolicy, it's better to know about the collision rather than hide it with unique naming, as confirmed by maintainer dshchedr.

Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 954
File: tests/storage/storage_migration/test_mtc_storage_class_migration.py:68-74
Timestamp: 2025-06-03T12:36:36.982Z
Learning: In tests/storage/storage_migration/test_mtc_storage_class_migration.py, the broad Exception catching in the VM migration test is intentional - the user wants to catch every exception and save it for future triage rather than letting specific exceptions bubble up.

Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 1166
File: tests/observability/metrics/test_vms_metrics.py:129-137
Timestamp: 2025-06-18T09:19:05.769Z
Learning: For Windows VM testing in tests/observability/metrics/test_vms_metrics.py, it's acceptable to have more fixture parameters than typical pylint recommendations when reusing expensive Windows VM fixtures for performance. Windows VMs take a long time to deploy, so reusing fixtures like windows_vm_for_test and adding labels via windows_vm_with_low_bandwidth_migration_policy is preferred over creating separate fixtures that would require additional VM deployments.

Learnt from: OhadRevah
Repo: RedHatQE/openshift-virtualization-tests PR: 584
File: tests/observability/metrics/conftest.py:1136-1136
Timestamp: 2025-05-26T13:36:16.136Z
Learning: For Windows VM testing in metrics tests, the `verify_wsl2_guest_works(vm=vm)` call in the `windows_vm_for_test` fixture uses a 60-second timeout as a deliberate "fail fast" validation. This upfront check prevents more expensive failures later since Windows VM deployment is time-consuming, and WSL2 functionality is critical for the Windows VM tests to work properly.

Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/conftest.py:142-149
Timestamp: 2025-06-23T19:18:12.275Z
Learning: In OpenShift Virtualization machine type transition tests, the kubevirt_api_lifecycle_automation_job updates VM machine types to the latest version based on a MACHINE_TYPE_GLOB pattern, and subsequent fixtures may intentionally revert the machine type to test bidirectional transition behavior.

Learnt from: SiboWang1997
Repo: RedHatQE/openshift-virtualization-tests PR: 1669
File: utilities/virt.py:2645-2649
Timestamp: 2025-08-25T08:59:47.233Z
Learning: In OpenShift Virtualization tests with Windows OS matrix, Windows VM reboots reach the "Running" state within 10 seconds, making the default wait_until_running_timeout of 4 minutes more than sufficient for guest reboot scenarios in utilities/virt.py.

Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/test_mass_machine_type_transition.py:97-104
Timestamp: 2025-06-23T19:24:28.327Z
Learning: In OpenShift Virtualization machine type transition tests, the test_machine_type_transition_without_restart method with restart_required=false parameter validates that VM machine types do NOT change when the lifecycle job runs with restart disabled, so the assertion should check against the original machine type rather than the target machine type.

Learnt from: akri3i
Repo: RedHatQE/openshift-virtualization-tests PR: 1210
File: tests/virt/cluster/general/mass_machine_type_transition_tests/conftest.py:24-64
Timestamp: 2025-06-23T19:28:20.281Z
Learning: In OpenShift Virtualization mass machine type transition tests, the 2-minute timeout (TIMEOUT_2MIN) is sufficient for the kubevirt_api_lifecycle_automation_job because it only tests with one VM at a time, not multiple VMs simultaneously.

@vsibirsk
Copy link
Collaborator

vsibirsk commented Dec 2, 2025

/lgtm

@rnetser
Copy link
Collaborator

rnetser commented Dec 2, 2025

/lgtm

Comment on lines +242 to +245
@pytest.mark.xfail(
reason=f"{QUARANTINED}: Windows MigMigration timeout waiting for condition succeeded. CNV-73329",
run=False,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@pytest.mark.xfail(
reason=f"{QUARANTINED}: Windows MigMigration timeout waiting for condition succeeded. CNV-73329",
run=False,
)
@pytest.mark.xfail(
reason=f"{QUARANTINED}: MigMigration resource reports Failed for VMs with RWO storage; MIG-1770",
run=False,
)

Comment on lines +171 to +174
@pytest.mark.xfail(
reason=f"{QUARANTINED}: Windows MigMigration timeout waiting for condition succeeded. CNV-73329",
run=False,
)
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. This test is not about Windows
  2. There's no link to the failure in the CNV-73329 card, there's only a link to the Windows test failure
  3. Looking at the Win test log - I see that it's MIG-1770 bug. Most likely hotplug test hit the same issue.
13:38:06  2025-11-15T11:37:56.891805 ocp_resources MigMigration INFO Deleting {'apiVersion': 'migration.openshift.io/v1alpha1', 'kind': 'MigMigration', 'metadata': {'annotations': {'openshift.io/touch': '519d1aa5-c216-11f0-b9a0-0a580a810375'}, 'creationTimestamp': '2025-11-15T11:27:54Z', 'generation': 35, 'labels': {'migration.openshift.io/migplan-name': 'storage-mig-plan', 'migration.openshift.io/migration-uid': '8cb0919f-63ed-4758-b5b9-3a79f80d41a7'}, 'managedFields': [{'apiVersion': 'migration.openshift.io/v1alpha1', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:spec': {'.': {}, 'f:migPlanRef': {}, 'f:migrateState': {}, 'f:quiescePods': {}, 'f:stage': {}}}, 'manager': 'OpenAPI-Generator', 'operation': 'Update', 'time': '2025-11-15T11:27:54Z'}, {'apiVersion': 'migration.openshift.io/v1alpha1', 'fieldsType': 'FieldsV1', 'fieldsV1': {'f:metadata': {'f:annotations': {'.': {}, 'f:openshift.io/touch': {}}, 'f:labels': {'.': {}, 'f:migration.openshift.io/migplan-name': {}, 'f:migration.openshift.io/migration-uid': {}}, 'f:ownerReferences': {'.': {}, 'k:{"uid":"c762adb6-be46-4fff-8a1e-c6cabb5fe963"}': {}}}, 'f:status': {'.': {}, 'f:conditions': {}, 'f:errors': {}, 'f:itinerary': {}, 'f:observedDigest': {}, 'f:phase': {}, 'f:pipeline': {}, 'f:startTimestamp': {}}}, 'manager': 'manager', 'operation': 'Update', 'time': '2025-11-15T11:29:16Z'}], 'name': 'mig-migration-storage', 'namespace': 'openshift-migration', 'ownerReferences': [{'apiVersion': 'migration.openshift.io/v1alpha1', 'kind': 'MigPlan', 'name': 'storage-mig-plan', 'uid': 'c762adb6-be46-4fff-8a1e-c6cabb5fe963'}], 'resourceVersion': '2140175', 'uid': '8cb0919f-63ed-4758-b5b9-3a79f80d41a7'}, 'spec': {'migPlanRef': {'name': 'storage-mig-plan', 'namespace': 'openshift-migration'}, 'migrateState': True, 'quiescePods': True, 'stage': False}, 'status': {'conditions': [{'category': 'Warn', 'durable': True, 'lastTransitionTime': '2025-11-15T11:29:16Z', 'message': 'DirectVolumeMigration (dvm): openshift-migration/mig-migration-storage-x929h failed. See in dvm status.Errors', 'status': 'True', 'type': 'DirectVolumeMigrationFailed'}, {'category': 'Advisory', 'durable': True, 'lastTransitionTime': '2025-11-15T11:29:16Z', 'message': 'The migration has failed.  See: Errors.', 'reason': 'WaitForDirectVolumeMigrationToComplete', 'status': 'True', 'type': 'Failed'}], 'errors': ['DVM failed: cannot migrate VMI: PVC windows-11-dv is not shared, live migration requires that all PVCs must be shared (using ReadWriteMany access mode)'], 'itinerary': 'Failed', 'observedDigest': '458005d0e00f41ae25c448db4999139312412b60b9781415cdfb5e88fba3dd04', 'phase': 'Completed', 'pipeline': [{'completed': '2025-11-15T11:28:42Z', 'message': 'Completed', 'name': 'Prepare', 'started': '2025-11-15T11:27:54Z'}, {'completed': '2025-11-15T11:28:42Z', 'message': 'Completed', 'name': 'StageBackup', 'started': '2025-11-15T11:28:42Z'}, {'completed': '2025-11-15T11:29:16Z', 'failed': True, 'message': 'Failed', 'name': 'DirectVolume', 
'progress': ['[windows-11-dv] Live Migration storage-migration-test-mtc-storage-class-migration/windows-11-vm-1763205549-6092048: 
Failed cannot migrate VMI: PVC windows-11-dv is not shared, 
live migration requires that all PVCs must be shared (using ReadWriteMany access mode) (34s)'],
 'started': '2025-11-15T11:28:42Z'}, {'completed': '2025-11-15T11:29:16Z', 'message': 'Completed', 'name': 'Cleanup', 'started': '2025-11-15T11:29:16Z'}, {'completed': '2025-11-15T11:29:16Z', 'message': 'Completed', 'name': 'CleanupHelpers', 'started': '2025-11-15T11:29:16Z'}], 'startTimestamp': '2025-11-15T11:27:54Z'}}
Suggested change
@pytest.mark.xfail(
reason=f"{QUARANTINED}: Windows MigMigration timeout waiting for condition succeeded. CNV-73329",
run=False,
)
@pytest.mark.xfail(
reason=f"{QUARANTINED}: MigMigration resource reports Failed for VMs with RWO storage; MIG-1770",
run=False,
)

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