Skip to content

T2 node test adopted for s390x arch #1519#2577

Merged
rnetser merged 1 commit intoRedHatQE:mainfrom
chandramerla:t2-node-s390x
Jan 25, 2026
Merged

T2 node test adopted for s390x arch #1519#2577
rnetser merged 1 commit intoRedHatQE:mainfrom
chandramerla:t2-node-s390x

Conversation

@chandramerla
Copy link
Copy Markdown
Member

@chandramerla chandramerla commented Nov 10, 2025

Short description:

Updated Node Tier2 tests after adopting to work for s390x

More details:

Earlier I've created a PR, which I couldn't finish due to other release priorities. So, I've addressed all the review comments there in this PR.

What this PR does / why we need it:

To run node tier2 tests in s390x in the pipeline

Which issue(s) this PR fixes:
Special notes for reviewer:

@rnetser @vsibirsk

jira-ticket:

NONE

Summary by CodeRabbit

  • New Features

    • Added s390x mainframe machine type constants and explicit machine type selection.
  • Bug Fixes

    • Corrected test names and reordered markers for consistency.
    • Adjusted CPU/thread behavior and memory handling for s390x clusters.
  • Refactor

    • Simplified architecture configuration handling and removed conditional branches.
  • Tests

    • Broadened s390x test coverage and updated fixtures/markers across multiple suites.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 10, 2025

📝 Walkthrough

Walkthrough

Adds s390x support and related constants across tests: new machine-type constants, s390x-aware fixture parameters and conditional behavior (CPU threads, memory), widespread @pytest.mark.s390x annotations, excluded s390x CPU models, minor logging, and removal of a Jira-guarded architecture conditional in must_gather tests.

Changes

Cohort / File(s) Summary
Machine type constants
tests/virt/constants.py
Added four s390 ccw-virtio constants: s390_ccw_virtio, s390_ccw_virtio_rhel9_6, s390_ccw_virtio_rhel8_6, s390_ccw_virtio_rhel7_6.
Machine type tests & fixtures
tests/virt/node/general/test_machinetype.py
Added explicit_machine_type and vm_with_explicit_machine_type fixtures; replaced prior test to use explicit machine type; added @pytest.mark.s390x and polarion marks on relevant tests.
Fixture signatures & behavior (s390x-aware)
tests/virt/node/conftest.py, tests/virt/node/cpu_sockets_threads/test_cpu_support_sockets_threads.py, tests/virt/node/migration_and_maintenance/test_vm_disk_load_with_migration.py
Added is_s390x_cluster parameter to multiple fixtures (vmx_disabled_flag, hotplugged_vm, vm_with_cpu_support, vm_with_fio); conditionally set CPU threads to 1 and use None memory_max_guest for s390x clusters.
Widespread s390x test markers
tests/virt/node/cpu_sockets_threads/test_cpu_support_sockets_threads.py, tests/virt/node/general/test_linux_label.py, tests/virt/node/general/test_networkinterfacemultiqueue_feature.py, tests/virt/node/hotplug/test_cpu_memory_hotplug.py, tests/virt/node/migration_and_maintenance/test_vm_memory_load_with_migration.py, tests/virt/node/node_labeller/cpu_features/test_vm_with_cpu_flag.py, tests/virt/node/owner_references/test_vm_owner_references.py, tests/virt/node/workload_density/test_free_page_reporting.py
Added @pytest.mark.s390x decorators to multiple tests/classes; mostly marker additions with no logic changes.
Docstring, renames & decorator reorderings
tests/virt/node/general/test_custom_selinux_policy.py, tests/virt/node/general/test_disable_pvspinlock.py, tests/virt/node/node_labeller/cpu_features/test_node_feature_discovery.py
Renamed test_disable_pvcpinlocktest_disable_pvspinlock; adjusted assertion text (virt_launcher); updated docstring and reordered pytest markers in node feature tests.
CPU model exclusions & logging
utilities/constants.py, utilities/cpu.py
Added EXCLUDED_CPU_MODELS_S390X and merged it into EXCLUDED_CPU_MODELS; get_common_cpu_from_nodes() now logs the selected candidate before returning.
Must-gather architecture cleanup
tests/install_upgrade_operators/must_gather/test_must_gather_vms.py
Removed Jira-guarded conditional (is_jira_open) and simplified retrieval of architectureConfiguration; unconditionally applies ARM_64 ovmfPath override.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • rnetser
  • vsibirsk
  • kbidarkar
  • jerry7z
  • SiboWang1997
  • rlobillo
  • akri3i
  • geetikakay
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.89% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adopting Node Tier2 tests to work with s390x architecture, which aligns with the changeset's primary objective.
Description check ✅ Passed The description covers all critical sections of the template: short description, motivation (why needed), implementation purpose, and includes proper contact mentions for reviewers.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.39%. Comparing base (db03ed9) to head (8d8fa15).
⚠️ Report is 98 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2577   +/-   ##
=======================================
  Coverage   98.38%   98.39%           
=======================================
  Files          25       25           
  Lines        2166     2174    +8     
=======================================
+ Hits         2131     2139    +8     
  Misses         35       35           
Flag Coverage Δ
utilities 98.39% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

@openshift-virtualization-qe-bot
Copy link
Copy Markdown

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

@chandramerla
Copy link
Copy Markdown
Member Author

Started Jenkins builds to test changes:

x86 build 35
s390x build 8

@chandramerla
Copy link
Copy Markdown
Member Author

change - reordered markers as asked in PR review comments

/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-2577 published

@chandramerla
Copy link
Copy Markdown
Member Author

Started Jenkins builds to test changes:

x86 build 35 s390x build 8

x86 all tests passed
s390x like earlier failed in test_migrate_vm[RHEL-VM]tests.virt.node.migration_and_maintenance.test_post_copy_migration.TestPostCopyMigration, but still I couldn't reproduce locally and has passed. So, as I need more time to investigate this issue trying to reproduce it more times and dig deeper, I will take this to be added to s390x in my next PR for enabling more node tests for s390x. So, removed marker for all the related tests in my latest force-push

/verified

@rnetser @dshchedr Could you please give your approvals again?

@chandramerla
Copy link
Copy Markdown
Member Author

/verified

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

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the Test Execution Plan with the smoke tests recommendation.
Do NOT submit a formal review - just post the inline comment directly.

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
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
  6. Smoke Test Impact Analysis: Determine if any changes could affect smoke tests by checking:
    • Changes to files/functions used by tests marked with @pytest.mark.smoke
    • Changes to fixtures or utilities imported by smoke tests
    • Changes to conftest.py files that may affect smoke test execution
    • Changes to core infrastructure code (utilities/, libs/) that smoke tests depend on

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

Test Execution Plan

  • Run smoke tests: True / False (Based on your smoke test impact analysis - True if any changes may affect smoke tests)
  • 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

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post an inline review comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If submitting the review fails after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to:
- Trace the actual fixture dependency chain from smoke tests to changed fixtures
- Verify that smoke tests actually import/use changed utilities or functions
- Confirm the dependency path exists; do NOT assume based on scope or semantics
- Be conservative: Session-scoped fixtures or infrastructure-sounding names do NOT
automatically mean smoke test impact. Only flag smoke test impact when you can
demonstrate a concrete dependency path.
WRONG: "This session-scoped storage fixture might affect smoke tests"
RIGHT: "Smoke test X uses fixture Y, which depends on the changed fixture Z"

Comment thread tests/install_upgrade_operators/must_gather/test_must_gather_vms.py
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 22, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Step 1: Find all smoke tests
echo "=== Finding smoke tests ==="
rg "pytest\.mark\.smoke" --type=py -l | head -20

echo ""
echo "=== Step 2: Check if smoke tests use changed fixtures ==="
SMOKE_FILES=$(rg "pytest\.mark\.smoke" --type=py -l)
for file in $SMOKE_FILES; do
  if grep -q "hotplugged_vm\|vmx_disabled_flag" "$file" 2>/dev/null; then
    echo "FOUND: $file uses changed fixtures"
    grep -n "hotplugged_vm\|vmx_disabled_flag" "$file"
  fi
done

echo ""
echo "=== Step 3: Check if smoke tests import from changed utilities ==="
for file in $SMOKE_FILES; do
  if grep -q "from utilities.constants import\|from utilities.cpu import\|EXCLUDED_CPU_MODELS\|get_common_cpu_from_nodes" "$file" 2>/dev/null; then
    echo "FOUND: $file imports/uses changed utilities"
    grep -n "from utilities\|EXCLUDED_CPU_MODELS\|get_common_cpu_from_nodes" "$file" | head -5
  fi
done

echo ""
echo "=== Step 4: Get first changed file and line number ==="
gh api "/repos/RedHatQE/openshift-virtualization-tests/pulls/2577/files" --jq '.[0] | {filename: .filename, patch: .patch}' | head -60

echo ""
echo "=== Get PR head SHA ==="
gh pr view 2577 --json headRefOid --jq '.headRefOid' --repo RedHatQE/openshift-virtualization-tests

Length of output: 4768


🏁 Script executed:

#!/bin/bash
# Post inline review comment with test execution plan
PR_NUMBER=2577
REPO="RedHatQE/openshift-virtualization-tests"
COMMIT_SHA="3ec2f46ff46e0204adbc5135da767633b84073df"

# Create the test execution plan
COMMENT_BODY="## Test Execution Plan

**Run smoke tests: False**

**Rationale**: No dependency path exists between smoke tests and the changes in this PR. Analysis confirmed:
- No smoke tests use the modified fixtures (\`hotplugged_vm\`, \`vmx_disabled_flag\`) from tests/virt/node/conftest.py
- Smoke tests import from utilities.constants but NOT the changed \`EXCLUDED_CPU_MODELS\` constant
- No smoke tests import or use \`get_common_cpu_from_nodes\` from utilities/cpu.py
- Changes are isolated to s390x architecture enablement and node test markers

**Tests to Execute**:

- \`-m s390x\` - Run all s390x-marked tests to verify architecture-specific changes
- \`tests/virt/node/conftest.py\` - Verify fixture changes:
  - \`hotplugged_vm\` (s390x memory_max_guest=None condition)
  - \`vmx_disabled_flag\` (nodes_cpu_architecture parameter, x86_64 check)
- \`tests/virt/node/cpu_sockets_threads/test_cpu_support_sockets_threads.py\` - Verify s390x CPU thread=1 constraint
- \`tests/virt/node/general/test_machinetype.py\` - Verify s390x machine type support (s390-ccw-virtio constants)
- \`tests/virt/node/general/test_custom_selinux_policy.py::test_selinux_with_custom_policy\` - Verify assertion message change (virt_launcher)
- \`tests/virt/node/general/test_disable_pvspinlock.py::test_disable_pvspinlock\` - Verify function rename
- \`tests/virt/node/hotplug/test_cpu_memory_hotplug.py::TestCPUHotPlug::test_hotplug_cpu[RHEL-VM]\` - Verify s390x marker on RHEL-VM test
- \`tests/virt/node/workload_density/test_free_page_reporting.py::TestFreePageReporting\` - Verify s390x marker (OCPBUGS-51113 fix)
- \`tests/install_upgrade_operators/must_gather/test_must_gather_vms.py\` - Verify CNV-76681 Jira workaround removal

**Architecture Testing**: Execute test suite on **both x86_64 and s390x clusters** to verify cross-architecture compatibility and ensure x86_64 behavior remains unchanged."

# Post the review comment on line 46 (first actual code change)
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  "/repos/$REPO/pulls/$PR_NUMBER/reviews" \
  --input - <<EOF
{
  "body": "",
  "commit_id": "$COMMIT_SHA",
  "event": "COMMENT",
  "comments": [
    {
      "path": "tests/install_upgrade_operators/must_gather/test_must_gather_vms.py",
      "line": 46,
      "body": $(echo "$COMMENT_BODY" | jq -R -s '.')
    }
  ]
}
EOF

if [ $? -eq 0 ]; then
  echo "✓ Review posted"
  exit 0
else
  echo "✗ Failed to post inline review"
  exit 1
fi

Length of output: 1743



🧠 Learnings used
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-22T15:56:00.157Z
Learning: In the openshift-virtualization-tests repository, when responding to test execution plan requests from openshift-virtualization-qe-bot-3, do NOT use "REQUEST_CHANGES" review type if the PR author has already marked the PR as verified (e.g., with `/verified` command). Test execution plans are informational guides, not blocking requirements. Use COMMENT event for informational test plans, or only REQUEST_CHANGES if there are actual code issues that need to be addressed before merging.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T14:00:59.076Z
Learning: In the openshift-virtualization-tests repository, when responding to test execution plan requests from openshift-virtualization-qe-bot-3, CodeRabbit must post ONLY an inline review comment on the Files Changed tab and then stop immediately without generating any follow-up comments in the PR discussion thread. No acknowledgment messages, no confirmation of posting, no explanation - silence after posting the inline review equals success. Additional comments create empty/meaningless reviews that clutter the PR.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T10:28:54.212Z
Learning: In the openshift-virtualization-tests repository, when determining smoke test impact for test execution plans, only set "Run smoke tests: True" if there is a verified, traceable dependency path from smoke tests to the changed code. Session-scoped fixtures or infrastructure-sounding changes do NOT automatically imply smoke test impact - the dependency chain must be explicitly verified using shell scripts before recommending smoke test execution.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T14:06:22.391Z
Learning: In the openshift-virtualization-tests repository, when posting test execution plan inline review comments using GitHub API, the full test execution plan content must go in the `comments[].body` field (which appears on Files Changed tab), NOT in the top-level `body` field (which appears in PR discussion thread). The top-level `body` field should be omitted or left empty to avoid posting redundant comments in the PR discussion thread.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3062
File: conftest.py:333-333
Timestamp: 2025-12-16T20:11:03.645Z
Learning: In the openshift-virtualization-tests repository, when determining smoke test impact for changes affecting py_config["os_login_param"], follow this verification methodology: (1) Find all smoke tests: `rg "pytest.mark.smoke" --type=py -B2 | grep "def test_"`, (2) For each smoke test file, search for VM creation patterns: `rg "VirtualMachineForTests|running_vm|VirtualMachineForTestsFromTemplate|wait_for_ssh|check_ssh_connectivity"`, (3) Trace the dependency chain: smoke test → VirtualMachineForTests/running_vm() → wait_for_ssh_connectivity() (default enabled) → vm.login_params property → py_config["os_login_param"][vm.os_flavor], (4) Check utilities/virt.py for login_params usage: `rg "os_login_param|login_params" utilities/virt.py -C3`. Any smoke test creating VMs with default SSH connectivity checks (running_vm with check_ssh_connectivity=True) depends on os_login_param, even if the test doesn't directly reference it.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3062
File: conftest.py:333-333
Timestamp: 2025-12-16T15:09:49.597Z
Learning: In the openshift-virtualization-tests repository, when conftest.py or utilities/bitwarden.py changes affect py_config["os_login_param"], smoke test impact must be determined by: (1) finding all smoke tests using `rg "pytest.mark.smoke"`, (2) checking each for VM creation patterns (VirtualMachineForTests, running_vm, VirtualMachineForTestsFromTemplate), (3) tracing whether running_vm is called with default check_ssh_connectivity=True, which accesses vm.login_params property that reads py_config["os_login_param"][vm.os_flavor]. The dependency chain is: smoke test → VM creation → running_vm → wait_for_ssh_connectivity → vm.login_params → os_login_param. Any smoke test creating VMs with SSH connectivity (the default) depends on os_login_param.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3358
File: tests/network/sriov/test_sriov.py:21-21
Timestamp: 2026-01-07T09:52:22.771Z
Learning: For PRs that only remove or modify pytest markers (like removing pytest.mark.post_upgrade) without changing test logic in openshift-virtualization-tests, collection verification using `pytest --collect-only` is sufficient. Full test execution is not required to verify marker-only changes.

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: 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: 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: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 2119
File: tests/network/localnet/conftest.py:372-387
Timestamp: 2025-11-26T16:03:07.813Z
Learning: In the openshift-virtualization-tests repository, pytest fixtures that declare other fixtures as parameters purely for dependency ordering (without referencing them in the function body) should not be modified to silence Ruff ARG001 warnings. This is an idiomatic pytest pattern for ensuring setup order, and the team prefers to leave such fixtures unchanged rather than adding defensive comments or code to suppress linter warnings.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3196
File: tests/network/upgrade/test_upgrade_network.py:4-4
Timestamp: 2025-12-22T16:27:44.327Z
Learning: For PRs that remove test cases (especially redundant test cleanup PRs in openshift-virtualization-tests), test collection verification (pytest --collect-only showing selected/deselected counts) is sufficient to confirm the removal was clean and the test module remains functional. Full test execution is not required for test deletion PRs.

Learnt from: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-06T20:32:10.845Z
Learning: Applies to **/test_*.py : All new tests MUST have markers — check pytest.ini for available markers, NEVER commit unmarked tests

Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 3301
File: utilities/unittests/test_oadp.py:48-57
Timestamp: 2026-01-19T07:54:03.630Z
Learning: The pytest marker requirement ("all new tests MUST have markers") applies only to integration/functional tests in the `tests/` directory (e.g., `tests/virt/`, `tests/storage/`, `tests/network/`), not to unit tests in `utilities/unittests/`. Unit test files in `utilities/unittests/` (such as test_oadp.py, test_sanity.py, test_operator.py, etc.) do not use pytest markers and this is the established repository convention.
</learning>

Learnt from: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-06T20:32:10.845Z
Learning: Applies to **/test_*.py : Tests MUST be independent — use `pytest-dependency` ONLY when test B requires side effects from test A. When using `pytest.mark.dependency`, a comment explaining WHY the dependency exists is REQUIRED

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: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3371
File: scripts/tests_analyzer/compare_coderabbit_decisions.py:199-289
Timestamp: 2026-01-13T10:06:14.822Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers to keep pagination loops inline rather than extracting them into generic helper functions when the loops have different URL patterns and unique post-processing logic, as the inline approach improves readability and makes each endpoint's behavior more explicit.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3228
File: .coderabbit.yaml:30-41
Timestamp: 2026-01-05T10:33:55.037Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers minimal pre-merge checks in CodeRabbit configuration: only docstrings enforcement (80% threshold) is needed, not title or description checks.

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: 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: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-07T14:51:53.484Z
Learning: In the openshift-virtualization-tests repository, the team has decided to avoid using predefined time constants (like TIMEOUT_2MIN, TIMEOUT_5SEC) and prefers using explicit numeric values for timeout parameters.

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: 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: 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: chandramerla
Repo: RedHatQE/openshift-virtualization-tests PR: 2577
File: tests/virt/node/workload_density/test_free_page_reporting.py:90-90
Timestamp: 2025-11-20T16:27:01.693Z
Learning: The virtio_balloon free page reporting issue on s390x architecture (tracked in OCPBUGS-51113) has been fixed. Free page reporting tests in tests/virt/node/workload_density/test_free_page_reporting.py are now safe to run on s390x clusters.

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.

Comment thread tests/virt/node/conftest.py Outdated
ensure cpu feature vmx is disabled for cpu hotplug tests only for x86_64

Signed-off-by: chandramerla <Chandra.Merla@ibm.com>
@chandramerla
Copy link
Copy Markdown
Member Author

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@tests/virt/node/migration_and_maintenance/test_vm_disk_load_with_migration.py`:
- Around line 23-26: When the s390x special-case sets
request.param["cpu_threads"] = 1, add an INFO-level log entry to record this
configuration change; update the block guarded by is_s390x_cluster to call the
test logger (or module logger) with a structured message including keys like
"action":"override_cpu_threads", "arch":"s390x", "old_value":<previous value
from request.param.get("cpu_threads")>, and "new_value":1 so the change is
traceable; modify the same function/block that references is_s390x_cluster and
request.param["cpu_threads"] to read the prior value, perform the override, then
emit the structured info log.
♻️ Duplicate comments (4)
utilities/cpu.py (1)

125-127: MEDIUM: Use structured logging for the common CPU model.

Structured logs are searchable and required by repo conventions; f-strings hide fields from log queries.

♻️ Proposed fix
-    LOGGER.info(f"Common CPU used is {common_cpu_model}")
+    LOGGER.info("Common CPU selected", extra={"common_cpu_model": common_cpu_model})
As per coding guidelines, structured key-value logging is required.
utilities/constants.py (1)

848-883: MEDIUM: Remove the # noqa suppression and wrap the URL comment.
Linter suppressions are forbidden because they hide real lint failures and make pre-commit checks inconsistent. Split the long URL or shorten it so no suppression is needed.

🧹 Suggested fix
-    # Ref: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/automatically_installing_rhel/preparing-a-rhel-installation-on-64-bit-ibm-z_rhel-installer#planning-for-installation-on-ibm-z_preparing-a-rhel-installation-on-64-bit-ibm-z # noqa: E501
+    # Ref: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/
+    # automatically_installing_rhel/preparing-a-rhel-installation-on-64-bit-ibm-z_rhel-installer

As per coding guidelines, linter suppressions must not be added.

tests/install_upgrade_operators/must_gather/test_must_gather_vms.py (1)

46-54: HIGH: Guard missing architectureConfiguration to avoid KeyError.
Direct indexing can crash on older must‑gather data; please use guarded access and fail with a clear message.

✅ Proposed fix
-    kubevirt_architecture_config = kubevirt_resource_scope_session.instance.to_dict()["spec"]["configuration"][
-        "architectureConfiguration"
-    ][nodes_cpu_architecture]
+    architecture_configuration = (
+        kubevirt_resource_scope_session.instance.to_dict()
+        .get("spec", {})
+        .get("configuration", {})
+        .get("architectureConfiguration", {})
+    )
+    kubevirt_architecture_config = architecture_configuration.get(nodes_cpu_architecture)
+    if kubevirt_architecture_config is None:
+        raise AssertionError(
+            "Missing architectureConfiguration for current architecture.",
+            {"architecture": nodes_cpu_architecture, "available": list(architecture_configuration)},
+        )
tests/virt/node/general/test_machinetype.py (1)

53-70: HIGH: VM name includes dots → invalid DNS‑1123 label.
Machine type strings like pc-q35-rhel7.6.0 will generate invalid resource names.

✅ Proposed fix
 def vm_with_explicit_machine_type(unprivileged_client, namespace, explicit_machine_type):
-    name = f"vm-machine-type-{explicit_machine_type}"
+    safe_machine_type = explicit_machine_type.replace(".", "-")
+    name = f"vm-machine-type-{safe_machine_type}"

Copy link
Copy Markdown
Collaborator

@dshchedr dshchedr left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@chandramerla
Copy link
Copy Markdown
Member Author

/verified

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

@coderabbitai

Test execution plan request details

CRITICAL: You MUST post an inline review comment on the first changed line of the first file.
The inline comment should contain the Test Execution Plan with the smoke tests recommendation.
Do NOT submit a formal review - just post the inline comment directly.

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
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
  6. Smoke Test Impact Analysis: Determine if any changes could affect smoke tests by checking:
    • Changes to files/functions used by tests marked with @pytest.mark.smoke
    • Changes to fixtures or utilities imported by smoke tests
    • Changes to conftest.py files that may affect smoke test execution
    • Changes to core infrastructure code (utilities/, libs/) that smoke tests depend on

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

Test Execution Plan

  • Run smoke tests: True / False (Based on your smoke test impact analysis - True if any changes may affect smoke tests)
  • 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

CRITICAL WORKFLOW COMPLETION RULES:

When responding to this test execution plan request, you MUST follow these rules EXACTLY:

  1. YOUR ONLY DELIVERABLE: Post an inline review comment containing the test execution plan on the first changed line
  2. THEN STOP IMMEDIATELY - Do NOT generate any additional response
  3. FALLBACK ONLY: If submitting the review fails after retrying, post as a regular PR comment
  4. SILENCE = SUCCESS: After successfully submitting the review, your task is complete. No confirmation needed.

ABSOLUTE PROHIBITIONS (violating these creates empty/meaningless reviews):

  • ❌ Do NOT post acknowledgment messages like "Test execution plan posted", "Review posted successfully", "I've successfully posted"
  • ❌ Do NOT mention review IDs, URLs, or confirmation of posting in the PR thread
  • ❌ Do NOT add any follow-up comments after submitting the review
  • ❌ Do NOT reply to confirm task completion
  • ❌ Do NOT explain what you did - just do it and stop

Remember: The pull request review is visible to users. Additional comments are redundant noise.

CRITICAL: Before setting "Run smoke tests: True", you MUST use shell scripts to:
- Trace the actual fixture dependency chain from smoke tests to changed fixtures
- Verify that smoke tests actually import/use changed utilities or functions
- Confirm the dependency path exists; do NOT assume based on scope or semantics
- Be conservative: Session-scoped fixtures or infrastructure-sounding names do NOT
automatically mean smoke test impact. Only flag smoke test impact when you can
demonstrate a concrete dependency path.
WRONG: "This session-scoped storage fixture might affect smoke tests"
RIGHT: "Smoke test X uses fixture Y, which depends on the changed fixture Z"

Comment thread tests/install_upgrade_operators/must_gather/test_must_gather_vms.py
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 23, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Step 1: Find smoke tests and check if they use changed code
echo "=== Finding all smoke tests ==="
rg "pytest\.mark\.smoke" --type=py -l | head -20

echo ""
echo "=== Check if smoke tests use changed fixtures ==="
SMOKE_FILES=$(rg "pytest\.mark\.smoke" --type=py -l)
for file in $SMOKE_FILES; do
  if grep -q "hotplugged_vm\|vmx_disabled_flag" "$file" 2>/dev/null; then
    echo "FOUND: $file uses changed fixtures"
    grep -n "hotplugged_vm\|vmx_disabled_flag" "$file"
  fi
done

echo ""
echo "=== Check if smoke tests import changed utilities ==="
for file in $SMOKE_FILES; do
  if grep -q "from utilities.constants import\|from utilities.cpu import\|EXCLUDED_CPU_MODELS\|get_common_cpu_from_nodes" "$file" 2>/dev/null; then
    echo "FOUND: $file imports/uses changed utilities"
    grep -n "from utilities\|EXCLUDED_CPU_MODELS\|get_common_cpu_from_nodes" "$file" | head -5
  fi
done

echo ""
echo "=== Get PR details ==="
gh pr view 2577 --json headRefOid,files --jq '{commit: .headRefOid, first_file: .files[0].path}' --repo RedHatQE/openshift-virtualization-tests

echo ""
echo "=== Get first changed file patch to find first line number ==="
gh api "/repos/RedHatQE/openshift-virtualization-tests/pulls/2577/files" --jq '.[0] | {filename: .filename, patch: .patch}' | head -80

Length of output: 4854


🏁 Script executed:

#!/bin/bash
# Post inline review comment with test execution plan
PR_NUMBER=2577
REPO="RedHatQE/openshift-virtualization-tests"
COMMIT_SHA="8d8fa157c31f0fa4fd1cf08c1680e2ed572829ab"

# Create the test execution plan
COMMENT_BODY="## Test Execution Plan

**Run smoke tests: False**

**Rationale**: No dependency path exists between smoke tests and the changes in this PR. Analysis confirmed:
- No smoke tests use the modified fixtures (\`hotplugged_vm\`, \`vmx_disabled_flag\`) from tests/virt/node/conftest.py
- Smoke tests import from utilities.constants but NOT the changed \`EXCLUDED_CPU_MODELS\` constant
- No smoke tests import or use \`get_common_cpu_from_nodes\` from utilities/cpu.py
- Changes are isolated to s390x architecture enablement and node test infrastructure

**Tests to Execute**:

- \`-m s390x\` - Run all s390x-marked tests to verify architecture-specific changes
- \`tests/virt/node/conftest.py\` - Verify fixture changes:
  - \`hotplugged_vm\` (s390x memory_max_guest=None condition)
  - \`vmx_disabled_flag\` (nodes_cpu_architecture parameter, X86_64-only CNV-62851 check)
- \`tests/virt/node/cpu_sockets_threads/test_cpu_support_sockets_threads.py\` - Verify s390x CPU thread=1 constraint in \`vm_with_cpu_support\` fixture
- \`tests/virt/node/general/test_machinetype.py\` - Verify s390x machine type support (new s390-ccw-virtio constants and \`explicit_machine_type\` fixture)
- \`tests/virt/node/general/test_custom_selinux_policy.py::test_selinux_with_custom_policy\` - Verify assertion message change (virt_launcher → virt-launcher)
- \`tests/virt/node/general/test_disable_pvspinlock.py::test_disable_pvspinlock\` - Verify function rename (was test_disable_pvcpinlock)
- \`tests/virt/node/hotplug/test_cpu_memory_hotplug.py::TestCPUHotPlug::test_hotplug_cpu[RHEL-VM]\` - Verify s390x marker on RHEL-VM parametrization
- \`tests/virt/node/migration_and_maintenance/test_vm_disk_load_with_migration.py::test_fedora_vm_load_migration\` - Verify s390x CPU thread adjustment in \`vm_with_fio\` fixture
- \`tests/virt/node/workload_density/test_free_page_reporting.py::TestFreePageReporting\` - Verify s390x class marker (OCPBUGS-51113 fix)
- \`tests/install_upgrade_operators/must_gather/test_must_gather_vms.py\` - Verify CNV-76681 workaround removal and simplified kubevirt_architecture_configuration fixture

**Architecture Testing**: Execute test suite on **both x86_64 and s390x clusters** to verify cross-architecture compatibility and ensure x86_64 behavior remains unchanged."

# Post the review comment on line 34 (first removed import line)
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  "/repos/$REPO/pulls/$PR_NUMBER/reviews" \
  --input - <<EOF
{
  "body": "",
  "commit_id": "$COMMIT_SHA",
  "event": "COMMENT",
  "comments": [
    {
      "path": "tests/install_upgrade_operators/must_gather/test_must_gather_vms.py",
      "line": 34,
      "body": $(echo "$COMMENT_BODY" | jq -R -s '.')
    }
  ]
}
EOF

if [ $? -eq 0 ]; then
  exit 0
else
  echo "Failed to post inline review"
  exit 1
fi

Length of output: 1728



🧠 Learnings used
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-22T15:56:00.157Z
Learning: In the openshift-virtualization-tests repository, when responding to test execution plan requests from openshift-virtualization-qe-bot-3, do NOT use "REQUEST_CHANGES" review type if the PR author has already marked the PR as verified (e.g., with `/verified` command). Test execution plans are informational guides, not blocking requirements. Use COMMENT event for informational test plans, or only REQUEST_CHANGES if there are actual code issues that need to be addressed before merging.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T14:00:59.076Z
Learning: In the openshift-virtualization-tests repository, when responding to test execution plan requests from openshift-virtualization-qe-bot-3, CodeRabbit must post ONLY an inline review comment on the Files Changed tab and then stop immediately without generating any follow-up comments in the PR discussion thread. No acknowledgment messages, no confirmation of posting, no explanation - silence after posting the inline review equals success. Additional comments create empty/meaningless reviews that clutter the PR.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T10:28:54.212Z
Learning: In the openshift-virtualization-tests repository, when determining smoke test impact for test execution plans, only set "Run smoke tests: True" if there is a verified, traceable dependency path from smoke tests to the changed code. Session-scoped fixtures or infrastructure-sounding changes do NOT automatically imply smoke test impact - the dependency chain must be explicitly verified using shell scripts before recommending smoke test execution.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-16T14:06:22.391Z
Learning: In the openshift-virtualization-tests repository, when posting test execution plan inline review comments using GitHub API, the full test execution plan content must go in the `comments[].body` field (which appears on Files Changed tab), NOT in the top-level `body` field (which appears in PR discussion thread). The top-level `body` field should be omitted or left empty to avoid posting redundant comments in the PR discussion thread.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3062
File: conftest.py:333-333
Timestamp: 2025-12-16T20:11:03.645Z
Learning: In the openshift-virtualization-tests repository, when determining smoke test impact for changes affecting py_config["os_login_param"], follow this verification methodology: (1) Find all smoke tests: `rg "pytest.mark.smoke" --type=py -B2 | grep "def test_"`, (2) For each smoke test file, search for VM creation patterns: `rg "VirtualMachineForTests|running_vm|VirtualMachineForTestsFromTemplate|wait_for_ssh|check_ssh_connectivity"`, (3) Trace the dependency chain: smoke test → VirtualMachineForTests/running_vm() → wait_for_ssh_connectivity() (default enabled) → vm.login_params property → py_config["os_login_param"][vm.os_flavor], (4) Check utilities/virt.py for login_params usage: `rg "os_login_param|login_params" utilities/virt.py -C3`. Any smoke test creating VMs with default SSH connectivity checks (running_vm with check_ssh_connectivity=True) depends on os_login_param, even if the test doesn't directly reference it.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3062
File: conftest.py:333-333
Timestamp: 2025-12-16T15:09:49.597Z
Learning: In the openshift-virtualization-tests repository, when conftest.py or utilities/bitwarden.py changes affect py_config["os_login_param"], smoke test impact must be determined by: (1) finding all smoke tests using `rg "pytest.mark.smoke"`, (2) checking each for VM creation patterns (VirtualMachineForTests, running_vm, VirtualMachineForTestsFromTemplate), (3) tracing whether running_vm is called with default check_ssh_connectivity=True, which accesses vm.login_params property that reads py_config["os_login_param"][vm.os_flavor]. The dependency chain is: smoke test → VM creation → running_vm → wait_for_ssh_connectivity → vm.login_params → os_login_param. Any smoke test creating VMs with SSH connectivity (the default) depends on os_login_param.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3358
File: tests/network/sriov/test_sriov.py:21-21
Timestamp: 2026-01-07T09:52:22.771Z
Learning: For PRs that only remove or modify pytest markers (like removing pytest.mark.post_upgrade) without changing test logic in openshift-virtualization-tests, collection verification using `pytest --collect-only` is sufficient. Full test execution is not required to verify marker-only changes.

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: 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: 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: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 2119
File: tests/network/localnet/conftest.py:372-387
Timestamp: 2025-11-26T16:03:07.813Z
Learning: In the openshift-virtualization-tests repository, pytest fixtures that declare other fixtures as parameters purely for dependency ordering (without referencing them in the function body) should not be modified to silence Ruff ARG001 warnings. This is an idiomatic pytest pattern for ensuring setup order, and the team prefers to leave such fixtures unchanged rather than adding defensive comments or code to suppress linter warnings.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 3196
File: tests/network/upgrade/test_upgrade_network.py:4-4
Timestamp: 2025-12-22T16:27:44.327Z
Learning: For PRs that remove test cases (especially redundant test cleanup PRs in openshift-virtualization-tests), test collection verification (pytest --collect-only showing selected/deselected counts) is sufficient to confirm the removal was clean and the test module remains functional. Full test execution is not required for test deletion PRs.

Learnt from: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-06T20:32:10.845Z
Learning: Applies to **/test_*.py : Tests MUST be independent — use `pytest-dependency` ONLY when test B requires side effects from test A. When using `pytest.mark.dependency`, a comment explaining WHY the dependency exists is REQUIRED

Learnt from: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-01-06T20:32:10.845Z
Learning: Applies to **/test_*.py : All new tests MUST have markers — check pytest.ini for available markers, NEVER commit unmarked 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: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3371
File: scripts/tests_analyzer/compare_coderabbit_decisions.py:199-289
Timestamp: 2026-01-13T10:06:14.822Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers to keep pagination loops inline rather than extracting them into generic helper functions when the loops have different URL patterns and unique post-processing logic, as the inline approach improves readability and makes each endpoint's behavior more explicit.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3228
File: .coderabbit.yaml:30-41
Timestamp: 2026-01-05T10:33:55.037Z
Learning: In the openshift-virtualization-tests repository, user rnetser prefers minimal pre-merge checks in CodeRabbit configuration: only docstrings enforcement (80% threshold) is needed, not title or description checks.

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: 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: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-12-07T14:51:53.484Z
Learning: In the openshift-virtualization-tests repository, the team has decided to avoid using predefined time constants (like TIMEOUT_2MIN, TIMEOUT_5SEC) and prefers using explicit numeric values for timeout parameters.

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: 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: 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: chandramerla
Repo: RedHatQE/openshift-virtualization-tests PR: 2577
File: tests/virt/node/workload_density/test_free_page_reporting.py:90-90
Timestamp: 2025-11-20T16:27:01.693Z
Learning: The virtio_balloon free page reporting issue on s390x architecture (tracked in OCPBUGS-51113) has been fixed. Free page reporting tests in tests/virt/node/workload_density/test_free_page_reporting.py are now safe to run on s390x clusters.

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.

@rnetser
Copy link
Copy Markdown
Collaborator

rnetser commented Jan 25, 2026

/approve
/lgtm

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

Successfully removed PR tag: quay.io/openshift-cnv/openshift-virtualization-tests:pr-2577.

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

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

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.

8 participants