Skip to content

fix: use architecture-aware RHEL preference in snapshot fixtures#4866

Open
carterpewpew wants to merge 1 commit into
RedHatQE:mainfrom
carterpewpew:fix/use-arch-aware-rhel-preference-for-snapshot-fixtures
Open

fix: use architecture-aware RHEL preference in snapshot fixtures#4866
carterpewpew wants to merge 1 commit into
RedHatQE:mainfrom
carterpewpew:fix/use-arch-aware-rhel-preference-for-snapshot-fixtures

Conversation

@carterpewpew
Copy link
Copy Markdown
Contributor

@carterpewpew carterpewpew commented May 14, 2026

Short description: Use architecture-aware RHEL preference in snapshot and vmexport fixtures

More details:
The rhel_vm_for_snapshot and rhel_vm_for_snapshot_with_content fixtures hardcode RHEL10_PREFERENCE, which enables SecureBoot. On s390x, SecureBoot is unsupported (no EFI OVMF ROMs), causing VM boot failures. The codebase already handles this via per-architecture global configs -- these fixtures were bypassing that.

What this PR does / why we need it:

  • Replaces hardcoded RHEL10 preference and data source in both fixtures with dynamic lookup via py_config["latest_instance_type_rhel_os_dict"]
  • Adds a latest_rhel_data_source_scope_session fixture to tests/conftest.py alongside the existing rhel9/rhel10 data source fixtures
  • Resolves to RHEL9 on s390x (no SecureBoot) and RHEL10 on amd64/arm64

Which issue(s) this PR fixes:

Special notes for reviewer:

jira-ticket: NONE

Summary by CodeRabbit

  • Tests
    • Added a session-scoped fixture to provide the latest RHEL data source for the current architecture.
    • Updated snapshot and export test fixtures to use the latest RHEL flow and derive instance-type preferences from test configuration instead of hardcoded values.
    • Removed a duplicate module-scoped fixture to consolidate how the latest RHEL data source is provided.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

Warning

Review limit reached

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

More reviews will be available in 59 minutes and 59 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: cdd8f0af-b7f3-4a22-9be7-e494d00f1a2f

📥 Commits

Reviewing files that changed from the base of the PR and between 452d3c4 and d14c225.

📒 Files selected for processing (4)
  • tests/conftest.py
  • tests/infrastructure/conftest.py
  • tests/storage/conftest.py
  • tests/storage/vm_export/conftest.py
📝 Walkthrough

Walkthrough

Add a session-scoped latest_rhel_data_source fixture in tests/conftest.py; switch storage and vm_export fixtures to consume it and derive VM preferences from py_config["latest_instance_type_rhel_os_dict"]; remove the duplicate fixture and unused imports from tests/infrastructure/conftest.py.

Changes

Latest RHEL Fixture Configuration

Layer / File(s) Summary
New latest RHEL data source fixture
tests/conftest.py
Adds DATA_SOURCE_NAME import and a session-scoped latest_rhel_data_source fixture that returns a DataSource named from py_config["latest_instance_type_rhel_os_dict"][DATA_SOURCE_NAME], scoped to golden_images_namespace with ensure_exists=True.
Storage snapshot VM fixture update
tests/storage/conftest.py
Replace RHEL10_PREFERENCE import with PREFERENCE_STR, update rhel_vm_for_snapshot to accept latest_rhel_data_source, derive vm_preference from py_config["latest_instance_type_rhel_os_dict"][PREFERENCE_STR], and use latest_rhel_data_source for the data_volume_template.
VM export snapshot fixture update
tests/storage/vm_export/conftest.py
Add py_config import, update rhel_vm_for_snapshot_with_content to accept latest_rhel_data_source, compute vm_preference from py_config["latest_instance_type_rhel_os_dict"][PREFERENCE_STR], and switch the data_volume_template data source to latest_rhel_data_source.
Infrastructure conftest cleanup
tests/infrastructure/conftest.py
Remove the module-scoped latest_rhel_data_source fixture and delete now-unused imports; consolidate remaining import lines.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • RedHatQE/openshift-virtualization-tests#4788: Updates RHEL fixtures to read “latest” RHEL DataSource/vm_preference from py_config["latest_instance_type_rhel_os_dict"], which is related to multiarch preference/name generation changes.

Suggested labels

new-tests

Suggested reviewers

  • vsibirsk
  • dshchedr
  • rnetser
  • RoniKishner
✨ 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-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
  • 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.

@carterpewpew
Copy link
Copy Markdown
Contributor Author

cc @alexandermamaniy

coderabbitai[bot]
coderabbitai Bot previously approved these changes May 14, 2026
@jpeimer
Copy link
Copy Markdown
Contributor

jpeimer commented May 14, 2026

/lgtm

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

Clean rebase detected — no code changes compared to previous head (5137940).
The following labels were preserved: lgtm-jpeimer, lgtm-coderabbitai[bot].

@carterpewpew carterpewpew force-pushed the fix/use-arch-aware-rhel-preference-for-snapshot-fixtures branch from a4978d3 to 92746ba Compare May 18, 2026 10:56
@openshift-virtualization-qe-bot-4
Copy link
Copy Markdown

Clean rebase detected — no code changes compared to previous head (a4978d3).

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

Clean rebase detected — no code changes compared to previous head (92746ba).
The following labels were preserved: commented-carterpewpew.

@carterpewpew carterpewpew force-pushed the fix/use-arch-aware-rhel-preference-for-snapshot-fixtures branch from 3b7e4a8 to 7e532ce Compare May 19, 2026 05:37
@openshift-virtualization-qe-bot-2
Copy link
Copy Markdown
Contributor

Clean rebase detected — no code changes compared to previous head (3b7e4a8).
The following labels were preserved: commented-carterpewpew.

Copy link
Copy Markdown
Collaborator

@rnetser rnetser left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

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

Clean rebase detected — no code changes compared to previous head (7e532ce).
The following labels were preserved: lgtm-dshchedr, lgtm-rnetser, approved-rnetser, lgtm-coderabbitai[bot], commented-carterpewpew.

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

/retest all

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

Overlapping files

tests/conftest.py

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

/retest all

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

Overlapping files

tests/conftest.py

@jpeimer
Copy link
Copy Markdown
Contributor

jpeimer commented May 25, 2026

/approve
/lgtm

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

/retest all

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

Overlapping files

tests/conftest.py

The rhel_vm_for_snapshot and rhel_vm_for_snapshot_with_content fixtures
hardcode RHEL10_PREFERENCE which enables SecureBoot. On s390x, SecureBoot
is unsupported (no EFI OVMF ROMs), causing VM boot failures.

Replace hardcoded RHEL10 preference and data source with dynamic lookup
via py_config["latest_instance_type_rhel_os_dict"], which resolves to
RHEL9 on s390x (no SecureBoot) and RHEL10 on amd64/arm64.

Add latest_rhel_data_source_scope_session fixture to tests/conftest.py
that dynamically selects the data source based on architecture.

Signed-off-by: Jathavedhan M <jathavedhan.m@ibm.com>
Co-authored-by: Alexander Mamani Yucra <alexander.mamani@ibm.com>
@jpeimer
Copy link
Copy Markdown
Contributor

jpeimer commented Jun 2, 2026

/approve
/lgtm

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

/retest all

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

Overlapping files

tests/conftest.py
tests/storage/conftest.py

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

/retest all

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

Overlapping files

tests/storage/conftest.py

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.

10 participants