Skip to content

Add exclude filter to verify_boot_sources_reimported#4983

Open
rlobillo wants to merge 6 commits into
RedHatQE:mainfrom
rlobillo:CNV-88015-2
Open

Add exclude filter to verify_boot_sources_reimported#4983
rlobillo wants to merge 6 commits into
RedHatQE:mainfrom
rlobillo:CNV-88015-2

Conversation

@rlobillo
Copy link
Copy Markdown
Contributor

@rlobillo rlobillo commented May 25, 2026

What this PR does / why we need it:

After enabling common boot image imports, verify_boot_sources_reimported checks all DIC-managed DataSources. If the cluster has custom DataImportCron templates whose DataSources lack valid sources, the verification fails waiting for DataSources that will never become Ready.

This PR adds an optional exclude_data_source_names denylist parameter so callers can skip specific DataSources. The default remains "verify all", which is backward compatible and automatically covers multiarch DataSource names (e.g. fedora-aarch64) and valid custom templates without requiring an explicit allowlist.

The parameter is propagated through disable_common_boot_image_import_hco_spec so that test_add_custom_data_import_cron_template_disable_spec can exclude the custom DataSource during teardown verification.

This PR also de-quarantines test_add_custom_data_import_cron_template_disable_spec, which was quarantined due to the teardown AssertionError in verify_boot_sources_reimported (CNV-88015). The fix resolves the root cause, so the quarantine marker is removed.

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

CNV-88015

Summary by CodeRabbit

  • New Features

    • Boot image import now supports selectively excluding specific data sources from re-import.
  • Tests

    • Test coverage updated to validate exclusion behavior; new fixture added for exclusion scenarios.
    • A previously xfail-marked test for custom data-import cron management is no longer expected to fail.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 46ded5ad-cc3d-4bba-9523-cfe871a3cb58

📥 Commits

Reviewing files that changed from the base of the PR and between 7cedf10 and 0816879.

📒 Files selected for processing (2)
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_update_hco_cr.py
  • utilities/unittests/test_hco.py

📝 Walkthrough

Walkthrough

Threads an optional exclude_data_source_names collection from HCO helper functions into verify_boot_sources_reimported, skips listed DataSources during verification, tightens unit-test call assertions, and adds a session fixture that disables verification while excluding a custom DataSource.

Changes

Selective DataSource verification exclusion

Layer / File(s) Summary
Storage verification API: exclude parameter and logic
utilities/storage.py
Added Collection import; extended verify_boot_sources_reimported signature with optional exclude_data_source_names: Collection[str] | None; updated docstring; skip-and-log excluded DataSources during iteration.
HCO helpers: accept and forward exclude parameter
utilities/hco.py
disable_common_boot_image_import_hco_spec gains exclude_data_source_names=None; enable_common_boot_image_import_spec_wait_for_data_import_cron accepts and forwards exclude_data_source_names to verify_boot_sources_reimported.
Test fixture and wiring: custom datasource exclusion
tests/install_upgrade_operators/hco_enablement_golden_image_updates/conftest.py, tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_update_hco_cr.py
Imported CUSTOM_DATASOURCE_NAME and disable_common_boot_image_import_hco_spec; added session fixture disabled_boot_image_import_excluding_custom_datasource that calls the helper with exclude_data_source_names={CUSTOM_DATASOURCE_NAME}; updated test to use the new fixture and removed the xfail import.
Unit test assertions: verify parameter threading
utilities/unittests/test_hco.py
Updated tests to assert the threaded calls include exclude_data_source_names=None for enable/disable flows and added tests that verify non-None values are propagated.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

new-tests

Suggested reviewers

  • rnetser
  • dshchedr
  • vsibirsk
  • RoniKishner

Caution

Pre-merge checks failed

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

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
Stp Link Required ❌ Error New test functions test_disable_propagates_exclude_data_source_names and test_enable_spec_propagates_exclude_data_source_names in test_hco.py lack required STP/RFE/Jira links in docstrings. Add "Jira: CNV-88015" (or STP/RFE URL) to module, class, or individual test function docstrings.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding an exclude filter parameter to the verify_boot_sources_reimported function.
Description check ✅ Passed The description covers all required template sections with substantive details about the problem, solution, and behavioral changes including backward compatibility and the de-quarantine rationale.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4983      +/-   ##
==========================================
- Coverage   98.67%   98.65%   -0.02%     
==========================================
  Files          25       25              
  Lines        2487     2456      -31     
==========================================
- Hits         2454     2423      -31     
  Misses         33       33              
Flag Coverage Δ
utilities 98.65% <100.00%> (-0.02%) ⬇️

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

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

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

@rlobillo
Copy link
Copy Markdown
Contributor Author

/build-and-push-container

@rlobillo rlobillo marked this pull request as ready for review May 25, 2026 11:31
@rlobillo
Copy link
Copy Markdown
Contributor Author

/build-and-push-container

@openshift-virtualization-qe-bot-4
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:

  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • RoniKishner
  • dshchedr
  • geetikakay
  • rnetser
  • vsibirsk
Available Labels
  • hold
  • verified
  • wip
  • lgtm
  • approve
AI Features
  • Cherry-Pick Conflict Resolution: Enabled (claude/claude-opus-4-6[1m])

💡 Tips

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

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

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

Caution

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

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

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

HIGH: PR template required sections are missing/incomplete in the provided PR description.

Please restore the required template headings and provide meaningful content under ##### What this PR does / why we need it: before merge.

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

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

In `@utilities/storage.py` at line 1, The PR description is missing required
template headings and the section "##### What this PR does / why we need it:" is
empty; update the PR description to restore all required template headings and
populate "##### What this PR does / why we need it:" with a concise summary of
the change, its purpose, and any high-level impact (e.g., files/classes
affected, behavior changes), ensuring other template sections (e.g., testing
steps, related tickets) are present and meaningful before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@utilities/storage.py`:
- Line 1124: The public type for data_source_names in
verify_boot_sources_reimported is too narrow (list[str] | None) while callers
pass a set[str]; change the parameter annotation to accept any collection (e.g.,
Collection[str] | None or Iterable[str] | None) and update the docstring to
reflect it, then update the other affected signatures/usages mentioned (around
the other occurrences) to the same broader type; ensure the function still uses
only membership checks so no logic changes are needed and adjust any related
type imports (typing.Collection or Iterable) accordingly.

---

Outside diff comments:
In `@utilities/storage.py`:
- Line 1: The PR description is missing required template headings and the
section "##### What this PR does / why we need it:" is empty; update the PR
description to restore all required template headings and populate "##### What
this PR does / why we need it:" with a concise summary of the change, its
purpose, and any high-level impact (e.g., files/classes affected, behavior
changes), ensuring other template sections (e.g., testing steps, related
tickets) are present and meaningful before merging.
🪄 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: 68fb094f-6b49-41df-b4d4-504f654a96fa

📥 Commits

Reviewing files that changed from the base of the PR and between c6ab872 and 1fbcfde.

📒 Files selected for processing (3)
  • utilities/hco.py
  • utilities/storage.py
  • utilities/unittests/test_hco.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

**/*.py: Never add linter suppressions like # noqa, # type: ignore, or # pylint: disable. Fix the code instead. If you believe a rule is wrong, ask the user for explicit approval.
Search the codebase for existing implementations before writing new code. Check utilities/, libs/, tests/, and pyproject.toml dependencies. Never duplicate logic—extract to shared modules. Use pyhelper_utils.shell.run_command for shell commands instead of subprocess.run, and use ocp-resources classes instead of raw YAML dicts.
Type hints are MANDATORY. Use mypy strict mode in libs/ and all new public functions under utilities. Use TYPE_CHECKING for type-only imports to avoid runtime overhead and circular imports.
Write Google-format docstrings for all public functions with non-obvious return values or side effects.
Always use uv run to execute commands. Never execute python, pip, pytest, tox, or pre-commit directly. Use uv run python, uv run pytest, uv run tox, uv run pre-commit, and uv add for package installation.
Always use absolute imports. Never use relative imports.
Prefer specific imports using from module import func for functions and constants. Use from package import module (then module.Name) when retaining the module name meaningfully improves readability. Never use bare import module without a from clause.
Always use named arguments for function calls with more than one argument.
Never use single-letter variable names. Always use descriptive, meaningful names.
No dead code. Every function, variable, and fixture must be used or removed. Code marked with # skip-unused-code is excluded from dead code analysis (enforced via custom ruff plugin).
Prefer direct attribute access using foo.attr. Save to variables only when reusing the same attribute multiple times improves readability or extracting clarifies intent.
Imports must always be at the top of the module. Do not import inside functions.
No defensive programming. Fail...

Files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
**

⚙️ CodeRabbit configuration file

**: ## PR Template Validation
Check the PR description for required sections from .github/pull_request_template.md.
Required sections (must be present, even if empty):

  • ##### What this PR does / why we need it: — MUST be present AND have meaningful content.
    Flag as HIGH if the section is missing, empty, whitespace-only, contains only HTML comments,
    or contains only placeholder tokens such as TBD, TBA, N/A, -, , none, or ..
  • ##### Which issue(s) this PR fixes: — must be present (may be empty)
  • ##### Special notes for reviewer: — must be present (may be empty)
  • ##### jira-ticket: — must be present (may be empty)
    If any required section is absent, or What this PR does / why we need it: has no content,
    flag it as HIGH severity and ask the author to restore the missing template section(s).

Files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
utilities/storage.py

📄 CodeRabbit inference engine (AGENTS.md)

Place storage operations (PVC, DataVolume, StorageClass) in utilities/storage.py.

Files:

  • utilities/storage.py
🧠 Learnings (31)
📚 Learning: 2026-01-12T11:24:13.825Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:50-52
Timestamp: 2026-01-12T11:24:13.825Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when catching exceptions in Python, use LOGGER.error before re-raising and do not replace it with LOGGER.exception in except blocks. This follows the established pattern across the codebase.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-01-12T14:25:05.723Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3366
File: tests/storage/cdi_clone/test_clone.py:5-9
Timestamp: 2026-01-12T14:25:05.723Z
Learning: In Python tests and utility code across the repository, bitmath.parse_string_unsafe correctly parses Kubernetes quantities (e.g., '4Gi', '512Mi', PVC storage requests) without supplying system=bitmath.NIST. There are 30+ usages indicating this is the standard behavior. Reviewers should verify that code that builds or compares quantity strings does not pass the NIST parameter, and if a new test relies on quantity parsing, assume no NIST parameter is required unless explicitly documented.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-01-20T01:03:13.139Z
Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 3387
File: tests/network/provider_migration/libprovider.py:1-8
Timestamp: 2026-01-20T01:03:13.139Z
Learning: In the openshift-virtualization-tests repository, Python imports should consistently use module-level imports for the logging module (i.e., import logging) rather than from logging import ... The established pattern spans 270+ files and should not be flagged for refactoring. Apply this guideline to Python files across the repo (e.g., tests/network/provider_migration/libprovider.py).

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-01-21T21:26:41.805Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 3559
File: utilities/infra.py:251-254
Timestamp: 2026-01-21T21:26:41.805Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when reviewing Python code, recognize that with Python 3.14 the syntax 'except ValueError, TypeError:' is valid if there is no 'as' clause, and should not be flagged as Python 2 syntax. If you use an 'as' binding (e.g., 'except (ValueError, TypeError) as e:'), parentheses are required. Ensure this pattern is version-consistent and not flagged as Python 2 syntax when 'as' is absent.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-01-25T13:18:21.675Z
Learnt from: jpeimer
Repo: RedHatQE/openshift-virtualization-tests PR: 3571
File: tests/storage/storage_migration/utils.py:158-167
Timestamp: 2026-01-25T13:18:21.675Z
Learning: In reviews of the openshift-virtualization-tests repo (and similar Python code), avoid suggesting minor stylistic changes that require extra verification (e.g., removing dict.keys() checks for membership) unless the change has clear correctness or maintainability impact. Focus on fixes with observable behavior, security, performance, or maintainability benefits; defer low-impact style tweaks that are costly to verify.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-02-18T06:35:39.536Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3847
File: utilities/virt.py:2449-2453
Timestamp: 2026-02-18T06:35:39.536Z
Learning: In Python code, a function named clearly and self-descriptively can be deemed not to require a docstring. However, treat this as a context-specific guideline and not a universal rule. For public APIs or functions with side effects, prefer concise docstrings explaining behavior, inputs, outputs, and side effects. This guidance is based on the example in utilities/virt.py from RedHatQE/openshift-virtualization-tests where validate_libvirt_persistent_domain(vm, admin_client) was considered self-documenting.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-02-23T16:33:22.070Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3883
File: utilities/pytest_utils.py:441-463
Timestamp: 2026-02-23T16:33:22.070Z
Learning: In Python code reviews, the guideline to always use named arguments for multi-argument calls does not apply to built-ins or methods that have positional-only parameters (those defined with a / in their signature). Do not flag or require named arguments for calls like dict.get(key, default=None, /), list.pop(), str.split(sep, maxsplit) and similar built-ins that cannot accept keyword arguments. Apply the named-argument rule only to functions/methods that explicitly accept keyword arguments.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In RedHatQE/openshift-virtualization-tests, when reviewing Python files, post targeted inline comments on the Files changed tab at the exact location (file and line) of the issue rather than opening a single discussion thread for multiple issues. This should be done for each applicable location to improve traceability and clarity. If multiple issues exist in the same file, address them with separate inline comments pointing to the specific lines.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-03-17T01:32:02.617Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4118
File: utilities/database.py:0-0
Timestamp: 2026-03-17T01:32:02.617Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, CodeRabbit should post targeted inline comments at each applicable location in the Files Changed tab, rather than aggregating multiple issues into a single PR discussion thread reply. This guideline applies to all Python files (any file ending in .py) changed in a PR; for non-Python files, follow the same inline-comment-at-location principle if relevant.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-04T13:45:29.122Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: utilities/console.py:54-59
Timestamp: 2026-05-04T13:45:29.122Z
Learning: During review of RedHatQE/openshift-virtualization-tests “lint-cleanup” PRs (e.g., changes targeting lint issues like stale noqa/utf-8 headers), do not flag existing `# type: ignore` directives that were already present before the PR and were not introduced or modified by the PR. Only raise findings for `# type: ignore` suppressions that the PR itself adds, changes, or otherwise makes newly effective (i.e., they appear in the diff as additions/edits).

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-04T13:45:33.892Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4725
File: tests/virt/cluster/common_templates/centos/test_centos_os_support.py:78-83
Timestamp: 2026-05-04T13:45:33.892Z
Learning: When reviewing lint-cleanup or formatting-only pull requests in this repo (e.g., changes like removing/updating `# noqa` comments or UTF-8 headers), do not raise findings for code patterns that already existed before the PR. Specifically, if a problematic construct such as `.is_connective(tcp_timeout=120)` was present in the base branch, suppress that finding and only raise issues when the PR itself introduces or modifies that construct (i.e., the diff adds/changes the call or its arguments). Apply this rule across all Python files (`**/*.py`).

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-05T17:01:15.294Z
Learnt from: dshchedr
Repo: RedHatQE/openshift-virtualization-tests PR: 4739
File: tests/virt/node/descheduler/conftest.py:2-2
Timestamp: 2026-05-05T17:01:15.294Z
Learning: In this repo’s Python code, it’s acceptable (and preferred by convention) to build `run_command` inputs using `shlex.split(f"<command> {arg}")` rather than converting to direct list literals like `['oc', 'adm', 'uncordon', name]`. During code review, generally don’t flag `shlex.split(...)` usage for `run_command` calls and don’t suggest replacing it with list literals; the string-form pattern is used to keep commands readable and consistent with how they’re typed in a terminal.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-08T12:49:20.694Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4788
File: utilities/os_utils.py:257-262
Timestamp: 2026-05-08T12:49:20.694Z
Learning: In RedHatQE/openshift-virtualization-tests, the Ruff flake8-boolean-trap rules FBT001/FBT002 are intentionally not enabled (pyproject.toml does not select the FBT rules; confirmed via `ruff check --show-settings`). Therefore, do not flag boolean positional parameters as FBT001/FBT002 violations in this repository. If Ruff configuration changes and starts selecting FBT rules, this exception should be reconsidered.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-12T05:10:24.601Z
Learnt from: acinko-rh
Repo: RedHatQE/openshift-virtualization-tests PR: 4780
File: tests/storage/utils.py:568-572
Timestamp: 2026-05-12T05:10:24.601Z
Learning: In this repository, Ruff rule UP043 ("unnecessary default type arguments") is enforced. When annotating `collections.abc.Generator` return types, prefer the single-parameter form `Generator[YieldType]` rather than `Generator[YieldType, None, None]`. Explicit `None, None` for the SendType and ReturnType are unnecessary defaults (per PEP 696) and will trigger UP043. Apply this consistently across all Python files.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-13T19:23:09.603Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4833
File: tests/network/localnet/migration_stuntime/libstuntime.py:25-25
Timestamp: 2026-05-13T19:23:09.603Z
Learning: In this repository, do not recommend adding `from __future__ import annotations` to fix forward-reference type annotation issues (e.g., Ruff UP037). Follow the established convention: use quoted string type annotations for forward references when the referenced class/type is defined later in the same file (e.g., `"ContinuousPing"`), and prefer `typing.Self` for self-referential return types.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-18T06:30:56.781Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_bitwarden.py:207-207
Timestamp: 2026-05-18T06:30:56.781Z
Learning: During Ruff/lint rule-enablement PRs in this repository (e.g., when introducing a new rule like PLC0415), it’s acceptable to keep CI green by adding per-line, targeted suppressions for pre-existing violations: add only `# noqa: <single-ruff-rule-id>` at the end of the specific violating line. In this PR context, reviewers should NOT flag these targeted `# noqa: PLC0415` comments as policy violations, assuming the suppression is for a pre-existing issue and is documented in the PR description as a candidate for follow-up cleanup. Do not allow blanket `# noqa` (without a specific rule) or `per-file-ignores`; those remain disallowed.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-18T06:31:12.015Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_pytest_utils.py:270-270
Timestamp: 2026-05-18T06:31:12.015Z
Learning: In RedHatQE/openshift-virtualization-tests, if a PR is a Ruff rule-enforcement PR and its “Special notes for reviewer” documents that pre-existing Ruff violations are being temporarily handled via per-line suppressions (e.g., `# noqa: PLC0415`) to keep CI green, reviewers should treat those specific `# noqa: <rule>` comments as an agreed, temporary mechanism. Do not flag them as code-quality issues and do not recommend removing, consolidating, or refactoring those suppressions within the same PR; cleanup/remediation is expected to happen in dedicated follow-up PRs instead.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-18T06:31:15.083Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_data_collector.py:304-304
Timestamp: 2026-05-18T06:31:15.083Z
Learning: When reviewing Python code in this repository for Ruff/linter rule rollouts, do not treat temporary suppression comments as violations in the specific migration scenario where a PR enables a new Ruff rule (e.g., PLC0415) and the PR description explicitly documents that all *pre-existing* violations are being annotated with `# noqa: <RULE>` as a short-lived measure. In that case, only flag `# noqa: <RULE>` suppressions that are newly introduced on code that did not previously violate the rule—i.e., verify via the PR diff against the prior state (and/or prior Ruff findings) that the suppressed line was already violating before the rule was enabled. Ignore suppressions that are covering violations that existed before the new rule rollout and were intentionally bulk-added for cleanup in follow-up PRs.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-18T06:31:20.848Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_hco.py:501-501
Timestamp: 2026-05-18T06:31:20.848Z
Learning: When reviewing Python code in RedHatQE/openshift-virtualization-tests, avoid flagging Ruff `# noqa: <RULE>` suppressions as issues if they were intentionally added as a temporary measure to keep CI green after a PR enables a new Ruff/lint rule (e.g., PLC0415) and the PR description documents this under "Special notes for reviewer". Treat these suppressions as deferred technical debt. Only flag `# noqa: PLC0415` (and similar rule-specific suppressions) when they are newly introduced without an accompanying documented intent in the PR (and thus appear to be masking a new violation rather than a pre-existing one).

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-18T09:09:09.479Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4878
File: utilities/unittests/test_pytest_utils.py:2194-2197
Timestamp: 2026-05-18T09:09:09.479Z
Learning: In this repository (RedHatQE/openshift-virtualization-tests), do not flag missing return type annotations or missing argument type annotations as Ruff “ANN” rule violations (e.g., ANN001/ANN002/ANN201/ANN202). The repo’s Ruff configuration does not enable ANN rules and only uses `extend-select = ["PLC0415"]`, so missing type annotations should not be treated as ANN lint failures during code review.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When using Kubernetes API models like `NodeSelectorRequirement` or `LabelSelectorRequirement` with operators `Exists` or `DoesNotExist`, the `values` field must not be non-empty. It is valid for `values` to be omitted / left as `None` (Python) / passed as `null`—Kubernetes rejects non-empty `values` for these operators, but does not require the field to be present or explicitly set to an empty list. In code reviews, do not treat missing `values=[]` for `Exists`/`DoesNotExist` as a validation issue; only flag cases where `values` is provided with actual elements.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-19T07:48:17.119Z
Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4784
File: libs/vm/affinity.py:104-104
Timestamp: 2026-05-19T07:48:17.119Z
Learning: When constructing Kubernetes `NodeSelectorRequirement` (or `LabelSelectorRequirement`) objects in code, do not treat `values` being omitted, `None`, or an empty list as an API-validation problem when the requirement’s operator is `Exists` or `DoesNotExist`. Per the Kubernetes API spec, these operators only require that the `values` array is not non-empty (i.e., it must be empty); they do not require the field to be explicitly present as `[]`. Therefore, reviewers should not flag `values=None`/missing `values` for `Exists`/`DoesNotExist`.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-02-18T06:34:38.042Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 3847
File: tests/virt/cluster/common_templates/utils.py:58-58
Timestamp: 2026-02-18T06:34:38.042Z
Learning: In RedHatQE/openshift-virtualization-tests, treat 'public' functions as those defined in any Python files under libs/ or utilities/ (any depth). Functions inside nested test directories (e.g., tests/virt/cluster/common_templates/, tests/virt/node/, etc.) are test helpers and do not require Google-format docstrings unless explicitly requested. Use this rule during reviews to decide whether to enforce docstrings on public API functions in libs/utilities.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-03T15:38:09.624Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4701
File: tests/virt/node/general/test_windows_vtpm_bitlocker.py:50-52
Timestamp: 2026-05-03T15:38:09.624Z
Learning: During review of PRs that are lint cleanups or tooling/version bumps, do not flag code-quality issues for patterns that pre-existed before the PR. Specifically, if the diff does not introduce/modify constructs such as nested `if` blocks or unnecessary list comprehensions, treat them as known/deferred and leave them for dedicated follow-up cleanup PRs. Only raise issues when the PR itself adds, changes, or refactors the problematic code.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-05-15T18:42:02.504Z
Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4860
File: utilities/hco.py:385-389
Timestamp: 2026-05-15T18:42:02.504Z
Learning: In this repository, under the Python `utilities/` directory (utility/helper modules, not tests), do not flag bare `assert` statements as correctness or style issues. The codebase conventionally uses `assert` in these utilities (e.g., `utilities/virt.py`, `utilities/infra.py`, etc.) and does not enforce running Python with `-O`/`PYTHONOPTIMIZE`, so the usual “asserts may be stripped” concern should not be treated as a review blocker here.

Applied to files:

  • utilities/hco.py
  • utilities/unittests/test_hco.py
  • utilities/storage.py
📚 Learning: 2026-01-07T11:51:57.253Z
Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 3301
File: utilities/unittests/test_oadp.py:5-5
Timestamp: 2026-01-07T11:51:57.253Z
Learning: In utilities/unittests/test_oadp.py and similar test files in this repo, include a # flake8: noqa: E402 directive to suppress E402 warnings caused by pre-commit checks. This is needed because mock setup must precede imports to avoid circular dependencies, and Ruff may report unused imports. Apply this directive to all similar test files that require imports to guard against circular import issues.

Applied to files:

  • utilities/unittests/test_hco.py
📚 Learning: 2026-01-19T07:53:55.780Z
Learnt from: qwang1
Repo: RedHatQE/openshift-virtualization-tests PR: 3301
File: utilities/unittests/test_oadp.py:48-57
Timestamp: 2026-01-19T07:53:55.780Z
Learning: Enforce that pytest markers (e.g., marker requirement for integration tests) apply only to integration/functional tests under the tests/ directory. Unit tests located in utilities/unittests/ must not use pytest markers, following repository convention. For all unit test files under utilities/unittests (and subdirectories), do not require or mandate markers; for integration tests under tests/ and its subdirectories, ensure markers are used as per the project rule.

Applied to files:

  • utilities/unittests/test_hco.py
📚 Learning: 2026-02-23T21:16:51.920Z
Learnt from: vsibirsk
Repo: RedHatQE/openshift-virtualization-tests PR: 3883
File: utilities/unittests/test_os_utils.py:358-371
Timestamp: 2026-02-23T21:16:51.920Z
Learning: In the openshift-virtualization-tests repository, the guideline to require named arguments for function calls with more than one argument does not apply to unit tests under utilities/unittests/. For these tests, allow standard pytest patterns like pytest.raises(ExceptionType, match="pattern") without requiring named parameters. This exception applies specifically to files under utilities/unittests/ and does not generalize beyond that directory.

Applied to files:

  • utilities/unittests/test_hco.py
📚 Learning: 2026-05-03T15:38:22.954Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4701
File: utilities/unittests/test_database.py:12-12
Timestamp: 2026-05-03T15:38:22.954Z
Learning: In RedHatQE/openshift-virtualization-tests unit tests under `utilities/unittests/`, it’s intentional/pre-existing to use `sys.path.insert(0, ...)` in cases where tests need to import local modules. In lint-cleanup PRs, reviewers should not flag this `sys.path` manipulation as a violation. Also, don’t re-add `# noqa: E402` or other import-order suppressions if `ruff/flake8` no longer reports E402 for that import—handle any broader refactor (to remove the `sys.path` hack) in a dedicated follow-up.

Applied to files:

  • utilities/unittests/test_hco.py
📚 Learning: 2026-05-18T06:31:30.830Z
Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_sanity.py:22-22
Timestamp: 2026-05-18T06:31:30.830Z
Learning: In this repo’s unit test files under `utilities/unittests/`, treat `# noqa: PLC0415` (import-outside-top-level) suppressions as intentional and do not flag them as violations when enabling Ruff’s PLC0415 rule incrementally. These suppressions are expected as temporary measures and are documented in the PR description; they should only be targeted for later cleanup follow-ups.
Also, allow imports placed inside unit test methods under `utilities/unittests/` when they are intentionally positioned to run after `patch` decorators are applied—especially when the imported module has import-time side effects.

Applied to files:

  • utilities/unittests/test_hco.py
📚 Learning: 2026-05-18T10:38:33.820Z
Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4884
File: .coderabbit.yaml:79-80
Timestamp: 2026-05-18T10:38:33.820Z
Learning: In this repo, pytest tests are expected to live only in files named `test_*.py`. When applying CodeRabbit STP case B (newly added `def test_*` inside an existing test file), scope the check to existing files that match `test_*.py` and do not broaden it to newly added `def test_*` found in other non-`test_*.py` Python files.

Applied to files:

  • utilities/unittests/test_hco.py
🧬 Code graph analysis (1)
utilities/unittests/test_hco.py (1)
tests/conftest.py (2)
  • admin_client (310-314)
  • namespace (680-693)
🪛 Ruff (0.15.13)
utilities/storage.py

[warning] 1145-1145: Logging statement uses f-string

(G004)

🔇 Additional comments (2)
utilities/hco.py (1)

389-390: LGTM!

utilities/unittests/test_hco.py (1)

769-773: LGTM!

Also applies to: 804-807, 839-839

Comment thread utilities/storage.py Outdated
@openshift-virtualization-qe-bot-5
Copy link
Copy Markdown

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

1 similar comment
@openshift-virtualization-qe-bot-5
Copy link
Copy Markdown

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

@rlobillo
Copy link
Copy Markdown
Contributor Author

/verified
openshift-virtualization-tests-runner/5320

@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 utilities/hco.py Outdated
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Tip

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

rlobillo and others added 5 commits June 2, 2026 15:12
Allow callers to limit DataSource verification to a specific set,
skipping custom DataSources without imagestreams.

Ref: RedHatQE#4968

Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
The caller passes a set, so the type hint should accept any collection
that supports membership checks.

Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
…ylist

Addresses review feedback: the allowlist approach using data_import_cron_matrix
does not cover multiarch DataSource names (e.g. fedora-aarch64) and silently
skips valid custom templates. The denylist keeps "verify all" as the default
and lets callers exclude specific DataSources when needed.

Propagates exclude_data_source_names through disable_common_boot_image_import_hco_spec
so test_add_custom_data_import_cron_template_disable_spec can exclude the custom
DataSource during teardown verification.

Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The teardown AssertionError in verify_boot_sources_reimported (CNV-88015)
is fixed by the exclude_data_source_names denylist propagated through
disable_common_boot_image_import_hco_spec.

Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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: 2

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

Inline comments:
In
`@tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_update_hco_cr.py`:
- Around line 90-99: The test function
test_add_custom_data_import_cron_template_disable_spec currently lists the
setup-only fixture disabled_boot_image_import_excluding_custom_datasource in its
parameter list which triggers ARG002; remove that fixture from the function
signature and instead declare it via
`@pytest.mark.usefixtures`("disabled_boot_image_import_excluding_custom_datasource")
above the test (keeping existing decorators like `@pytest.mark.dependency` and
`@pytest.mark.polarion`), so the fixture's side effects run without implying the
test consumes a return value.

In `@utilities/unittests/test_hco.py`:
- Around line 769-774: Add a test that exercises the non-default propagation
path by passing a real collection name (e.g., ["my-collection"]) into
disable_common_boot_image_import_hco_spec() and into
enable_common_boot_image_import_spec_wait_for_data_import_cron(), then assert
that verify_boot_sources_reimported() was called with that same collection value
instead of None; update the analogous case around the other assertion block
(lines 832-836) to include a similar non-default propagation check so the test
suite verifies the actual collection argument flows through the call chain
(functions: disable_common_boot_image_import_hco_spec,
enable_common_boot_image_import_spec_wait_for_data_import_cron,
verify_boot_sources_reimported).
🪄 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: 0020e5ac-fc1f-4130-8708-29b498c35ce4

📥 Commits

Reviewing files that changed from the base of the PR and between 4995c83 and 7cedf10.

📒 Files selected for processing (5)
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/conftest.py
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_update_hco_cr.py
  • utilities/hco.py
  • utilities/storage.py
  • utilities/unittests/test_hco.py

Comment thread utilities/unittests/test_hco.py
Move disabled_boot_image_import_excluding_custom_datasource to
@pytest.mark.usefixtures since its return value is not used by the test.

Add unit tests verifying exclude_data_source_names propagation with
non-default values through both disable_common_boot_image_import_hco_spec
and enable_common_boot_image_import_spec_wait_for_data_import_cron.

Signed-off-by: Ramón Lobillo <rlobillo@redhat.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rlobillo
Copy link
Copy Markdown
Contributor Author

rlobillo commented Jun 2, 2026

/build-and-push-container

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

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

@rlobillo
Copy link
Copy Markdown
Contributor Author

rlobillo commented Jun 3, 2026

/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 full Test Execution Plan (smoke decision, gating decision, and specific affected tests).
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, fixture inheritance, fixture teardown, and yield from cleanup in conftest

  5. Detect new tests introduced in the PR

  6. Utilities and libs impact (when utilities/ or libs/ changes):
    You MUST use shell scripts (rg, git diff) to trace the full impact.
    Follow these sub-steps in order:

    6a. Identify modified symbols: For each changed file under utilities/ or libs/,
    list every modified function or method.
    Example: git diff HEAD~1 --unified=0 -- utilities/hco.py | grep '^[+-]def '

    6b. Find direct callers: Search tests and conftest for each symbol from 6a.
    Example: rg -l 'get_hco_version' tests/

    6c. Trace fixture teardown and cleanup: Find fixtures that reach
    the modified symbol through yield from or context-manager wrappers.
    Example: rg -l 'yield from.*enable_common_boot|def.*enable_common_boot' tests/

    6d. Trace same-file callers: In each changed file, find other functions
    whose body calls a modified symbol (including code after yield
    in @contextmanager helpers).
    Example: rg 'get_hco_version|enable_common_boot' utilities/hco.py

    6e. Expand transitively: If function A calls modified B, then
    tests/fixtures that call A are affected — even when the test body
    never imports B directly.

    Do NOT limit impact to tests that import the modified symbol only.

  7. Smoke test impact: Intersect the affected set from step 6 with smoke-marked tests.
    Run: rg -l '@pytest.mark.smoke' tests/
    VERIFY the above command returned actual file paths before concluding False.
    Set True if either condition is met:

    • a smoke-marked file appears in the affected set from 6b-6e, OR
    • any conftest.py in the smoke test's parent-directory hierarchy (up to repo root)
      imports or calls a modified utilities/libs symbol — including autouse fixtures
      that depend on modified functions. ALL tests in that directory and below are affected.
      Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py,
      dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports
      and autouse fixtures that depend on modified symbols.
  8. Gating test impact: Intersect the affected set from step 6 with gating-marked tests.
    Run: rg -l '@pytest.mark.gating' tests/
    Set True if a gating-marked file also appears in the affected set from 6b-6e.
    Utilities/libs changes often affect gating tests without affecting smoke tests.
    Do NOT stop analysis after concluding Run smoke tests: False.

Output rules:
Do NOT include analysis step numbers (1-8) in your visible output.

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

Test Execution Plan

  • Run smoke tests: True / False — If True, state the dependency path (test → fixture → changed symbol). True ONLY with a verified path.
  • Run gating tests: True / False — If True, state the dependency path. True if any gating-marked test is in the affected set.
  • Affected tests to run (required when utilities/, libs/, or shared conftest changes — list concrete paths even when smoke is False)
  • 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 a marker covers multiple affected tests (e.g. -m gating only if ALL gating tests in scope need run)
  • Tag each listed test or group with its marker when not obvious, e.g. (gating) or (smoke)

Guidelines:

  • Include tests affected directly OR via fixture setup/teardown, yield from cleanup, or transitive utility call chains (caller calls modified helper)
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name when only specific tests use an affected fixture or utility wrapper (preferred for partial file impact)
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Example: if leaf helper foo() changes, include tests whose fixture teardown calls wrapper bar() where bar() calls foo(), even when the test body only imports an unrelated symbol from the same utilities module

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 — Verification rules for smoke and gating decisions:
- For each True decision, you must have traced a concrete path: test file → fixture → utility function → modified symbol.
- Do NOT assume impact based on scope, file proximity, or infrastructure-sounding names.
Only set True when you trace a concrete path through steps 6a-6e, then 7 or 8.
WRONG: "utilities/hco.py changed → run smoke" (no traced dependency path)
WRONG: "Run smoke tests: False" with no affected-test list when gating tests use the changed utility
RIGHT: "Run smoke tests: False, Run gating tests: True" plus tests/.../test_foo.py::TestBar::test_baz (gating)
RIGHT: "Smoke test X uses fixture Y → wrapper Z → changed function W in utilities/hco.py"

@rlobillo
Copy link
Copy Markdown
Contributor Author

rlobillo commented Jun 3, 2026

/verified cancel

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

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

echo "=== HEAD commit SHA ==="
gh pr view $PR_NUMBER --repo $REPO --json headRefOid --jq '.headRefOid'

echo ""
echo "=== First changed file and first +/- line ==="
gh api repos/${REPO}/pulls/${PR_NUMBER}/files --jq '.[0] | {filename: .filename, patch: .patch}' | head -60

echo ""
echo "=== Modified symbols in utilities/ ==="
git diff origin/main...HEAD --unified=0 -- utilities/hco.py utilities/storage.py 2>/dev/null | grep '^[+-]def ' | sort -u

echo ""
echo "=== Direct callers in tests/ ==="
rg -l "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" tests/ --type py 2>/dev/null

echo ""
echo "=== Gating-marked files ==="
rg -l "`@pytest.mark.gating`" tests/ --type py 2>/dev/null

echo ""
echo "=== Smoke-marked files ==="
rg -l "`@pytest.mark.smoke`" tests/ --type py 2>/dev/null | head -20

echo ""
echo "=== Check if any gating-marked file imports/calls changed symbols ==="
gating_files=$(rg -l "`@pytest.mark.gating`" tests/ --type py 2>/dev/null)
for f in $gating_files; do
  if rg -q "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" "$f" 2>/dev/null; then
    echo "GATING MATCH: $f"
  fi
done

echo ""
echo "=== Check conftest.py hierarchy for smoke test files re: changed symbols ==="
smoke_files=$(rg -l "`@pytest.mark.smoke`" tests/ --type py 2>/dev/null)
for sf in $smoke_files; do
  dir="$sf"
  while [ "$dir" != "." ]; do
    dir=$(dirname "$dir")
    cf="$dir/conftest.py"
    if [ -f "$cf" ]; then
      if rg -q "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" "$cf" 2>/dev/null; then
        echo "SMOKE CONFTEST MATCH: $sf via $cf"
      fi
    fi
  done
done

echo ""
echo "=== Transitive: same-file callers of changed symbols in utilities/hco.py ==="
rg -n "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" utilities/hco.py utilities/storage.py 2>/dev/null

echo ""
echo "=== fixtures that call enable_common_boot_image_import_spec_wait_for_data_import_cron in conftest files ==="
rg -rn "enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" tests/ --type py -C1 2>/dev/null | head -60

Length of output: 11399


🏁 Script executed:

#!/bin/bash
COMMIT_SHA="08168799dfd6626cffdad038bfab381f99aae4f5"
REPO="RedHatQE/openshift-virtualization-tests"
PR_NUMBER=4983
PATH_FILE="tests/install_upgrade_operators/hco_enablement_golden_image_updates/conftest.py"
LINE=6

COMMENT_BODY="**Test Execution Plan**

- **Run smoke tests: False** — \`tests/conftest.py\` calls \`disable_common_boot_image_import_hco_spec\` / \`enable_common_boot_image_import_spec_wait_for_data_import_cron\` (in smoke tests' conftest hierarchy), but all added parameters use \`None\` defaults, preserving existing call-site behavior. No concrete behavioral change reaches smoke tests.
- **Run gating tests: False** — No gating-marked file appears among the direct callers of the changed symbols.

**Affected tests to run:**

- \`utilities/unittests/test_hco.py\` — unit tests for \`disable_common_boot_image_import_hco_spec\` / \`enable_common_boot_image_import_spec_wait_for_data_import_cron\` / \`verify_boot_sources_reimported\` propagation
- \`tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_update_hco_cr.py::test_add_custom_data_import_cron_template_disable_spec\` — de-quarantined test using new \`disabled_boot_image_import_excluding_custom_datasource\` fixture
- \`tests/infrastructure/golden_images/update_boot_source/conftest.py\` callers — fixtures in this conftest call \`disable_common_boot_image_import_hco_spec\` / \`enable_common_boot_image_import_spec_wait_for_data_import_cron\`
- \`tests/storage/golden_image/test_cached_snapshots.py\` — directly imports a changed symbol from \`utilities.hco\`"

gh api \
  repos/${REPO}/pulls/${PR_NUMBER}/comments \
  --method POST \
  -f body="$COMMENT_BODY" \
  -f commit_id="$COMMIT_SHA" \
  -f path="$PATH_FILE" \
  -F line=$LINE \
  -f side="RIGHT" \
  --jq '.id'

Length of output: 1838




🧠 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: 2026-05-29T11:02:22.804Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, version-bump PRs that update the main branch to reference a new CNV release (e.g., "Update project `main` to reference cnv 5.0") do NOT add new test files or test modules. These PRs only update metadata (pyproject.toml, tox.ini, .coderabbit.yaml) and clean up resolved Jira fixtures/markers in existing files. The "Stp Link Required" pre-merge check may incorrectly flag hundreds of "newly added" test files as a false positive due to the base-branch comparison shifting after branching — this should be ignored for such PRs.

Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-04-30T13:42:43.892Z
Learning: In the openshift-virtualization-tests repository, when processing test execution plan requests for PRs that introduce NEW test classes or test files (not just modifications to existing tests), always verify STD-first workflow compliance as part of the analysis: (1) check if the new test class has actual implementation code (assertions, test logic) — if so, it needs a prior STD PR, (2) check if the test file has a module docstring with STP or Jira/RFE link, (3) check if `What this PR does / why we need it:` in the PR description has meaningful content. Flag any violation even when the bot's primary request is only for a test execution plan. These checks should be appended to the test execution plan inline comment.

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: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 5101
File: .github/workflows/request-coderabbit-test-instructions.yml:17-17
Timestamp: 2026-06-02T11:53:37.264Z
Learning: In RedHatQE/openshift-virtualization-tests, the `request-coderabbit-test-instructions.yml` workflow intentionally always creates a new comment (never updates/deduplicates) when either `generate_test_report` or `verified` labels trigger it. This is by design: the PR diff can change between the two triggers (new commits pushed), so each trigger produces an independent TIA snapshot of a different diff state. Deduplicating with `find-comment + edit-mode: replace` would be harmful because it would overwrite the earlier report, removing the ability to compare the two analyses. The historical record of both reports is a desired feature.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-05-14T14:01:37.353Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when a PR has the `needs-rebase` label and the pre-merge check reports a large number of "new test_*.py files" (e.g., 300+) that do not match the actual PR diff, this is a false positive caused by the check comparing the entire diverged branch file tree against main rather than just the PR diff. Do not raise STP Link Required or Docstring Coverage violations based on such check results — only flag these if the PR diff itself actually adds new test files or functions lacking docstrings.

Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 5101
File: .github/workflows/request-coderabbit-test-instructions.yml:17-17
Timestamp: 2026-06-02T11:49:18.055Z
Learning: In RedHatQE/openshift-virtualization-tests, the `generate_test_report` label is intentionally applied at a different PR lifecycle stage than `verified`: `generate_test_report` is applied early during review (or right after PR creation) for on-demand TIA, while `verified` is applied later after the author has tested their changes. Both labels trigger the `request-coderabbit-test-instructions.yml` workflow independently.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-05-27T09:38:55.486Z
Learning: For PR reviews in RedHatQE/openshift-virtualization-tests, pre-merge checks must be re-evaluated and reported on every new commit push, not just on the initial review. The user (rnetser) has explicitly stated: "you must always run the pre merge checks on every commit."

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: 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: 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: 4954
File: .flake8:4-4
Timestamp: 2026-06-01T14:00:52.523Z
Learning: In RedHatQE/openshift-virtualization-tests, the smoke-marked test files (tests/storage/cdi_clone/test_clone.py, tests/storage/cdi_upload/test_upload_virtctl.py, tests/virt/cluster/common_templates/rhel/test_rhel_os_support.py, tests/virt/node/general/test_container_disk_vm.py) have traceable dependency paths to utilities/storage.py, utilities/hco.py (wait_for_hco_conditions), utilities/infra.py, and utilities/virt.py via direct imports and via tests/storage/conftest.py. Do not conclude "no smoke dependency path" without verifying these transitive imports.

Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 5039
File: tests/network/l2_bridge/nad_ref_change/lib_helpers.py:1-1
Timestamp: 2026-06-02T21:16:58.118Z
Learning: In RedHatQE/openshift-virtualization-tests, when a PR only relocates functions to shared libraries and updates import paths in test files (no logic change), do NOT flag the callers as requiring full test re-execution. At most, run `pytest --collect-only` to verify the new import paths resolve correctly. Only require full re-execution of caller tests when the moved function's implementation changes behavior.

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: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-18T15:22:26.757Z
Learning: Applies to tests/**/test_*.py : New feature tests must follow the STD-first workflow: (1) STP (Software Test Plan) reviewed and approved, (2) STD (Software Test Description) placeholder tests with docstrings and `__test__ = False` reviewed, (3) Implementation only after STD review. Never submit test implementation without prior STD review.

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

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-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: 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: 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: 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: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4880
File: tests/install_upgrade_operators/pod_validation/test_pod_spec.py:67-70
Timestamp: 2026-05-19T08:29:42.737Z
Learning: In RedHatQE/openshift-virtualization-tests, when a PR is a cherry pick from another branch, the team prefers to keep the code identical to the source PR even if minor style improvements (e.g., replacing unused fixture parameters with `pytest.mark.usefixtures`) are possible. Do not insist on such changes in cherry-pick PRs targeting branch-specific branches (e.g., cnv-4.20).

Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4880
File: tests/install_upgrade_operators/deployment/conftest.py:25-28
Timestamp: 2026-05-19T08:28:17.264Z
Learning: In RedHatQE/openshift-virtualization-tests, action-verb-named pytest fixtures (e.g., `xfail_if_<condition>`) that call `pytest.xfail` as a side effect without returning/yielding a value are acceptable in cherry-pick or backport PRs where refactoring to noun-based names is deferred. Do not block such PRs on fixture naming conventions when the change is a targeted backport.

Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4782
File: tests/infrastructure/golden_images/update_boot_source/test_ssp_data_sources.py:561-564
Timestamp: 2026-05-07T21:52:15.047Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, the quarantine for TestDataSourcesOptInLabel and TestDataSourcesOptOutLabel (CNV-86273, missing cdi.kubevirt.io/dataImportCron label) is intentionally using pytest.mark.xfail(run=False) because QE is still evaluating with the development team whether this is a product bug (Category 1) or automation/environment issue (Category 2). Do not flag the use of xfail here as incorrect; it is a deliberate choice pending root-cause analysis.

Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4763
File: tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/test_multiarch_golden_images_support.py:7-10
Timestamp: 2026-05-12T07:49:46.973Z
Learning: In RedHatQE/openshift-virtualization-tests, the `enableMultiArchBootImageImport` feature gate in HCO CR is **enabled by default**. When a test class (e.g., `TestDisabledMultiarchGoldenImagesSupport`) targets the disabled state, it is testing a non-default configuration explicitly overriding the default. Do not flag the module-level precondition stating "feature gate enabled" as inconsistent with disabled-state test classes; the precondition correctly reflects the default cluster baseline.

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: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 3050
File: tests/infrastructure/golden_images/update_boot_source/test_ssp_data_import_crons.py:277-279
Timestamp: 2025-12-10T10:57:12.630Z
Learning: In tests/infrastructure/golden_images/update_boot_source/test_ssp_data_import_crons.py, the test_all_datasources_support_vm_creation method uses broad Exception catching intentionally to collect all VM creation failures across different data sources for comprehensive reporting, rather than letting specific exceptions bubble up and stop the test early.

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

/retest all

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

Overlapping files

utilities/storage.py

@rlobillo
Copy link
Copy Markdown
Contributor Author

rlobillo commented Jun 3, 2026

/verified
openshift-virtualization-tests-runner/5490

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

/build-and-push-container

@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 full Test Execution Plan (smoke decision, gating decision, and specific affected tests).
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, fixture inheritance, fixture teardown, and yield from cleanup in conftest

  5. Detect new tests introduced in the PR

  6. Utilities and libs impact (when utilities/ or libs/ changes):
    You MUST use shell scripts (rg, git diff) to trace the full impact.
    Follow these sub-steps in order:

    6a. Identify modified symbols: For each changed file under utilities/ or libs/,
    list every modified function or method.
    Example: git diff HEAD~1 --unified=0 -- utilities/hco.py | grep '^[+-]def '

    6b. Find direct callers: Search tests and conftest for each symbol from 6a.
    Example: rg -l 'get_hco_version' tests/

    6c. Trace fixture teardown and cleanup: Find fixtures that reach
    the modified symbol through yield from or context-manager wrappers.
    Example: rg -l 'yield from.*enable_common_boot|def.*enable_common_boot' tests/

    6d. Trace same-file callers: In each changed file, find other functions
    whose body calls a modified symbol (including code after yield
    in @contextmanager helpers).
    Example: rg 'get_hco_version|enable_common_boot' utilities/hco.py

    6e. Expand transitively: If function A calls modified B, then
    tests/fixtures that call A are affected — even when the test body
    never imports B directly.

    Do NOT limit impact to tests that import the modified symbol only.

  7. Smoke test impact: Intersect the affected set from step 6 with smoke-marked tests.
    Run: rg -l '@pytest.mark.smoke' tests/
    VERIFY the above command returned actual file paths before concluding False.
    Set True if either condition is met:

    • a smoke-marked file appears in the affected set from 6b-6e, OR
    • any conftest.py in the smoke test's parent-directory hierarchy (up to repo root)
      imports or calls a modified utilities/libs symbol — including autouse fixtures
      that depend on modified functions. ALL tests in that directory and below are affected.
      Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py,
      dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports
      and autouse fixtures that depend on modified symbols.
  8. Gating test impact: Intersect the affected set from step 6 with gating-marked tests.
    Run: rg -l '@pytest.mark.gating' tests/
    Set True if a gating-marked file also appears in the affected set from 6b-6e.
    Utilities/libs changes often affect gating tests without affecting smoke tests.
    Do NOT stop analysis after concluding Run smoke tests: False.

Output rules:
Do NOT include analysis step numbers (1-8) in your visible output.

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

Test Execution Plan

  • Run smoke tests: True / False — If True, state the dependency path (test → fixture → changed symbol). True ONLY with a verified path.
  • Run gating tests: True / False — If True, state the dependency path. True if any gating-marked test is in the affected set.
  • Affected tests to run (required when utilities/, libs/, or shared conftest changes — list concrete paths even when smoke is False)
  • 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 a marker covers multiple affected tests (e.g. -m gating only if ALL gating tests in scope need run)
  • Tag each listed test or group with its marker when not obvious, e.g. (gating) or (smoke)

Guidelines:

  • Include tests affected directly OR via fixture setup/teardown, yield from cleanup, or transitive utility call chains (caller calls modified helper)
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name when only specific tests use an affected fixture or utility wrapper (preferred for partial file impact)
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Example: if leaf helper foo() changes, include tests whose fixture teardown calls wrapper bar() where bar() calls foo(), even when the test body only imports an unrelated symbol from the same utilities module

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 — Verification rules for smoke and gating decisions:
- For each True decision, you must have traced a concrete path: test file → fixture → utility function → modified symbol.
- Do NOT assume impact based on scope, file proximity, or infrastructure-sounding names.
Only set True when you trace a concrete path through steps 6a-6e, then 7 or 8.
WRONG: "utilities/hco.py changed → run smoke" (no traced dependency path)
WRONG: "Run smoke tests: False" with no affected-test list when gating tests use the changed utility
RIGHT: "Run smoke tests: False, Run gating tests: True" plus tests/.../test_foo.py::TestBar::test_baz (gating)
RIGHT: "Smoke test X uses fixture Y → wrapper Z → changed function W in utilities/hco.py"

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

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

echo "=== HEAD commit SHA ==="
gh pr view $PR_NUMBER --repo $REPO --json headRefOid --jq '.headRefOid'

echo ""
echo "=== First changed file and patch ==="
gh api repos/${REPO}/pulls/${PR_NUMBER}/files --jq '.[0] | {filename: .filename, patch: .patch}' | head -60

echo ""
echo "=== All changed files ==="
gh api repos/${REPO}/pulls/${PR_NUMBER}/files --jq '.[].filename'

echo ""
echo "=== Modified symbols in utilities/ (from PR diff vs main) ==="
git diff origin/main...HEAD --unified=0 -- utilities/hco.py utilities/storage.py 2>/dev/null | grep '^[+-]def ' | sort -u

echo ""
echo "=== Direct callers of changed symbols in tests/ ==="
rg -l "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" tests/ --type py 2>/dev/null

echo ""
echo "=== Same-file callers in utilities/ ==="
rg -n "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" utilities/hco.py utilities/storage.py 2>/dev/null

echo ""
echo "=== Smoke-marked files ==="
rg -l "`@pytest.mark.smoke`" tests/ --type py 2>/dev/null

echo ""
echo "=== Gating-marked files ==="
rg -l "`@pytest.mark.gating`" tests/ --type py 2>/dev/null | head -30

echo ""
echo "=== Check if any gating-marked file imports or calls changed symbols ==="
for f in $(rg -l "`@pytest.mark.gating`" tests/ --type py 2>/dev/null); do
  if rg -q "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" "$f" 2>/dev/null; then
    echo "GATING MATCH: $f"
  fi
done

echo ""
echo "=== Check conftest hierarchy of smoke tests for changed symbols ==="
for sf in $(rg -l "`@pytest.mark.smoke`" tests/ --type py 2>/dev/null); do
  dir=$(dirname "$sf")
  while [ "$dir" != "." ] && [ "$dir" != "" ]; do
    cf="$dir/conftest.py"
    if [ -f "$cf" ]; then
      if rg -q "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" "$cf" 2>/dev/null; then
        echo "SMOKE CONFTEST MATCH: $sf via $cf"
      fi
    fi
    dir=$(dirname "$dir")
  done
done

echo ""
echo "=== Transitive callers: find functions in utilities/hco.py that call changed symbols ==="
rg -n "verify_boot_sources_reimported" utilities/hco.py utilities/storage.py 2>/dev/null -C2

echo ""
echo "=== fixtures in conftest that call changed symbols ==="
rg -rn "enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" tests/ --type py -B2 -A2 2>/dev/null | head -80

Length of output: 13365


🏁 Script executed:

#!/bin/bash
COMMIT_SHA="08168799dfd6626cffdad038bfab381f99aae4f5"
REPO="RedHatQE/openshift-virtualization-tests"
PR_NUMBER=4983
PATH_FILE="tests/install_upgrade_operators/hco_enablement_golden_image_updates/conftest.py"
LINE=6

COMMENT_BODY="**Test Execution Plan**

- **Run smoke tests: False** — \`tests/conftest.py\` contains fixtures calling \`disable_common_boot_image_import_hco_spec\`, which is in the conftest hierarchy of all smoke tests. However, all existing call sites pass no \`exclude_data_source_names\` argument, so they use the unchanged \`None\` default — behavior is identical to pre-PR. No behavioral change propagates to smoke tests.
- **Run gating tests: False** — No gating-marked test file calls any of the modified symbols (\`verify_boot_sources_reimported\`, \`enable_common_boot_image_import_spec_wait_for_data_import_cron\`, \`disable_common_boot_image_import_hco_spec\`).

**Affected tests to run:**

- \`utilities/unittests/test_hco.py\` — unit tests verifying \`exclude_data_source_names\` propagation through \`disable_common_boot_image_import_hco_spec\` and \`enable_common_boot_image_import_spec_wait_for_data_import_cron\`
- \`tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_update_hco_cr.py::test_add_custom_data_import_cron_template_disable_spec\` — de-quarantined test; now uses new \`disabled_boot_image_import_excluding_custom_datasource\` fixture with \`exclude_data_source_names={CUSTOM_DATASOURCE_NAME}\`
- \`tests/infrastructure/golden_images/update_boot_source/\` — conftest fixtures call \`enable_common_boot_image_import_spec_wait_for_data_import_cron\` (teardown path); verify teardown still passes after rebase
- \`tests/storage/golden_image/test_cached_snapshots.py\` — imports \`disable_common_boot_image_import_hco_spec\` from \`utilities.hco\`"

gh api \
  repos/${REPO}/pulls/${PR_NUMBER}/comments \
  --method POST \
  -f body="$COMMENT_BODY" \
  -f commit_id="$COMMIT_SHA" \
  -f path="$PATH_FILE" \
  -F line=$LINE \
  -f side="RIGHT" \
  --jq '.id'

Length of output: 2139




🧠 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: 2026-05-29T11:02:22.804Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, version-bump PRs that update the main branch to reference a new CNV release (e.g., "Update project `main` to reference cnv 5.0") do NOT add new test files or test modules. These PRs only update metadata (pyproject.toml, tox.ini, .coderabbit.yaml) and clean up resolved Jira fixtures/markers in existing files. The "Stp Link Required" pre-merge check may incorrectly flag hundreds of "newly added" test files as a false positive due to the base-branch comparison shifting after branching — this should be ignored for such PRs.

Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-04-30T13:42:43.892Z
Learning: In the openshift-virtualization-tests repository, when processing test execution plan requests for PRs that introduce NEW test classes or test files (not just modifications to existing tests), always verify STD-first workflow compliance as part of the analysis: (1) check if the new test class has actual implementation code (assertions, test logic) — if so, it needs a prior STD PR, (2) check if the test file has a module docstring with STP or Jira/RFE link, (3) check if `What this PR does / why we need it:` in the PR description has meaningful content. Flag any violation even when the bot's primary request is only for a test execution plan. These checks should be appended to the test execution plan inline comment.

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: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 5101
File: .github/workflows/request-coderabbit-test-instructions.yml:17-17
Timestamp: 2026-06-02T11:53:37.264Z
Learning: In RedHatQE/openshift-virtualization-tests, the `request-coderabbit-test-instructions.yml` workflow intentionally always creates a new comment (never updates/deduplicates) when either `generate_test_report` or `verified` labels trigger it. This is by design: the PR diff can change between the two triggers (new commits pushed), so each trigger produces an independent TIA snapshot of a different diff state. Deduplicating with `find-comment + edit-mode: replace` would be harmful because it would overwrite the earlier report, removing the ability to compare the two analyses. The historical record of both reports is a desired feature.

Learnt from: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-05-14T14:01:37.353Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when a PR has the `needs-rebase` label and the pre-merge check reports a large number of "new test_*.py files" (e.g., 300+) that do not match the actual PR diff, this is a false positive caused by the check comparing the entire diverged branch file tree against main rather than just the PR diff. Do not raise STP Link Required or Docstring Coverage violations based on such check results — only flag these if the PR diff itself actually adds new test files or functions lacking docstrings.

Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 5101
File: .github/workflows/request-coderabbit-test-instructions.yml:17-17
Timestamp: 2026-06-02T11:49:18.055Z
Learning: In RedHatQE/openshift-virtualization-tests, the `generate_test_report` label is intentionally applied at a different PR lifecycle stage than `verified`: `generate_test_report` is applied early during review (or right after PR creation) for on-demand TIA, while `verified` is applied later after the author has tested their changes. Both labels trigger the `request-coderabbit-test-instructions.yml` workflow independently.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-05-27T09:38:55.486Z
Learning: For PR reviews in RedHatQE/openshift-virtualization-tests, pre-merge checks must be re-evaluated and reported on every new commit push, not just on the initial review. The user (rnetser) has explicitly stated: "you must always run the pre merge checks on every commit."

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: 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: 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: 4954
File: .flake8:4-4
Timestamp: 2026-06-01T14:00:52.523Z
Learning: In RedHatQE/openshift-virtualization-tests, the smoke-marked test files (tests/storage/cdi_clone/test_clone.py, tests/storage/cdi_upload/test_upload_virtctl.py, tests/virt/cluster/common_templates/rhel/test_rhel_os_support.py, tests/virt/node/general/test_container_disk_vm.py) have traceable dependency paths to utilities/storage.py, utilities/hco.py (wait_for_hco_conditions), utilities/infra.py, and utilities/virt.py via direct imports and via tests/storage/conftest.py. Do not conclude "no smoke dependency path" without verifying these transitive imports.

Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 5039
File: tests/network/l2_bridge/nad_ref_change/lib_helpers.py:1-1
Timestamp: 2026-06-02T21:16:58.118Z
Learning: In RedHatQE/openshift-virtualization-tests, when a PR only relocates functions to shared libraries and updates import paths in test files (no logic change), do NOT flag the callers as requiring full test re-execution. At most, run `pytest --collect-only` to verify the new import paths resolve correctly. Only require full re-execution of caller tests when the moved function's implementation changes behavior.

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: 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: 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: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_pytest_utils.py:270-270
Timestamp: 2026-05-18T06:31:18.023Z
Learning: In RedHatQE/openshift-virtualization-tests, when a Ruff rule enforcement PR (e.g., enabling PLC0415 import-outside-top-level) is introduced, pre-existing violations are intentionally annotated with per-line `# noqa: PLC0415` comments as a temporary suppression to keep CI green. These suppressions are NOT code-quality issues to flag during review — they are an agreed-upon, documented mechanism (stated in the PR's "Special notes for reviewer" section) for incremental cleanup. Do not suggest removing or consolidating these suppressions in the same PR; they are addressed in dedicated follow-up PRs.

Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 4772
File: tests/network/l2_bridge/rhel9_rhel10_cluster/test_connectivity.py:31-37
Timestamp: 2026-05-08T06:44:12.879Z
Learning: In tests/network/l2_bridge/rhel9_rhel10_cluster/test_connectivity.py and tests/network/localnet/rhel9_rhel10_cluster/test_connectivity.py (dual-stream RHCOS 9/10 migration tests), the incremental/state-coupled test design is intentional and agreed upon in the STD (https://github.com/RedHatQE/openshift-virtualization-tests-design-docs/blob/main/stps/sig-virt/dual-stream-cluster-rhcos9-rhcos10/network.md). Tests are ordered (RHCOS 9 → RHCOS 10 → RHCOS 9) using pytest.mark.incremental, and test_*_to_rhcos9 intentionally relies on the VM already being on RHCOS 10 from the previous test. Do not flag this as a state-coupling issue or suggest making these tests independently runnable.

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

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-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: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-18T15:22:26.757Z
Learning: Applies to tests/**/test_*.py : New feature tests must follow the STD-first workflow: (1) STP (Software Test Plan) reviewed and approved, (2) STD (Software Test Description) placeholder tests with docstrings and `__test__ = False` reviewed, (3) Implementation only after STD review. Never submit test implementation without prior STD review.

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: 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: 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: 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: 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: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4880
File: tests/install_upgrade_operators/pod_validation/test_pod_spec.py:67-70
Timestamp: 2026-05-19T08:29:42.737Z
Learning: In RedHatQE/openshift-virtualization-tests, when a PR is a cherry pick from another branch, the team prefers to keep the code identical to the source PR even if minor style improvements (e.g., replacing unused fixture parameters with `pytest.mark.usefixtures`) are possible. Do not insist on such changes in cherry-pick PRs targeting branch-specific branches (e.g., cnv-4.20).

Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4880
File: tests/install_upgrade_operators/deployment/conftest.py:25-28
Timestamp: 2026-05-19T08:28:17.264Z
Learning: In RedHatQE/openshift-virtualization-tests, action-verb-named pytest fixtures (e.g., `xfail_if_<condition>`) that call `pytest.xfail` as a side effect without returning/yielding a value are acceptable in cherry-pick or backport PRs where refactoring to noun-based names is deferred. Do not block such PRs on fixture naming conventions when the change is a targeted backport.

Learnt from: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4782
File: tests/infrastructure/golden_images/update_boot_source/test_ssp_data_sources.py:561-564
Timestamp: 2026-05-07T21:52:15.047Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, the quarantine for TestDataSourcesOptInLabel and TestDataSourcesOptOutLabel (CNV-86273, missing cdi.kubevirt.io/dataImportCron label) is intentionally using pytest.mark.xfail(run=False) because QE is still evaluating with the development team whether this is a product bug (Category 1) or automation/environment issue (Category 2). Do not flag the use of xfail here as incorrect; it is a deliberate choice pending root-cause analysis.

Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4763
File: tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/test_multiarch_golden_images_support.py:7-10
Timestamp: 2026-05-12T07:49:46.973Z
Learning: In RedHatQE/openshift-virtualization-tests, the `enableMultiArchBootImageImport` feature gate in HCO CR is **enabled by default**. When a test class (e.g., `TestDisabledMultiarchGoldenImagesSupport`) targets the disabled state, it is testing a non-default configuration explicitly overriding the default. Do not flag the module-level precondition stating "feature gate enabled" as inconsistent with disabled-state test classes; the precondition correctly reflects the default cluster baseline.

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: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 3050
File: tests/infrastructure/golden_images/update_boot_source/test_ssp_data_import_crons.py:277-279
Timestamp: 2025-12-10T10:57:12.630Z
Learning: In tests/infrastructure/golden_images/update_boot_source/test_ssp_data_import_crons.py, the test_all_datasources_support_vm_creation method uses broad Exception catching intentionally to collect all VM creation failures across different data sources for comprehensive reporting, rather than letting specific exceptions bubble up and stop the test early.

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

Verification failed for PR #4983.
The pipeline did not reach the test execution stage.

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

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

@rlobillo
Copy link
Copy Markdown
Contributor Author

rlobillo commented Jun 4, 2026

/verified cancel

@rlobillo
Copy link
Copy Markdown
Contributor Author

rlobillo commented Jun 4, 2026

/verified
openshift-virtualization-tests-runner/5553

@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 full Test Execution Plan (smoke decision, gating decision, and specific affected tests).
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, fixture inheritance, fixture teardown, and yield from cleanup in conftest

  5. Detect new tests introduced in the PR

  6. Utilities and libs impact (when utilities/ or libs/ changes):
    You MUST use shell scripts (rg, git diff) to trace the full impact.
    Follow these sub-steps in order:

    6a. Identify modified symbols: For each changed file under utilities/ or libs/,
    list every modified function or method.
    Example: git diff HEAD~1 --unified=0 -- utilities/hco.py | grep '^[+-]def '

    6b. Find direct callers: Search tests and conftest for each symbol from 6a.
    Example: rg -l 'get_hco_version' tests/

    6c. Trace fixture teardown and cleanup: Find fixtures that reach
    the modified symbol through yield from or context-manager wrappers.
    Example: rg -l 'yield from.*enable_common_boot|def.*enable_common_boot' tests/

    6d. Trace same-file callers: In each changed file, find other functions
    whose body calls a modified symbol (including code after yield
    in @contextmanager helpers).
    Example: rg 'get_hco_version|enable_common_boot' utilities/hco.py

    6e. Expand transitively: If function A calls modified B, then
    tests/fixtures that call A are affected — even when the test body
    never imports B directly.

    Do NOT limit impact to tests that import the modified symbol only.

  7. Smoke test impact: Intersect the affected set from step 6 with smoke-marked tests.
    Run: rg -l '@pytest.mark.smoke' tests/
    VERIFY the above command returned actual file paths before concluding False.
    Set True if either condition is met:

    • a smoke-marked file appears in the affected set from 6b-6e, OR
    • any conftest.py in the smoke test's parent-directory hierarchy (up to repo root)
      imports or calls a modified utilities/libs symbol — including autouse fixtures
      that depend on modified functions. ALL tests in that directory and below are affected.
      Example check: for each smoke_file, scan dirname(smoke_file)/conftest.py,
      dirname(dirname(smoke_file))/conftest.py, etc. for modified symbol imports
      and autouse fixtures that depend on modified symbols.
  8. Gating test impact: Intersect the affected set from step 6 with gating-marked tests.
    Run: rg -l '@pytest.mark.gating' tests/
    Set True if a gating-marked file also appears in the affected set from 6b-6e.
    Utilities/libs changes often affect gating tests without affecting smoke tests.
    Do NOT stop analysis after concluding Run smoke tests: False.

Output rules:
Do NOT include analysis step numbers (1-8) in your visible output.

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

Test Execution Plan

  • Run smoke tests: True / False — If True, state the dependency path (test → fixture → changed symbol). True ONLY with a verified path.
  • Run gating tests: True / False — If True, state the dependency path. True if any gating-marked test is in the affected set.
  • Affected tests to run (required when utilities/, libs/, or shared conftest changes — list concrete paths even when smoke is False)
  • 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 a marker covers multiple affected tests (e.g. -m gating only if ALL gating tests in scope need run)
  • Tag each listed test or group with its marker when not obvious, e.g. (gating) or (smoke)

Guidelines:

  • Include tests affected directly OR via fixture setup/teardown, yield from cleanup, or transitive utility call chains (caller calls modified helper)
  • Use a full file path only if ALL tests in that file require verification
  • Use file path + test name when only specific tests use an affected fixture or utility wrapper (preferred for partial file impact)
  • If a test marker can cover multiple files/tests, provide the marker
  • Balance coverage vs over-testing - Keep descriptions minimal
  • Example: if leaf helper foo() changes, include tests whose fixture teardown calls wrapper bar() where bar() calls foo(), even when the test body only imports an unrelated symbol from the same utilities module

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 — Verification rules for smoke and gating decisions:
- For each True decision, you must have traced a concrete path: test file → fixture → utility function → modified symbol.
- Do NOT assume impact based on scope, file proximity, or infrastructure-sounding names.
Only set True when you trace a concrete path through steps 6a-6e, then 7 or 8.
WRONG: "utilities/hco.py changed → run smoke" (no traced dependency path)
WRONG: "Run smoke tests: False" with no affected-test list when gating tests use the changed utility
RIGHT: "Run smoke tests: False, Run gating tests: True" plus tests/.../test_foo.py::TestBar::test_baz (gating)
RIGHT: "Smoke test X uses fixture Y → wrapper Z → changed function W in utilities/hco.py"

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

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

echo "=== HEAD commit SHA ==="
gh pr view $PR_NUMBER --repo $REPO --json headRefOid --jq '.headRefOid'

echo ""
echo "=== All changed files with patches ==="
gh api repos/${REPO}/pulls/${PR_NUMBER}/files --jq '.[] | {filename: .filename, patch: (.patch | split("\n") | .[0:5] | join("\n"))}'

echo ""
echo "=== Direct callers of changed symbols ==="
rg -l "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" tests/ --type py 2>/dev/null

echo ""
echo "=== Smoke-marked files ==="
rg -l "`@pytest.mark.smoke`" tests/ --type py 2>/dev/null | head -20

echo ""
echo "=== Gating-marked files that call changed symbols ==="
for f in $(rg -l "`@pytest.mark.gating`" tests/ --type py 2>/dev/null); do
  if rg -q "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" "$f" 2>/dev/null; then
    echo "GATING MATCH: $f"
  fi
done

echo ""
echo "=== Check conftest hierarchy of smoke tests for changed symbols ==="
for sf in $(rg -l "`@pytest.mark.smoke`" tests/ --type py 2>/dev/null); do
  dir=$(dirname "$sf")
  while [ "$dir" != "." ] && [ "$dir" != "" ]; do
    cf="$dir/conftest.py"
    if [ -f "$cf" ]; then
      if rg -q "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" "$cf" 2>/dev/null; then
        echo "SMOKE CONFTEST MATCH: $sf via $cf"
      fi
    fi
    dir=$(dirname "$dir")
  done
done
echo "=== conftest hierarchy check done ==="

Length of output: 4446


🏁 Script executed:

#!/bin/bash
echo "=== tests/conftest.py usage of changed symbols ==="
rg -n "verify_boot_sources_reimported|enable_common_boot_image_import_spec_wait_for_data_import_cron|disable_common_boot_image_import_hco_spec" tests/conftest.py -B5 -A5

echo ""
echo "=== Is fixture autouse? ==="
rg -n "autouse" tests/conftest.py -B3 -A3 | grep -A10 "disable_common_boot_image_import\|verify_boot_sources\|enable_common_boot_image"

Length of output: 3624


🏁 Script executed:

#!/bin/bash
COMMIT_SHA="08168799dfd6626cffdad038bfab381f99aae4f5"
REPO="RedHatQE/openshift-virtualization-tests"
PR_NUMBER=4983
PATH_FILE="tests/install_upgrade_operators/hco_enablement_golden_image_updates/conftest.py"
LINE=6

COMMENT_BODY="**Test Execution Plan**

- **Run smoke tests: False** — \`tests/conftest.py\` imports \`verify_boot_sources_reimported\` and \`disable_common_boot_image_import_hco_spec\`, but they are used only in non-autouse named fixtures (\`disabled_common_boot_image_import_hco_spec_scope_function\`, \`disabled_common_boot_image_import_hco_spec_scope_class\`, \`removed_default_storage_classes\`). Smoke tests do not request these fixtures. All existing call sites omit \`exclude_data_source_names\`, preserving \`None\` default — no behavioral change.
- **Run gating tests: False** — No gating-marked test file calls any of the modified symbols.

**Affected tests to run:**

- \`utilities/unittests/test_hco.py\` — unit tests verifying \`exclude_data_source_names\` propagation through \`disable_common_boot_image_import_hco_spec\` and \`enable_common_boot_image_import_spec_wait_for_data_import_cron\`
- \`tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_update_hco_cr.py::test_add_custom_data_import_cron_template_disable_spec\` — de-quarantined test using new \`disabled_boot_image_import_excluding_custom_datasource\` fixture with \`exclude_data_source_names={CUSTOM_DATASOURCE_NAME}\`
- \`tests/infrastructure/golden_images/update_boot_source/\` — conftest fixtures call \`enable_common_boot_image_import_spec_wait_for_data_import_cron\` (teardown path); verify teardown passes after rebase
- \`tests/storage/golden_image/test_cached_snapshots.py\` — directly imports \`disable_common_boot_image_import_hco_spec\` from \`utilities.hco\`"

gh api \
  repos/${REPO}/pulls/${PR_NUMBER}/comments \
  --method POST \
  -f body="$COMMENT_BODY" \
  -f commit_id="$COMMIT_SHA" \
  -f path="$PATH_FILE" \
  -F line=$LINE \
  -f side="RIGHT" \
  --jq '.id'

Length of output: 2063




🧠 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: 2026-05-29T11:02:22.804Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, version-bump PRs that update the main branch to reference a new CNV release (e.g., "Update project `main` to reference cnv 5.0") do NOT add new test files or test modules. These PRs only update metadata (pyproject.toml, tox.ini, .coderabbit.yaml) and clean up resolved Jira fixtures/markers in existing files. The "Stp Link Required" pre-merge check may incorrectly flag hundreds of "newly added" test files as a false positive due to the base-branch comparison shifting after branching — this should be ignored for such PRs.

Learnt from: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-04-30T13:42:43.892Z
Learning: In the openshift-virtualization-tests repository, when processing test execution plan requests for PRs that introduce NEW test classes or test files (not just modifications to existing tests), always verify STD-first workflow compliance as part of the analysis: (1) check if the new test class has actual implementation code (assertions, test logic) — if so, it needs a prior STD PR, (2) check if the test file has a module docstring with STP or Jira/RFE link, (3) check if `What this PR does / why we need it:` in the PR description has meaningful content. Flag any violation even when the bot's primary request is only for a test execution plan. These checks should be appended to the test execution plan inline comment.

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: yossisegev
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-05-14T14:01:37.353Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, when a PR has the `needs-rebase` label and the pre-merge check reports a large number of "new test_*.py files" (e.g., 300+) that do not match the actual PR diff, this is a false positive caused by the check comparing the entire diverged branch file tree against main rather than just the PR diff. Do not raise STP Link Required or Docstring Coverage violations based on such check results — only flag these if the PR diff itself actually adds new test files or functions lacking docstrings.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-05-27T09:38:55.486Z
Learning: For PR reviews in RedHatQE/openshift-virtualization-tests, pre-merge checks must be re-evaluated and reported on every new commit push, not just on the initial review. The user (rnetser) has explicitly stated: "you must always run the pre merge checks on every commit."

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: 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: 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: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 4782
File: tests/infrastructure/golden_images/update_boot_source/test_ssp_data_sources.py:561-564
Timestamp: 2026-05-07T21:52:15.047Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, the quarantine for TestDataSourcesOptInLabel and TestDataSourcesOptOutLabel (CNV-86273, missing cdi.kubevirt.io/dataImportCron label) is intentionally using pytest.mark.xfail(run=False) because QE is still evaluating with the development team whether this is a product bug (Category 1) or automation/environment issue (Category 2). Do not flag the use of xfail here as incorrect; it is a deliberate choice pending root-cause analysis.

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: 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: 4954
File: .flake8:4-4
Timestamp: 2026-06-01T14:00:52.523Z
Learning: In RedHatQE/openshift-virtualization-tests, the smoke-marked test files (tests/storage/cdi_clone/test_clone.py, tests/storage/cdi_upload/test_upload_virtctl.py, tests/virt/cluster/common_templates/rhel/test_rhel_os_support.py, tests/virt/node/general/test_container_disk_vm.py) have traceable dependency paths to utilities/storage.py, utilities/hco.py (wait_for_hco_conditions), utilities/infra.py, and utilities/virt.py via direct imports and via tests/storage/conftest.py. Do not conclude "no smoke dependency path" without verifying these transitive imports.

Learnt from: azhivovk
Repo: RedHatQE/openshift-virtualization-tests PR: 5039
File: tests/network/l2_bridge/nad_ref_change/lib_helpers.py:1-1
Timestamp: 2026-06-02T21:17:09.602Z
Learning: In RedHatQE/openshift-virtualization-tests, when a PR only relocates functions to shared libraries and updates import paths in test files (no logic change), do NOT flag the callers as requiring full test re-execution. At most, run `pytest --collect-only` to verify the new import paths resolve correctly. Only require full re-execution of caller tests when the moved function's implementation changes behavior.

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: 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: EdDev
Repo: RedHatQE/openshift-virtualization-tests PR: 4819
File: utilities/unittests/test_pytest_utils.py:270-270
Timestamp: 2026-05-18T06:31:18.023Z
Learning: In RedHatQE/openshift-virtualization-tests, when a Ruff rule enforcement PR (e.g., enabling PLC0415 import-outside-top-level) is introduced, pre-existing violations are intentionally annotated with per-line `# noqa: PLC0415` comments as a temporary suppression to keep CI green. These suppressions are NOT code-quality issues to flag during review — they are an agreed-upon, documented mechanism (stated in the PR's "Special notes for reviewer" section) for incremental cleanup. Do not suggest removing or consolidating these suppressions in the same PR; they are addressed in dedicated follow-up PRs.

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: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2026-05-03T15:38:39.607Z
Learning: In the RedHatQE/openshift-virtualization-tests repository, lint cleanup PRs (e.g. pre-commit hook bumps with ruff/mypy) should NOT be asked to fix pre-existing code patterns that are outside the diff. Issues like bare `except Exception`, missing `raise ... from`, timezone-naive datetime comparisons, implicit `return None`, TRY003 long error messages in exceptions, and boolean accumulator logic in utility functions are pre-existing and should only be addressed in dedicated follow-up PRs, not in automated lint-cleanup PRs.

Learnt from: servolkov
Repo: RedHatQE/openshift-virtualization-tests PR: 5111
File: tests/network/localnet/upgrade/test_default_bridge_connectivity.py:1-11
Timestamp: 2026-06-03T09:46:34.574Z
Learning: In RedHatQE/openshift-virtualization-tests, new test files (test_*.py) written as bug automation — i.e., tests that verify a fix for an OCP bug (OCPBUGS-*) or a CNV Jira bug (CNV-*) — do NOT require the STD-first workflow (separate STD placeholder PR before implementation) and do NOT require an STP link. The bug tracker URL (e.g., https://redhat.atlassian.net/browse/OCPBUGS-66994) in the module docstring is sufficient traceability. The STD may be included in the same implementation PR. Do not flag missing STP links or missing dedicated STD PRs for OCPBUGS/CNV bug-automation tests.

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 4344
File: scripts/tests_analyzer/pytest_marker_analyzer.py:1750-1761
Timestamp: 2026-04-03T18:43:23.119Z
Learning: In scripts/tests_analyzer/pytest_marker_analyzer.py (openshift-virtualization-tests), module-level import lines in diffs are intentionally treated as "safe unattributed" changes (setting has_unattributed_changes=True rather than returning None). This is a deliberate design decision: import path changes (e.g., from X.Y import Z → from A.B import Z due to file renames) are structural, not behavioral — the resolved symbol Z is identical. Treating imports as conservative fallbacks would reintroduce false positives for file rename PRs (e.g., `#4308`, `#4314`). Broken import paths are caught by pytest --collect-only, not smoke test execution. Do not flag this pattern as a false-positive risk.

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

Learnt from: rnetser
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: :0-0
Timestamp: 2025-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: CR
Repo: RedHatQE/openshift-virtualization-tests PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-05-18T15:22:26.757Z
Learning: Applies to tests/**/test_*.py : New feature tests must follow the STD-first workflow: (1) STP (Software Test Plan) reviewed and approved, (2) STD (Software Test Description) placeholder tests with docstrings and `__test__ = False` reviewed, (3) Implementation only after STD review. Never submit test implementation without prior STD review.

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: 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: 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: 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: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4880
File: tests/install_upgrade_operators/pod_validation/test_pod_spec.py:67-70
Timestamp: 2026-05-19T08:29:42.737Z
Learning: In RedHatQE/openshift-virtualization-tests, when a PR is a cherry pick from another branch, the team prefers to keep the code identical to the source PR even if minor style improvements (e.g., replacing unused fixture parameters with `pytest.mark.usefixtures`) are possible. Do not insist on such changes in cherry-pick PRs targeting branch-specific branches (e.g., cnv-4.20).

Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4880
File: tests/install_upgrade_operators/deployment/conftest.py:25-28
Timestamp: 2026-05-19T08:28:17.264Z
Learning: In RedHatQE/openshift-virtualization-tests, action-verb-named pytest fixtures (e.g., `xfail_if_<condition>`) that call `pytest.xfail` as a side effect without returning/yielding a value are acceptable in cherry-pick or backport PRs where refactoring to noun-based names is deferred. Do not block such PRs on fixture naming conventions when the change is a targeted backport.

Learnt from: hmeir
Repo: RedHatQE/openshift-virtualization-tests PR: 4763
File: tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/test_multiarch_golden_images_support.py:7-10
Timestamp: 2026-05-12T07:49:46.973Z
Learning: In RedHatQE/openshift-virtualization-tests, the `enableMultiArchBootImageImport` feature gate in HCO CR is **enabled by default**. When a test class (e.g., `TestDisabledMultiarchGoldenImagesSupport`) targets the disabled state, it is testing a non-default configuration explicitly overriding the default. Do not flag the module-level precondition stating "feature gate enabled" as inconsistent with disabled-state test classes; the precondition correctly reflects the default cluster baseline.

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: geetikakay
Repo: RedHatQE/openshift-virtualization-tests PR: 3050
File: tests/infrastructure/golden_images/update_boot_source/test_ssp_data_import_crons.py:277-279
Timestamp: 2025-12-10T10:57:12.630Z
Learning: In tests/infrastructure/golden_images/update_boot_source/test_ssp_data_import_crons.py, the test_all_datasources_support_vm_creation method uses broad Exception catching intentionally to collect all VM creation failures across different data sources for comprehensive reporting, rather than letting specific exceptions bubble up and stop the test early.

@rlobillo
Copy link
Copy Markdown
Contributor Author

rlobillo commented Jun 5, 2026

Verified in openshift-virtualization-tests-runner/5553 against CNV 4.22.0 (candidate channel).

Test Execution Plan results:

Test Result Notes
utilities/unittests/test_hco.py PASSED (CI) Unit tests for exclude_data_source_names propagation
test_add_custom_data_import_cron_template_disable_spec N/A Not collected in this job (different test directory)
tests/infrastructure/golden_images/update_boot_source/ 42 passed All tests in this directory passed
tests/storage/golden_image/test_cached_snapshots.py PASSED

5 ERRORs reported — all unrelated to this PR:

  • 2 setup ERRORs (hostpath-csi-basic, hostpath-csi-pvc-block variants of test_data_import_cron_uses_default_storage_class): StorageClasses do not exist on the test cluster (404 Not Found). The storage class matrix includes SCs not available on this environment — pre-existing infrastructure mismatch.
  • 3 teardown ERRORs (all 3 variants of test_data_import_cron_uses_default_storage_class): centos-stream10 DataSource fails to reach Ready=True within 600s after the removed_default_storage_classes fixture restores default SC annotations. The DIC uses sourceFormat: snapshot and the reimport depends on the DIC cron schedule (14 1/12 * * *), so recovery takes hours — far exceeding the 600s teardown timeout. This is a pre-existing issue unrelated to the exclude_data_source_names changes in this PR.

@geetikakay
Copy link
Copy Markdown
Contributor

/lgtm

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