Skip to content

[Storage] Storage Tier2: use DataSource instead of artifactory in test_wffc.py#4368

Merged
rnetser merged 9 commits intoRedHatQE:mainfrom
acinko-rh:use_data_source_to_create_dvs_in_test_wffc
Apr 20, 2026
Merged

[Storage] Storage Tier2: use DataSource instead of artifactory in test_wffc.py#4368
rnetser merged 9 commits intoRedHatQE:mainfrom
acinko-rh:use_data_source_to_create_dvs_in_test_wffc

Conversation

@acinko-rh
Copy link
Copy Markdown
Contributor

@acinko-rh acinko-rh commented Apr 8, 2026

Short description:

Use DataSource instead of artifactory in test_wffc.py

More details:

https://redhat.atlassian.net/browse/CNV-83360

Currently, most storage tests use import from HTTP as the default method to deploy DataVolumes/VMs.

Switching to golden images (except for tests that explicitly validate the import workflow) will improve test stability and reduce flakiness.

Acceptance criteria:

Update storage tests to use golden image as the default deployment method.

Keep HTTP import only for tests explicitly covering import functionality.
What this PR does / why we need it:

In test_wffc.py the tests are using HTTP to create DVs which can make them fail when the requrest for the image is unsuccessful.

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

Don't hold out on critisism, I'm new and I want to get better.

Assisted with Claude Code

jira-ticket:

Summary by CodeRabbit

  • Tests
    • Switched storage tests to use RHEL images and updated VM memory to match RHEL.
    • Replaced external-image/template workflow with a blank-source DataVolume flow and added reusable blank DV and DV-template fixtures.
    • Consolidated storage-class selection into a single module-scoped fixture and improved virtctl/upload wiring.
    • Simplified runtime waiting and VMI status handling.
    • Removed two obsolete registry/clone tests and updated affected test parametrization.

@acinko-rh
Copy link
Copy Markdown
Contributor Author

/wip

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Warning

Rate limit exceeded

@acinko-rh has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 28 minutes and 31 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 28 minutes and 31 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0fbfaf3a-d306-467a-b529-bebce2cc5dc0

📥 Commits

Reviewing files that changed from the base of the PR and between 1a7d026 and 273b355.

📒 Files selected for processing (1)
  • tests/storage/test_wffc.py
📝 Walkthrough

Walkthrough

Replaced Cirros/Artifactory DV template construction with blank-source DataVolumes using sourceRef (RHEL data source). Added fixtures to select a single WFFC storage class and create blank DVs/templates. Updated VM tests to use RHEL, new fixtures, adjusted DV-add/upload flows, and removed two tests (registry DV and clone DV).

Changes

Cohort / File(s) Summary
Test file (all changes)
tests/storage/test_wffc.py
Primary edits contained in this single test file: removed Artifactory/Cirros DV helper and get_dv_template_dict(...); added module-scoped wffc_storage_class_name_scope_module and function-scoped blank_dv_wffc_scope_function & blank_dv_template_wffc_scope_function; switched VM images from Cirros to RHEL and updated memory/os flavor; replaced DV template construction with data_volume_template_with_source_ref_dict(...) (using rhel10_data_source_scope_module) and changed add_dv_to_vm(...) to use precreated blank DV fixtures; adjusted runtime wait via running_vm(vm=vm); changed VMI status literal to "Scheduling"; removed tests test_wffc_import_registry_dv and test_wffc_clone_dv; updated parametrization and fixture dependencies to use wffc_storage_class_name_scope_module.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly identifies the main change: replacing artifactory/HTTP-based imports with DataSource in test_wffc.py. It is specific and directly related to the primary objective.
Description check ✅ Passed Description covers all major template sections: short description, motivation details (CNV-83360), acceptance criteria, what the PR does, and special notes. Jira ticket link is provided.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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
Copy link
Copy Markdown

Report bugs in Issues

Welcome! 🎉

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

🔄 Automatic Actions

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

📋 Available Commands

PR Status Management

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

Review & Approval

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

Testing & Validation

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

Container Operations

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

Cherry-pick Operations

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

Label Management

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

✅ Merge Requirements

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

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

📊 Review Process

Approvers and Reviewers

Approvers:

  • jpeimer

Reviewers:

  • Ahmad-Hafe
  • dalia-frank
  • duyanyan
  • josemacassan
  • jpeimer
  • kgoldbla
  • kshvaika
  • stesrn
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6[1m])

💡 Tips

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

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

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: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/storage/test_wffc.py`:
- Around line 121-126: The call to create_rhel_dv_from_data_source uses the
wrong kwarg and a hard-coded param key: the helper expects rhel10_data_source
(not rhel_data_source) and the test parametrization supplies
first_dv_name/second_dv_name (not request.param["dv_name"]). Update the call to
pass rhel10_data_source=<fixture> and replace request.param["dv_name"] with the
appropriate param key (e.g., request.param["first_dv_name"] or make the test use
a single normalized param name like "dv_name") so the kwarg names and parameter
schema match the create_rhel_dv_from_data_source signature.
- Around line 113-120: The fixture rhel_dv_for_wffc_tests is declared with
scope="module" but depends on the function-scoped fixture
data_volume_multi_wffc_storage_scope_function, causing a scope mismatch; either
change rhel_dv_for_wffc_tests to be function-scoped or swap the dependency to
the module-scoped fixture data_volume_multi_wffc_storage_scope_module so the
dependent fixture scopes are compatible—update the fixture signature accordingly
to reference the chosen dependency and adjust the `@pytest.fixture`(scope=...)
declaration on rhel_dv_for_wffc_tests.
- Around line 95-110: Remove the `@pytest.fixture`(scope="module") decorator from
the create_rhel_dv_from_data_source function so it remains a plain function that
uses the create_dv contextmanager and can be invoked with with statements; also
rename the parameter from rhel10_data_source to rhel_data_source (or update
callers consistently) to match the argument passed elsewhere and avoid the
TypeError, keeping the body calling create_dv, dv.wait_for_dv_success(), and
yielding dv unchanged.
- Around line 337-373: The parametrize currently places pytest.mark.polarion
into argvalues and the test never requests the rhel_dv_for_wffc_tests fixture
while still using request.param; fix by changing the `@pytest.mark.parametrize` to
supply two explicit parameters (first_dv_name, second_dv_name) and apply
pytest.mark.polarion via the marks= argument to the single test case, ensure the
test function signature includes first_dv_name and second_dv_name (and keep
request only if other uses require it), and replace all
request.param["first_dv_name"]/["second_dv_name"] usages with the direct
parameters first_dv_name and second_dv_name; leave the rhel_dv_for_wffc_tests
fixture alone if still needed, but do not expect request.param from it.
- Around line 302-323: The parametrization block for rhel_dv_for_wffc_tests is
ineffective because the fixture isn't included in the test function signature;
either add rhel_dv_for_wffc_tests to the parameters of
test_wffc_add_dv_to_vm_with_data_volume_template (and similarly to
test_wffc_vm_with_two_data_volume_templates) so pytest will run the indirect
fixture and request.param will reflect {"dv_name":"template"}, or remove the
entire pytest.mark.parametrize(...) for rhel_dv_for_wffc_tests (and its
indirect=True) if that fixture/side-effect is not needed; update references to
request.param accordingly so the code uses the intended source of dv_name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2dfbafa3-6823-4a2d-a4f5-1e60267ba2bb

📥 Commits

Reviewing files that changed from the base of the PR and between 50470d6 and 344e366.

📒 Files selected for processing (1)
  • tests/storage/test_wffc.py

Comment thread tests/storage/test_wffc.py Outdated
Comment thread tests/storage/test_wffc.py Outdated
Comment thread tests/storage/test_wffc.py Outdated
Comment thread tests/storage/test_wffc.py Outdated
Comment thread tests/storage/test_wffc.py Outdated
@acinko-rh
Copy link
Copy Markdown
Contributor Author

/build-and-push-container

coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 16, 2026
@openshift-virtualization-qe-bot-5
Copy link
Copy Markdown

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

@acinko-rh
Copy link
Copy Markdown
Contributor Author

/build-and-push-container

Signed-off-by: Adam Cinko <acinko@redhat.com>
Signed-off-by: Adam Cinko <acinko@redhat.com>
module

Signed-off-by: Adam Cinko <acinko@redhat.com>
as well as removing some tests that have coverage elsewhere

Signed-off-by: Adam Cinko <acinko@redhat.com>
fix the test with two templates failing

Signed-off-by: Adam Cinko <acinko@redhat.com>
and fix the status VM status check in `vm_from_uploaded_dv` since
`VirtualMachineInstance.Status` doesn't contain `SCHEDULING` constant

Signed-off-by: Adam Cinko <acinko@redhat.com>
Signed-off-by: Adam Cinko <acinko@redhat.com>
Signed-off-by: Adam Cinko <acinko@redhat.com>
@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (406b2a0).

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

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

@acinko-rh
Copy link
Copy Markdown
Contributor Author

acinko-rh commented Apr 16, 2026

/verified
openshift-virtualization-tests-runner/4942
-s -o log_cli=true -m tier2 --jira --cluster-sanity-skip-check tests/storage/test_wffc.py

@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

Hardware-Related Checks (SR-IOV, GPU, DPDK):

When PR modifies fixtures for hardware-specific resources:

  • Collection Safety: Fixtures MUST have existence checks (return None when hardware unavailable)
  • Test Plan: MUST verify both WITH and WITHOUT hardware:
    • Run affected tests on cluster WITH hardware
    • Verify collection succeeds on cluster WITHOUT hardware

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/storage/test_wffc.py
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
PR_NUMBER=4368
REPO="RedHatQE/openshift-virtualization-tests"

# Get head SHA
HEAD_SHA=$(gh pr view $PR_NUMBER --repo $REPO --json headRefOid --jq '.headRefOid')
echo "Head SHA: $HEAD_SHA"

# Verify smoke test impact (confirm previous analysis)
echo "=== Smoke tests ==="
rg "pytest.mark.smoke" --type=py -l

echo "=== test_wffc referenced in smoke tests? ==="
rg "test_wffc|rhel10_data_source_scope_module|blank_dv_wffc|wffc_storage_class_name_scope_module" --type=py -l | xargs -I{} grep -l "pytest.mark.smoke" {} 2>/dev/null || echo "None"

echo "=== First diff line position ==="
git diff origin/main...HEAD -- tests/storage/test_wffc.py | head -10

# Post inline review comment
gh api \
  --method POST \
  /repos/$REPO/pulls/$PR_NUMBER/reviews \
  --field commit_id="$HEAD_SHA" \
  --field event="COMMENT" \
  --field body="" \
  --field "comments[][path]=tests/storage/test_wffc.py" \
  --field "comments[][position]=1" \
  --field "comments[][body]=**Test Execution Plan**

- **Run smoke tests: False** — Changes are isolated to \`tests/storage/test_wffc.py\`. Verified no smoke-marked test files depend on the new/changed fixtures (\`wffc_storage_class_name_scope_module\`, \`blank_dv_wffc_scope_function\`, \`blank_dv_template_wffc_scope_function\`, \`rhel10_data_source_scope_module\`). No traceable dependency path from any smoke test to the modified code exists.

- \`tests/storage/test_wffc.py\` — All remaining tests are affected by the Artifactory→DataSource refactor and fixture changes; run the full file."
echo "Exit code: $?"

Length of output: 2674



🧠 Learnings used
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 3571
File: tests/storage/storage_migration/utils.py:158-167
Timestamp: 2026-01-25T13:18:26.819Z
Learning: In the openshift-virtualization-tests repository, user jpeimer prefers to avoid nitpicky style changes (e.g., removing `.keys()` from dict membership checks) because verifying every change is expensive. Be cautious about suggesting low-impact stylistic improvements that require verification overhead.

Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4147
File: tests/network/upgrade/test_upgrade_network.py:166-177
Timestamp: 2026-03-19T10:37:02.008Z
Learning: In the openshift-virtualization-tests repository, unused fixture parameters in test methods (e.g., `bridge_on_one_node` in `tests/network/upgrade/test_upgrade_network.py`) that exist purely for pytest dependency ordering should not be flagged for removal, and no follow-up issues need to be opened for them. This is an intentional pattern, consistent with the analogous convention for fixture definitions in this codebase.

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: 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: 2014
File: tests/storage/cdi_clone/test_clone.py:0-0
Timestamp: 2025-09-10T13:25:59.799Z
Learning: In the openshift-virtualization-tests repository, when creating DataVolume objects using ocp_resources, use `api_name="storage"` rather than the default `api_name="pvc"`.

Learnt from: rlobillo
Repo: RedHatQE/openshift-virtualization-tests PR: 1984
File: tests/install_upgrade_operators/network_policy/test_network_policy_components.py:182-187
Timestamp: 2025-09-12T14:14:28.329Z
Learning: Network policy tests in the RedHatQE/openshift-virtualization-tests repository don't require unique resource names as there are no parallel runs on the same cluster in their test environment.

Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 1702
File: tests/chaos/oadp/conftest.py:23-45
Timestamp: 2025-09-17T14:56:18.111Z
Learning: In tests/chaos/oadp/conftest.py for the openshift-virtualization-tests repository, user qwang1 confirmed that py_config["latest_rhel_os_dict"]["data_source"] can be accessed directly without defensive .get() calls because the test configuration setup guarantees these keys will always be present in their test execution environment.

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: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 2119
File: tests/network/localnet/conftest.py:352-366
Timestamp: 2025-10-31T13:05:24.570Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, tests run sequentially by default on the same cluster (with module-scoped fixtures properly cleaned up between modules), and parallel test runs use different machines/clusters. This means cluster-scoped resources (like ClusterUserDefinedNetwork or NodeNetworkConfigurationPolicy) can safely use the same names across different test modules without risk of collision.

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-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: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: 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: 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: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4328
File: tests/network/flat_overlay/test_multi_network_policy.py:32-32
Timestamp: 2026-04-14T16:15:36.741Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when reviewing any PR with "Quarantine" in the title or a `quarantine` label, always verify compliance with docs/QUARANTINE_GUIDELINES.md:
- Category 1 (Product Bug): must use `pytest.mark.jira("CNV-XXXXX", run=False)` — the `pytest_jira` plugin conditionally skips the test when the Jira issue is open. Do NOT suggest replacing this with `xfail`.
- Category 2 (Automation Issue): must use `pytest.mark.xfail(run=False, reason=...)` — pytest itself handles the skip.
Flag any quarantine PR that uses the wrong category marker, is missing a Jira ticket reference, or uses `run=False` in the wrong context. Raising these compliance questions is always appropriate for quarantine PRs, even if the final resolution confirms the marker is correct.

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: 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: 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: 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: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 3612
File: tests/network/user_defined_network/ip_specification/test_ip_specification.py:10-10
Timestamp: 2026-01-26T20:29:54.623Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when introducing STD (Standard Test Definition) PRs that define test case structure without implementation, it's acceptable and intentional to use `__test__ = False` to block pytest collection until the tests are fully implemented in a follow-up PR. The STD workflow involves: (1) defining test structure, markers, and documentation first, (2) implementing the actual test logic and removing the collection blocker in a subsequent PR.

Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:13.674Z
Learning: In RedHatQE/openshift-virtualization-tests, maintainer dshchedr prefers CodeRabbit to post targeted inline comments on the Files changed tab for each applicable location rather than aggregating multiple issues into a single discussion thread.

Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:13.674Z
Learning: In RedHatQE/openshift-virtualization-tests, maintainer dshchedr prefers CodeRabbit to post targeted inline comments on the Files Changed tab at each applicable location rather than aggregating multiple issues into a single PR discussion thread reply.

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: 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: ema-aka-young
Repo: RedHatQE/openshift-virtualization-tests PR: 4342
File: tests/storage/cdi_config/test_cdi_config.py:195-205
Timestamp: 2026-04-02T09:04:05.200Z
Learning: In the openshift-virtualization-tests repository, `get_dv_size_from_datasource()` (from `utilities.storage`) does not require a `None`-guard on its return value when the datasource argument comes from a fixture that uses `ensure_exists=True` (e.g., `fedora_data_source_scope_module`). Such fixtures guarantee the datasource exists and has a valid size. Other usages across the repo follow the same pattern without None checks, so do not flag this as a missing fail-fast guard.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 1723
File: conftest.py:496-502
Timestamp: 2025-08-27T12:38:26.496Z
Learning: In PR `#1723`, the user rnetser clarified that updating downstream string comparisons to handle DataVolume enums from StorageClassConfig is not part of the current PR scope, which focuses only on adding conformance storage class support.

@ema-aka-young
Copy link
Copy Markdown
Contributor

/lgtm

1 similar comment
@josemacassan
Copy link
Copy Markdown
Contributor

/lgtm

@jpeimer
Copy link
Copy Markdown
Contributor

jpeimer commented Apr 19, 2026

/approve
/lgtm

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

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

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

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

@jpeimer
Copy link
Copy Markdown
Contributor

jpeimer commented Apr 20, 2026

/cherry-pick cnv-4.20

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

Manual cherry-pick is needed
Cherry pick failed for 5b499b0 to cnv-4.20:
To cherry-pick run:

git remote update
git checkout cnv-4.20
git pull origin cnv-4.20
git checkout -b use_data_source_to_create_dvs_in_test_wffc-cnv-4.20
git cherry-pick 5b499b00a388aa0d089d01a5ca5ac9e137b3cd31
# If the above fails with 'is a merge but no -m option', run:
# git cherry-pick -m 1 5b499b00a388aa0d089d01a5ca5ac9e137b3cd31
git push origin use_data_source_to_create_dvs_in_test_wffc-cnv-4.20

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.

10 participants