Skip to content

WIP: [Storgae] [Mian] Drop explicit target size in block-to-fs clone test#4606

Open
Ahmad-Hafe wants to merge 4 commits intoRedHatQE:mainfrom
Ahmad-Hafe:fix_block_to_fs_clone_drop_explicit_size
Open

WIP: [Storgae] [Mian] Drop explicit target size in block-to-fs clone test#4606
Ahmad-Hafe wants to merge 4 commits intoRedHatQE:mainfrom
Ahmad-Hafe:fix_block_to_fs_clone_drop_explicit_size

Conversation

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor

@Ahmad-Hafe Ahmad-Hafe commented Apr 27, 2026

Summary

  • Remove explicit target size calculation (filesystem overhead) from test_clone_from_block_to_fs_using_dv_template
  • Let CDI auto-detect the target size by setting resources: {} in the DV template when no size is specified
  • Remove now-unused overhead_size_for_dv, default_fs_overhead, and import math
  • This fixes failures on environments with minimumSupportedPvcSize (e.g. GCP with sp-balanced-storage) where the actual PVC capacity (4Gi) exceeds the DV spec size (1Gi), causing "target resources requests storage size is smaller than the source" errors

Details

This is a test issue, not a CDI bug. When minimumSupportedPvcSize is set, the CSI driver rounds up the PVC capacity, but the test was calculating the target size based on the DV spec size rather than the actual PVC capacity. The correct approach (confirmed by CDI devs) is to omit the target size entirely so CDI auto-detects it, including filesystem overhead.

Changes

  • tests/storage/cdi_clone/test_clone.py: Remove size and overhead_size_for_dv from test_clone_from_block_to_fs_using_dv_template
  • utilities/storage.py: In data_volume_template_dict, set resources: {} when no size is provided; remove unused overhead_size_for_dv function and import math
  • tests/storage/conftest.py: Remove unused default_fs_overhead fixture

Impacted tests

  • test_clone_from_block_to_fs_using_dv_template -- directly fixed
  • test_clone_from_fs_to_block_using_dv_template -- also calls data_volume_template_dict without size, now gets resources: {} (CDI auto-detect); no behavioral change expected

Test plan

  • Run test_clone_from_block_to_fs_using_dv_template on an environment with minimumSupportedPvcSize (e.g. GCP with sp-balanced-storage)
  • Run test_clone_from_block_to_fs_using_dv_template on a standard environment (e.g. ODF/Ceph)
  • Verify test_clone_from_fs_to_block_using_dv_template still passes

Summary by CodeRabbit

  • Refactor
    • Data volume templates no longer inject preset resource requests when size is unspecified, allowing automatic capacity detection instead of relying on precomputed overhead adjustments.
  • Tests
    • Test suite updated to stop supplying filesystem-overhead-adjusted sizes and no longer depends on the removed filesystem-overhead helper/fixture.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Removed the filesystem-overhead fixture and its helper; DataVolume template generation now omits resource requests when size is falsy, and tests were updated to stop supplying an overhead-adjusted size (relying on size=None).

Changes

DV template & tests

Layer / File(s) Summary
Data shape / template output
utilities/storage.py
data_volume_template_dict now sets dv.res["spec"][<api_name>]["resources"] = {} when the DV size is falsy so the produced dataVolumeTemplate omits resource requests and lets CDI auto-detect capacity.
Core helper removal
utilities/storage.py
Removed overhead_size_for_dv(image_size, overhead_value) and the math import.
Test function and wiring
tests/storage/cdi_clone/test_clone.py
Dropped overhead_size_for_dv import; test_clone_from_block_to_fs_using_dv_template no longer takes default_fs_overhead and no longer passes a size argument for volume_mode=DataVolume.VolumeMode.FILE.
Fixture cleanup
tests/storage/conftest.py
Removed default_fs_overhead pytest fixture that returned float(cdi_config.instance.status.filesystemOverhead["global"]).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title contains multiple spelling errors ('Storgae' instead of 'Storage', 'Mian' instead of 'Main') and uses WIP prefix, but accurately describes the core change: dropping explicit target size calculation in a block-to-fs clone test. Correct spelling errors ('Storgae' → 'Storage', 'Mian' → 'Main') and remove WIP prefix if the PR is ready for review. Suggested title: 'Drop explicit target size in block-to-fs clone test'.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description check ✅ Passed PR description comprehensively covers all required template sections with clear details about changes, rationale, impacted tests, and test plan execution.

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

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@Ahmad-Hafe Ahmad-Hafe marked this pull request as draft April 27, 2026 12:20
@openshift-virtualization-qe-bot-3
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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.67%. Comparing base (b4ad2e0) to head (badcd5c).
⚠️ Report is 134 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4606      +/-   ##
==========================================
+ Coverage   98.63%   98.67%   +0.03%     
==========================================
  Files          25       25              
  Lines        2420     2485      +65     
==========================================
+ Hits         2387     2452      +65     
  Misses         33       33              
Flag Coverage Δ
utilities 98.67% <ø> (+0.03%) ⬆️

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

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

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

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

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

Inline comments:
In `@utilities/storage.py`:
- Around line 560-562: Add a brief inline comment immediately above the existing
conditional that clears dv.res["spec"][source_dv.api_name]["resources"] when
size is falsy: explain that an omitted size parameter (size is None) signals CDI
to auto-detect target capacity rather than locking to a precomputed value
(source_dv.size), which avoids problems with minimumSupportedPvcSize for
block-to-filesystem clones; keep the comment concise and place it alongside the
conditional in the function where dv.to_dict() is used and dv.res is modified.
🪄 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: 5487b00f-e8b5-4428-82c0-4428b8c18dbf

📥 Commits

Reviewing files that changed from the base of the PR and between b675fe1 and d7c0082.

📒 Files selected for processing (2)
  • tests/storage/cdi_clone/test_clone.py
  • utilities/storage.py
💤 Files with no reviewable changes (1)
  • tests/storage/cdi_clone/test_clone.py

Comment thread utilities/storage.py
@Ahmad-Hafe Ahmad-Hafe force-pushed the fix_block_to_fs_clone_drop_explicit_size branch from dec32f9 to 7503001 Compare April 27, 2026 12:30
@Ahmad-Hafe Ahmad-Hafe changed the title Drop explicit target size in block-to-fs clone test [Storgae] [Mian] Drop explicit target size in block-to-fs clone test Apr 27, 2026
coderabbitai[bot]
coderabbitai Bot previously approved these changes Apr 27, 2026
@Ahmad-Hafe Ahmad-Hafe marked this pull request as ready for review April 27, 2026 13:04
Ahmad-Hafe and others added 4 commits May 5, 2026 22:35
Let CDI auto-detect the target size instead of manually calculating
it with filesystem overhead. This fixes failures on environments with
minimumSupportedPvcSize where the actual PVC capacity exceeds the
DV spec size.

Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Made-with: Cursor
Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Made-with: Cursor
Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Made-with: Cursor
Documents parameters and the non-obvious size=None behavior where
CDI auto-detects capacity instead of using a pre-computed value.

Signed-off-by: Ahmad Hafe <ahafe@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/retest verify-bugs-are-open

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/verified

execute following test under ::tests/storage/cdi_clone/test_clone.py with cloud providor sc (sp-balanced-storage) and also ocs-storagecluster-ceph-rbd-virtualization pass rate 100%

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/retest verify-bugs-are-open

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

coderabbitai Bot commented May 5, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get latest commit SHA
COMMIT=$(gh pr view 4606 --repo RedHatQE/openshift-virtualization-tests --json commits --jq '.commits[-1].oid')
echo "Latest commit: $COMMIT"

# Get PR diff to find first changed file and first changed line
gh pr diff 4606 --repo RedHatQE/openshift-virtualization-tests | head -80

# Verify smoke marker on the test
echo "=== Smoke markers in test_clone.py ==="
rg "pytest.mark.smoke" tests/storage/cdi_clone/test_clone.py -B5 -n

# Confirm no other smoke tests depend on changed code
echo "=== Files using data_volume_template_dict ==="
rg "data_volume_template_dict" --type=py -l

echo "=== Files using default_fs_overhead ==="
rg "default_fs_overhead" --type=py -l

echo "=== Files using overhead_size_for_dv ==="
rg "overhead_size_for_dv" --type=py -l

Length of output: 3630


🏁 Script executed:

#!/bin/bash
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  repos/RedHatQE/openshift-virtualization-tests/pulls/4606/comments \
  -f commit_id="badcd5c444aeaff070ecf46d68581100c931c401" \
  -f path="tests/storage/cdi_clone/test_clone.py" \
  -f side="LEFT" \
  -F line=27 \
  -f body="## Test Execution Plan

- **Run smoke tests: True**
  _Reason: \`test_clone_from_block_to_fs_using_dv_template\` (CNV-5608) carries \`@pytest.mark.smoke\` and is directly modified by this PR._

- \`tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template\` — primary change; verify CDI auto-detects target size without explicit overhead (run on GCP sp-balanced-storage **and** ODF/Ceph)
- \`tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template\` — regression check; shares \`data_volume_template_dict\` code path now returning \`resources: {}\` when no size supplied"

Length of output: 3258


@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/retest verify-bugs-are-open

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/reprocess

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/verified

execute following test under ::tests/storage/cdi_clone/test_clone.py with cloud providor sc (sp-balanced-storage) and also ocs-storagecluster-ceph-rbd-virtualization pass rate 100%

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

coderabbitai Bot commented May 5, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get latest commit SHA
COMMIT=$(gh pr view 4606 --repo RedHatQE/openshift-virtualization-tests --json commits --jq '.commits[-1].oid')
echo "Latest commit: $COMMIT"

# Verify smoke marker still present
rg "pytest.mark.smoke" tests/storage/cdi_clone/test_clone.py -n -B3 | head -20

# Confirm no other smoke tests use changed functions
echo "=== smoke tests using data_volume_template_dict ==="
rg "data_volume_template_dict" --type=py -l
echo "=== smoke tests using overhead_size_for_dv ==="
rg "overhead_size_for_dv" --type=py -l
echo "=== smoke tests using default_fs_overhead ==="
rg "default_fs_overhead" --type=py -l

# Post inline comment
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  repos/RedHatQE/openshift-virtualization-tests/pulls/4606/comments \
  -f commit_id="$COMMIT" \
  -f path="tests/storage/cdi_clone/test_clone.py" \
  -f side="LEFT" \
  -F line=27 \
  -f body="## Test Execution Plan

- **Run smoke tests: True**
  _Reason: \`test_clone_from_block_to_fs_using_dv_template\` (CNV-5608) carries \`@pytest.mark.smoke\` and is directly modified by this PR._

- \`tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template\` — primary change; verify CDI auto-detects target size without explicit overhead (run on GCP sp-balanced-storage **and** ODF/Ceph)
- \`tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template\` — regression check; shares \`data_volume_template_dict\` code path now returning \`resources: {}\` when no size supplied"

Length of output: 3726


@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/retest verify-bugs-are-open

1 similar comment
@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/retest verify-bugs-are-open

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/reprocess

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/verified

Tests passed on GCP (sp-balanced-storage) and ODF (ocs-storagecluster-ceph-rbd-virtualization)

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

coderabbitai Bot commented May 5, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get latest commit SHA
COMMIT=$(gh pr view 4606 --repo RedHatQE/openshift-virtualization-tests --json commits --jq '.commits[-1].oid')
echo "Latest commit: $COMMIT"

# Verify smoke marker still present on the test
rg "pytest.mark.smoke" tests/storage/cdi_clone/test_clone.py -n -B3 | head -20

# Confirm no other smoke tests depend on changed functions
echo "=== Files using overhead_size_for_dv ==="
rg "overhead_size_for_dv" --type=py -l
echo "=== Files using default_fs_overhead ==="
rg "default_fs_overhead" --type=py -l

# Post inline comment on the first changed line (line 27, LEFT side - removed import)
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  repos/RedHatQE/openshift-virtualization-tests/pulls/4606/comments \
  -f commit_id="$COMMIT" \
  -f path="tests/storage/cdi_clone/test_clone.py" \
  -f side="LEFT" \
  -F line=27 \
  -f body="## Test Execution Plan

- **Run smoke tests: True**
  _Reason: \`test_clone_from_block_to_fs_using_dv_template\` (CNV-5608) carries \`@pytest.mark.smoke\` and is directly modified by this PR._

- \`tests/storage/cdi_clone/test_clone.py::test_clone_from_block_to_fs_using_dv_template\` — primary change; verify CDI auto-detects target size without explicit overhead (run on GCP sp-balanced-storage **and** ODF/Ceph)
- \`tests/storage/cdi_clone/test_clone.py::test_clone_from_fs_to_block_using_dv_template\` — regression check; shares \`data_volume_template_dict\` code path now returning \`resources: {}\` when no size supplied"

Length of output: 3468


@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

@myakove The verify-bugs-are-open check keeps failing even after removing all Jira references from the PR body and commits. This PR is a test fix (not a bug fix) and has no associated Jira bugs. Can you help investigate or skip this check?

@rnetser
Copy link
Copy Markdown
Collaborator

rnetser commented May 6, 2026

@myakove The verify-bugs-are-open check keeps failing even after removing all Jira references from the PR body and commits. This PR is a test fix (not a bug fix) and has no associated Jira bugs. Can you help investigate or skip this check?

did you check the log? the error is very clear

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

/retest all

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

Overlapping files

utilities/storage.py

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/wip

need to raise this in grooming fort further determination
the pr will be in wip for now

@Ahmad-Hafe
Copy link
Copy Markdown
Contributor Author

/hold

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

Ahmad-Hafe is not part of the approver, only approvers can mark pull request with hold

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.