Skip to content

WIP: [storage] De-quarantine HTTP import test_invalid_url#4862

Open
ema-aka-young wants to merge 1 commit into
RedHatQE:mainfrom
ema-aka-young:CNV-73197-dequarantine-invalid-url
Open

WIP: [storage] De-quarantine HTTP import test_invalid_url#4862
ema-aka-young wants to merge 1 commit into
RedHatQE:mainfrom
ema-aka-young:CNV-73197-dequarantine-invalid-url

Conversation

@ema-aka-young
Copy link
Copy Markdown
Contributor

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

Short description:

Dequarantine cdi_import/test_import_http.py::test_invalid_url.

More details:

This PR is part of a multi-step task that deprecates DataVolume.wait() and falls back to the parent Resource.wait() method in the wrapper. Previously, this test was relying on that method and hence failing.

What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for reviewer:

This PR depends on this wrapper patch.

jira-ticket:

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

Summary by CodeRabbit

  • Tests
    • Updated test expectations for HTTP import validation handling.

Review Change Stack

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

coderabbitai Bot commented May 14, 2026

📝 Walkthrough

Walkthrough

This PR removes an unused import and enables a previously failing test. The QUARANTINED constant is removed from the imports in the HTTP import test file, and the pytest.mark.xfail decorator is removed from test_invalid_url, allowing that test to run without expected failure.

Changes

HTTP import test cleanup

Layer / File(s) Summary
Unused import and xfail decorator removal
tests/storage/cdi_import/test_import_http.py
The QUARANTINED constant is removed from the utilities.constants import list, and the pytest.mark.xfail(...) decorator is removed from test_invalid_url, enabling the test to run as an expected pass.

🎯 1 (Trivial) | ⏱️ ~5 minutes


Important

Pre-merge checks failed

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

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description is partially filled but contains significant gaps: 'What this PR does / why we need it' and 'Which issue(s) this PR fixes' sections are completely empty, undermining clarity about the change's purpose and impact. Complete the empty sections: explain what the test dequarantine accomplishes and why it matters, and explicitly state which issues/tasks this resolves (beyond just the Jira ticket reference).
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Stp Link Required ✅ Passed PASS: The custom check requires STP links in NEW test files. This PR modifies an existing test file (removing quarantine markers), not creating a new test file. Check not applicable.
Title check ✅ Passed The title clearly describes the main change: removing the xfail marker and QUARANTINED import from test_invalid_url, making it an active test rather than a quarantined one.
✨ 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.

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

/wip

@ema-aka-young ema-aka-young changed the title De-quarantine HTTP import test_invalid_url [storage] De-quarantine HTTP import test_invalid_url May 14, 2026
@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:

  • jpeimer

Reviewers:

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

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

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

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

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

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

/verified
openshift-virtualization-tests-runner/5229
tests/storage/cdi_import/test_import_http.py::test_invalid_url --count=25

@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"

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the diff for the PR to find the first changed line
git diff origin/main...HEAD -- tests/storage/cdi_import/test_import_http.py | head -60

# Check for smoke markers in the file
echo "--- Smoke markers in test_import_http.py ---"
rg "@pytest.mark.smoke" tests/storage/cdi_import/test_import_http.py -n || echo "None found"

# Check if any smoke tests import from this file or depend on it
echo "--- Any smoke tests depending on test_import_http ---"
rg "test_import_http" --type py -n || echo "None found"

# Check for smoke-marked tests in CDI import area
echo "--- Smoke tests in CDI import area ---"
rg "@pytest.mark.smoke" tests/storage/cdi_import/ -n || echo "None found"

Repository: RedHatQE/openshift-virtualization-tests
Length of output: 213


🏁 Script executed:

#!/bin/bash
# Get the changed line numbers in the file
git log --oneline -5
git diff HEAD~1 HEAD -- tests/storage/cdi_import/test_import_http.py | head -80

Repository: RedHatQE/openshift-virtualization-tests
Length of output: 81


🏁 Script executed:

#!/bin/bash
# Get the PR diff via GitHub API
gh pr diff 4862 --repo RedHatQE/openshift-virtualization-tests 2>/dev/null | head -80

Length of output: 0


🏁 Script executed:

#!/bin/bash
# Get PR files via GitHub REST API
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/4862/files | jq '.[].patch' | head -50

Length of output: 76


🏁 Script executed:

#!/bin/bash
# Read the test file with line numbers to find test_invalid_url
cat -n tests/storage/cdi_import/test_import_http.py | head -60

Repository: RedHatQE/openshift-virtualization-tests
Length of output: 1843


Test Execution Plan

  • Run smoke tests: False — No smoke-marked tests exist in tests/storage/cdi_import/, and no smoke tests import from or depend on test_import_http.py.
  • tests/storage/cdi_import/test_import_http.py::test_invalid_url — This is the only test directly affected: the xfail marker was removed (de-quarantine), so it must now pass cleanly.

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

/build-and-push-container --build-arg OPENSHIFT_PYTHON_WRAPPER_COMMIT=3da59552a05b110337efab323505e07429ddbfcb

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants