Skip to content

WIP: [4.19] Add support for datasources + backport online resize tests#4758

Open
ema-aka-young wants to merge 6 commits intoRedHatQE:cnv-4.19from
ema-aka-young:data-source-test-online-resize-cnv-4.19
Open

WIP: [4.19] Add support for datasources + backport online resize tests#4758
ema-aka-young wants to merge 6 commits intoRedHatQE:cnv-4.19from
ema-aka-young:data-source-test-online-resize-cnv-4.19

Conversation

@ema-aka-young
Copy link
Copy Markdown
Contributor

@ema-aka-young ema-aka-young commented May 6, 2026

Short description:

To support data sources cloning, we are backporting changes from:

More details:

Depends on RedHatQE/openshift-python-wrapper#2708

What this PR does / why we need it:

Backport changes already present in newer versions, so it would be possible to backport tests that use data sources cloning down to 4.19.

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

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

josemacassan and others added 2 commits May 5, 2026 17:12
* use RHEL Datasource into test_online_resize.py test

* Fix PRs comments after review.

* Pre-commit run changes applied.

* Change PRs review comments.

* Change create_rhel_dv location and name.

* Fix some suggestions after PR's review

* Fix issues requested after PR reviews.

* Apply requested changes from PR review.

* Apply requested changes from PR review.

* Change naming in function from PR review.

Signed-off-by: Emanuele Prella <eprella@redhat.com>
Signed-off-by: Emanuele Prella <eprella@redhat.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 6, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8b9d7da7-e632-467c-952f-6aca269b4121

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ 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.

Co-authored-by: Copilot <copilot@github.com>

Signed-off-by: Emanuele Prella <eprella@redhat.com>
…ation

Signed-off-by: Emanuele Prella <eprella@redhat.com>
@ema-aka-young ema-aka-young marked this pull request as ready for review May 6, 2026 11:19
@openshift-virtualization-qe-bot-2
Copy link
Copy Markdown
Contributor

Report bugs in Issues

Welcome! 🎉

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

🔄 Automatic Actions

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

📋 Available Commands

PR Status Management

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

Review & Approval

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

Testing & Validation

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

Container Operations

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

Cherry-pick Operations

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

Label Management

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

✅ Merge Requirements

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

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

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • jpeimer
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • Ahmad-Hafe
  • RoniKishner
  • acinko-rh
  • dalia-frank
  • dshchedr
  • ema-aka-young
  • geetikakay
  • josemacassan
  • jpeimer
  • kgoldbla
  • kshvaika
  • 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.

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

RoniKishner can not be added as reviewer. Validation Failed: 422 {"message": "Validation Failed", "errors": ["Could not add requested reviewers to pull request."], "documentation_url": "https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request", "status": "422"}

Signed-off-by: Emanuele Prella <eprella@redhat.com>
@ema-aka-young ema-aka-young changed the title Data source test online resize cnv 4.19 [4.19] Add support for datasources + backport online resize tests May 6, 2026
@ema-aka-young ema-aka-young changed the title [4.19] Add support for datasources + backport online resize tests WIP: [4.19] Add support for datasources + backport online resize tests May 6, 2026
@ema-aka-young
Copy link
Copy Markdown
Contributor Author

/build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=ed1558c0524362e3cb5267b8e9a902785eb83edc

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

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

@ema-aka-young
Copy link
Copy Markdown
Contributor Author

/wip cancel

@openshift-virtualization-qe-bot-5 openshift-virtualization-qe-bot-5 changed the title WIP: [4.19] Add support for datasources + backport online resize tests [4.19] Add support for datasources + backport online resize tests May 8, 2026
@ema-aka-young
Copy link
Copy Markdown
Contributor Author

/verified
openshift-virtualization-tests-runner/5165
-s -o log_cli=true -m tier2 --jira tests/storage/test_wffc.py tests/storage/golden_image/test_cached_snapshots.py tests/storage/data_import_cron/ tests/storage/vm_export/ tests/storage/storage_migration/ tests/infrastructure/golden_images/test_common_templates_data_volumes.py tests/infrastructure/golden_images/update_boot_source/ tests/infrastructure/instance_types/test_cpu_memory_hotplug_instancetype.py tests/infrastructure/instance_types/test_vm_preference.py tests/infrastructure/tekton/ tests/observability/metrics/ tests/virt/cluster/sysprep/test_sysprep.py tests/virt/cluster/vm_lifecycle/ tests/virt/node/readonly_disk/test_vm_with_windows_guest_tools.py tests/virt/upgrade/

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

@coderabbitai

Test execution plan request details

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

As an expert software testing engineer, analyze all modified files in this PR and create a targeted test execution plan.
You will post an inline review comment with the test execution plan on the first changed file.
If you fail to run or post a comment, retry.

Analysis Requirements:

  1. Examine code changes in each modified file
  2. Identify affected code paths, functions, and classes
  3. Analyze pytest-specific elements: fixtures (scope, dependencies), parametrization, markers, conftest changes
  4. Trace test dependencies through imports, shared utilities, and fixture inheritance
  5. Detect new tests introduced in the PR
  6. Smoke Test Impact Analysis: Determine if any changes could affect smoke tests by checking:
    • Changes to files/functions used by tests marked with @pytest.mark.smoke
    • Changes to fixtures or utilities imported by smoke tests
    • Changes to conftest.py files that may affect smoke test execution
    • Changes to core infrastructure code (utilities/, libs/) that smoke tests depend on

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

Test Execution Plan

  • Run smoke tests: True / False (Based on your smoke test impact analysis - True if any changes may affect smoke tests)
  • path/to/test_file.py - When the entire test file needs verification
  • path/to/test_file.py::TestClass::test_method - When specific test(s) needed
  • path/to/test_file.py::test_function - When specific test(s) needed
  • -m marker - When specific marker(s) can be used to cover multiple cases.

Guidelines:

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

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

When PR modifies fixtures for hardware-specific resources:

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

CRITICAL WORKFLOW COMPLETION RULES:

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

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

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

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

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

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

Comment thread tests/storage/conftest.py
yield get_hpp_daemonset(hco_namespace=hco_namespace, hpp_cr_suffix=hpp_cr_suffix_scope_module)


@pytest.fixture()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Test Execution Plan

  • Run smoke tests: False (No concrete dependency path found between smoke tests and changed code)

Tests to run:

  • tests/storage/online_resize/test_online_resize.py — New test module restructured from deleted test_online_resize.py; verify all new online resize tests pass
  • tests/storage/golden_image/test_cached_snapshots.py — Updated to use data_volume_template_with_source_ref_dict (replacing removed data_volume_dict_modify_to_source_ref); verify snapshot caching tests pass
  • tests/storage/test_wffc.py — Uses data_volume_template_with_source_ref_dict whose internal implementation changed (create_dv now passes source_ref); verify WFFC tests pass

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get PR details and changed files
gh pr view 4758 --repo RedHatQE/openshift-virtualization-tests --json files,headRefName,baseRefName

# Get PR diff to find first changed line
gh pr diff 4758 --repo RedHatQE/openshift-virtualization-tests | head -100

Length of output: 4363


🏁 Script executed:

#!/bin/bash
# Get the full diff for utilities/storage.py
gh pr diff 4758 --repo RedHatQE/openshift-virtualization-tests | grep -A 60 "diff --git a/utilities/storage.py"

# Check what smoke tests exist and if they import from utilities/storage.py or use changed fixtures
rg "@pytest.mark.smoke" --type py -l

# Check if smoke tests use data_volume_dict_modify_to_source_ref or data_volume_template_with_source_ref_dict
rg "data_volume_dict_modify_to_source_ref|data_volume_template_with_source_ref_dict" --type py -n

# Check if smoke tests use cirros_vm_name fixture
rg "cirros_vm_name" --type py -n

Length of output: 7892


🏁 Script executed:

#!/bin/bash
# Get head commit SHA
gh pr view 4758 --repo RedHatQE/openshift-virtualization-tests --json headRefOid -q '.headRefOid'

# Get PR commits to find the latest commit SHA
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/4758/commits --jq '.[-1].sha'

Length of output: 82


🏁 Script executed:

#!/bin/bash
BODY="**Test Execution Plan**

- **Run smoke tests: False** _(No concrete dependency path found between smoke tests and changed code)_

**Tests to run:**
- \`tests/storage/online_resize/test_online_resize.py\` — New test module restructured from deleted \`test_online_resize.py\`; verify all new online resize tests pass
- \`tests/storage/golden_image/test_cached_snapshots.py\` — Updated to use \`data_volume_template_with_source_ref_dict\` (replacing removed \`data_volume_dict_modify_to_source_ref\`); verify snapshot caching tests pass
- \`tests/storage/test_wffc.py\` — Uses \`data_volume_template_with_source_ref_dict\` whose internal implementation changed (\`create_dv\` now passes \`source_ref\`); verify WFFC tests pass"

gh api repos/RedHatQE/openshift-virtualization-tests/pulls/4758/comments \
  --method POST \
  --field commit_id="1124fbae1fd9ee9b227b6cbc4e74523c3cdb29f1" \
  --field path="tests/storage/conftest.py" \
  --field line=358 \
  --field side="LEFT" \
  --field body="$BODY"

Length of output: 3424


@ema-aka-young
Copy link
Copy Markdown
Contributor Author

/wip

@openshift-virtualization-qe-bot openshift-virtualization-qe-bot changed the title [4.19] Add support for datasources + backport online resize tests WIP: [4.19] Add support for datasources + backport online resize tests May 8, 2026
Co-authored-by: Copilot <copilot@github.com>

Signed-off-by: Emanuele Prella <eprella@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants