Skip to content

fix: improve smoke test conftest-hierarchy tracing in CodeRabbit instructions#5096

Merged
rnetser merged 2 commits into
RedHatQE:mainfrom
rnetser:fix/coderabbit-smoke-conftest-tracing
Jun 2, 2026
Merged

fix: improve smoke test conftest-hierarchy tracing in CodeRabbit instructions#5096
rnetser merged 2 commits into
RedHatQE:mainfrom
rnetser:fix/coderabbit-smoke-conftest-tracing

Conversation

@rnetser

@rnetser rnetser commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator
What this PR does / why we need it:

Addresses the gap discovered in #4954 where smoke-marked tests were incorrectly concluded as unaffected by utility changes.

Root cause

Step 7 of the test execution plan instructions only checked whether a smoke-marked test file directly imported a modified symbol. It did not scan the conftest.py hierarchy of each smoke test for transitive imports or autouse fixtures — which is the actual dependency path in this repo.

Changes

Three additions to step 7:

  1. VERIFY guard — require the rg command to return actual file paths before concluding False
  2. conftest hierarchy check — for each smoke-marked file, scan parent conftest.py files up to the repo root for imports of modified utilities/libs symbols
  3. autouse fixture check — if a conftest.py defines an autouse fixture that imports/calls a modified function, ALL tests in that directory and below are affected

Example dependency path this fix catches

tests/storage/cdi_clone/test_clone.py  (smoke-marked)
  → tests/storage/conftest.py          (conftest in hierarchy)
    → from utilities.hco import wait_for_hco_conditions   ← modified in PR #4954
Which issue(s) this PR fixes:

Reported in: #4954 (CodeRabbit review comment)

Special notes for reviewer:

Only changes a YAML workflow instruction text — no code changes.

jira-ticket:

Assisted-by: Claude noreply@anthropic.com

Summary by CodeRabbit

  • Chores
    • Improved internal testing workflow verification procedures for development processes.

…ructions

Add two safeguards to step 7 of the smoke/gating analysis:
1. VERIFY guard: require rg to return actual file paths before
   concluding 'Run smoke tests: False'.
2. conftest hierarchy check: for each smoke-marked file, scan
   parent conftest.py files up to the repo root for imports of
   modified utilities/libs symbols, since a smoke test can be
   transitively affected via conftest even when the test file
   itself has no direct import.

Fixes a gap discovered in PR RedHatQE#4954 where smoke tests were
incorrectly marked as unaffected.

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: rnetser <rnetser@redhat.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@rnetser, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 41 minutes and 21 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6b4c9ef5-6e38-4beb-baab-2dcd00b444e2

📥 Commits

Reviewing files that changed from the base of the PR and between fcd20b7 and ea003f6.

📒 Files selected for processing (1)
  • .github/workflows/request-coderabbit-test-instructions.yml
📝 Walkthrough

Walkthrough

The GitHub Actions workflow template for CodeRabbit test instructions is updated with more explicit smoke test decision verification. Lines 82–92 add instructions requiring validation that the smoke marker search command returns actual file paths before concluding False, and expand impact assessment to check conftest.py hierarchies for transitive utility imports and autouse fixtures depending on modified code.

Changes

Workflow Smoke Test Decision Enhancement

Layer / File(s) Summary
Smoke Test Decision Verification Instructions
.github/workflows/request-coderabbit-test-instructions.yml
Inserted explicit verification steps requiring confirmation that rg -l '@pytest.mark.smoke' tests/ returns file paths before concluding no smoke tests are affected, and expanded impact detection to scan conftest.py hierarchies (including parent directories up to repo root) for imports of transitive modified utility/lib symbols and autouse fixtures that depend on those symbols.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • RedHatQE/openshift-virtualization-tests#5018: Updates the same workflow file with expanded verification rules and dependency-tracing guidance for smoke vs gating test decisions, directly aligning with this PR's enhanced instruction logic.

Suggested reviewers

  • dshchedr
  • vsibirsk
  • RoniKishner
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the specific change: improving smoke test conftest-hierarchy tracing in CodeRabbit instructions, directly matching the workflow file modification.
Description check ✅ Passed The description fully addresses all required template sections with detailed explanations of root cause, changes, examples, and issue references.
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 PR modifies only a YAML workflow file (.github/workflows/request-coderabbit-test-instructions.yml), not test_*.py files or test functions. Check applies only to new test files/functions.

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

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

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-virtualization-qe-bot-5

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
  • 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.

@rnetser

rnetser commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai

review and take #4954 (comment) conversation into consideration. does it answer what is needed?

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 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 @.github/workflows/request-coderabbit-test-instructions.yml:
- Around line 83-89: The current rule narrows "Run smoke tests: True" to only
smoke-marked files found in the affected set from steps 6b-6e, but also
describes a separate hierarchical path where a conftest.py (and autouse
fixtures) can make a smoke test affected; fix by merging these paths into a
single consistent rule: treat a smoke test as affected if either (A) the test
file itself is in the affected set from 6b-6e OR (B) any conftest.py in its
parent-directory hierarchy imports or uses a transitively modified symbol
(including autouse fixtures); update the wording to explicitly state the union
(OR) logic and include the terms "Run smoke tests: True", "conftest.py", and
"autouse" so consumers apply both checks when determining affected smoke tests.
🪄 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: 37e66575-9d5b-415e-b641-316dcf433065

📥 Commits

Reviewing files that changed from the base of the PR and between 72dee56 and fcd20b7.

📒 Files selected for processing (1)
  • .github/workflows/request-coderabbit-test-instructions.yml
📜 Review details
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-05-19T10:17:37.060Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4833
File: tests/network/localnet/migration_stuntime/libstuntime.py:13-13
Timestamp: 2026-05-19T10:17:37.060Z
Learning: In RedHatQE/openshift-virtualization-tests, when the PR template validation rule is triggered, avoid posting the PR template violation comment if the PR description already contains the required sections with meaningful content:
- `##### What this PR does / why we need it:`
- `##### Which issue(s) this PR fixes:`
- `##### Special notes for reviewer:`
- `##### jira-ticket:`
Because the current implementation can use a broad `**` path glob and re-run the check per diff context/file, reviewers/automation should verify the actual PR description content before flagging it as a violation or duplicating the comment.

Applied to files:

  • .github/workflows/request-coderabbit-test-instructions.yml
📚 Learning: 2026-05-20T11:18:31.677Z
Learnt from: Anatw
Repo: RedHatQE/openshift-virtualization-tests PR: 4867
File: tests/network/libs/stuntime.py:1-1
Timestamp: 2026-05-20T11:18:31.677Z
Learning: In RedHatQE/openshift-virtualization-tests, make the PR template validation (HIGH-severity) heuristic more conservative: if the author explicitly rebuts the “missing template section” finding and confirms the required sections are present with meaningful content, treat the original finding as a false positive and do not re-raise it. Only raise the HIGH-severity flag when a required PR section header (e.g., "##### What this PR does / why we need it:") is clearly absent or its content can be verified as empty/placeholder-only.

Applied to files:

  • .github/workflows/request-coderabbit-test-instructions.yml

Comment thread .github/workflows/request-coderabbit-test-instructions.yml Outdated
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Fetch PR `#5096` details and diff
gh pr view 5096 --repo RedHatQE/openshift-virtualization-tests --json title,body,files,additions,deletions

# Also fetch the PR `#4954` discussion comment
gh api repos/RedHatQE/openshift-virtualization-tests/pulls/comments/3334667036 2>/dev/null || \
gh api repos/RedHatQE/openshift-virtualization-tests/issues/comments/3334667036 2>/dev/null || \
echo "Trying review comment API..."
gh api "repos/RedHatQE/openshift-virtualization-tests/pulls/4954/comments" --jq '.[] | select(.id == 3334667036) | {id, body, path, line, diff_hunk}' 2>/dev/null || true

Length of output: 11140


🏁 Script executed:

#!/bin/bash
# Find the YAML file modified in the PR
fd -e yml -e yaml . .github/ | head -20
git log --oneline -5
git diff HEAD~1 HEAD -- '*.yml' '*.yaml' 2>/dev/null | head -300

Length of output: 887


🏁 Script executed:

#!/bin/bash
# Get the full content of the modified file
cat .github/workflows/request-coderabbit-test-instructions.yml

Length of output: 10392



@rnetser Yes — this PR directly addresses the gap revealed in that discussion.

What went wrong in PR #4954

In comment r3334667036, I concluded Run smoke tests: False because none of the six smoke-marked test files directly imported wait_for_hco_conditions. The actual dependency path was transitive through conftest.py:

tests/storage/cdi_clone/test_clone.py  (smoke-marked)
  → tests/storage/conftest.py
    → from utilities.hco import wait_for_hco_conditions  ← modified

Step 7 of the old instructions had no instruction to walk this hierarchy.

Does this PR fix it?

Yes. The three additions to Step 7 close the gap precisely:

Addition Severity Why it helps
VERIFY guard — require rg to return actual paths before concluding False HIGH Prevents short-circuiting on empty output
conftest hierarchy check — scan dirname(smoke_file)/conftest.py up to root for modified symbol imports CRITICAL This is exactly the path that was missed in #4954
autouse fixture check — if an autouse fixture in any conftest calls a modified function, all tests below are affected HIGH Covers the implicit autouse dependency pattern common in this repo

One minor observation

Step 7's conftest check currently says "imports of modified utilities/libs symbols." This is slightly narrower than fully transitive (a conftest importing a wrapper that calls the modified symbol). However, since Steps 6d–6e already expand the modified symbol set transitively before Step 7 runs, the conftest check will correctly operate on the already-expanded set. The logic chain holds.

Bottom line

The instructions in this PR would have caught the tests/storage/conftest.py → wait_for_hco_conditions path and flipped the smoke decision to True. The fix is well-targeted and sufficient for the reported case.

[approve]

Use OR logic: smoke test is affected if (A) file is in affected
set from 6b-6e OR (B) conftest.py hierarchy imports modified
symbols (including autouse fixtures).

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: rnetser <rnetser@redhat.com>
@rnetser

rnetser commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rnetser

rnetser commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

/verified

(nothing to verify in this PR; approved by cr)

@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/
    Set True ONLY if a smoke-marked file also appears in the affected set from 6b-6e.

  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"

Comment thread .github/workflows/request-coderabbit-test-instructions.yml
@coderabbitai

coderabbitai Bot commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Tip

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Get the diff of the PR to find the first changed line
gh pr diff 5096 --repo RedHatQE/openshift-virtualization-tests | head -60

Length of output: 1971


🏁 Script executed:

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

Length of output: 280


🏁 Script executed:

#!/bin/bash
# Post inline review comment on first changed line of the PR
COMMENT_BODY="**Test Execution Plan**

**Run smoke tests: False** — This PR modifies only \`.github/workflows/request-coderabbit-test-instructions.yml\` (YAML workflow instruction text, +10/-0). No \`utilities/\`, \`libs/\`, test files, or conftest files were changed. No dependency path from any smoke-marked test to a modified symbol exists.

**Run gating tests: False** — Same reasoning; no test code, fixtures, or shared utilities modified.

**Affected tests to run:** None."

gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  repos/RedHatQE/openshift-virtualization-tests/pulls/5096/comments \
  -f body="$COMMENT_BODY" \
  -f commit_id="ea003f6d076a6c3e71f38b056fa24535292a1a19" \
  -f path=".github/workflows/request-coderabbit-test-instructions.yml" \
  -f side="RIGHT" \
  -F line=82

Length of output: 4393



@rnetser

rnetser commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

/approve

@rnetser rnetser merged commit 94a250e into RedHatQE:main Jun 2, 2026
17 of 18 checks passed
@openshift-virtualization-qe-bot-3

Copy link
Copy Markdown
Contributor

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

OhadRevah pushed a commit to OhadRevah/openshift-virtualization-tests that referenced this pull request Jun 10, 2026
…ructions (RedHatQE#5096)

##### What this PR does / why we need it:
Addresses the gap discovered in RedHatQE#4954 where smoke-marked tests were
incorrectly concluded as unaffected by utility changes.

### Root cause
Step 7 of the test execution plan instructions only checked whether a
smoke-marked **test file** directly imported a modified symbol. It did
not scan the `conftest.py` hierarchy of each smoke test for transitive
imports or autouse fixtures — which is the actual dependency path in
this repo.

### Changes
Three additions to step 7:
1. **VERIFY guard** — require the `rg` command to return actual file
paths before concluding `False`
2. **conftest hierarchy check** — for each smoke-marked file, scan
parent conftest.py files up to the repo root for imports of modified
utilities/libs symbols
3. **autouse fixture check** — if a conftest.py defines an autouse
fixture that imports/calls a modified function, ALL tests in that
directory and below are affected

### Example dependency path this fix catches
```
tests/storage/cdi_clone/test_clone.py  (smoke-marked)
  → tests/storage/conftest.py          (conftest in hierarchy)
    → from utilities.hco import wait_for_hco_conditions   ← modified in PR RedHatQE#4954
```

##### Which issue(s) this PR fixes:
Reported in: RedHatQE#4954 (CodeRabbit review comment)

##### Special notes for reviewer:
Only changes a YAML workflow instruction text — no code changes.

##### jira-ticket:

Assisted-by: Claude <noreply@anthropic.com>

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Improved internal testing workflow verification procedures for
development processes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: rnetser <rnetser@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.

6 participants