Skip to content

IUO: multiarch automation#4988

Open
hmeir wants to merge 4 commits into
RedHatQE:mainfrom
hmeir:iuo-multiarch-automation-v2
Open

IUO: multiarch automation#4988
hmeir wants to merge 4 commits into
RedHatQE:mainfrom
hmeir:iuo-multiarch-automation-v2

Conversation

@hmeir
Copy link
Copy Markdown
Contributor

@hmeir hmeir commented May 25, 2026

What this PR does / why we need it:

Implement multiarch golden images test automation with 8 tests across
3 classes, verifying the enableMultiArchBootImageImport HCO feature
gate behavior:

  • TestDisabledMultiarchGoldenImagesSupport (CNV-15977,15978,15979,15980):
    verifies no arch-specific resources exist and metrics report correctly
    when the feature gate is disabled
  • TestEnabledMultiarchGoldenImagesSupport (CNV-15981,15982,16020):
    verifies arch-specific DataImportCrons/DataSources are created and
    pointer DataSources reference control-plane architecture
  • TestMultiarchGoldenImageAnnotationMetrics (CNV-15983,15984):
    verifies misconfiguration metrics for annotation issues

Key design:

  • default_common_templates_related_resources checks HCO feature gate
    to return arch-specific or base resource names per kind
  • worker_architectures derived from schedulable_nodes
  • _MULTIARCH_MANAGED_CRS = [SSP, KubeVirt, CDI]
  • single_arch_node_placement with workloads-only placement

STP: https://github.com/RedHatQE/openshift-virtualization-tests-design-docs/blob/main/stps/sig-iuo/multiarch_arm_support.md

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

Depends on PR #4972 and PR #4987 — merge those first.
CNV-15977 DataSource subtest quarantined via is_jira_open("CNV-68996").
update_hco_templates_spec fixed to append templates instead of replacing.

jira-ticket:

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Warning

Review limit reached

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

More reviews will be available in 57 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: af8845fd-8645-481c-bff2-2046ce7325b8

📥 Commits

Reviewing files that changed from the base of the PR and between 06b7e39 and b8e59ae.

📒 Files selected for processing (24)
  • conftest.py
  • tests/conftest.py
  • tests/install_upgrade_operators/constants.py
  • tests/install_upgrade_operators/crypto_policy/constants.py
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/conftest.py
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/conftest.py
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/test_multiarch_golden_images_support.py
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/multiarch/utils.py
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/test_custom_golden_images_namespace.py
  • tests/install_upgrade_operators/hco_enablement_golden_image_updates/utils.py
  • tests/observability/metrics/conftest.py
  • tests/observability/metrics/test_aaq_metrics.py
  • tests/observability/metrics/test_general_metrics.py
  • tests/observability/metrics/test_metrics.py
  • tests/observability/metrics/test_migration_metrics.py
  • tests/observability/metrics/test_ssp_metrics.py
  • tests/observability/metrics/test_vms_metrics.py
  • tests/observability/upgrade/test_upgrade_observability.py
  • tests/observability/utils.py
  • utilities/hco.py
  • utilities/monitoring.py
  • utilities/pytest_utils.py
  • utilities/unittests/test_monitoring.py
  • utilities/unittests/test_pytest_utils.py
✨ 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.66%. Comparing base (a2dc143) to head (b8e59ae).
⚠️ Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4988      +/-   ##
==========================================
- Coverage   98.67%   98.66%   -0.02%     
==========================================
  Files          25       25              
  Lines        2487     2465      -22     
==========================================
- Hits         2454     2432      -22     
  Misses         33       33              
Flag Coverage Δ
utilities 98.66% <100.00%> (-0.02%) ⬇️

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.

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

Report bugs in Issues

Welcome! 🎉

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

🔄 Automatic Actions

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

📋 Available Commands

PR Status Management

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

Review & Approval

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

Testing & Validation

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

Container Operations

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

Cherry-pick Operations

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

Label Management

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

✅ Merge Requirements

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

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

📊 Review Process

Approvers and Reviewers

Approvers:

  • dshchedr
  • myakove
  • rnetser
  • vsibirsk

Reviewers:

  • OhadRevah
  • RoniKishner
  • albarker-rh
  • dshchedr
  • geetikakay
  • hmeir
  • rlobillo
  • 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.

Comment on lines +107 to +116
for ds_name in default_common_templates_related_resources[DataSource.kind]:
data_source = DataSource(
name=ds_name,
namespace=golden_images_namespace.name,
client=admin_client,
)
source = data_source.instance.spec.source
assert source.get("pvc") or source.get("snapshot"), (
f"DataSource {ds_name} does not reference a pvc/snapshot source: {source}"
)
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.

Why not using subtests?

Comment on lines +240 to +251
for ds_name in base_ds_names:
data_source = DataSource(
name=ds_name,
namespace=golden_images_namespace.name,
client=admin_client,
)
expected_arch_ds_prefix = f"{ds_name}-{control_plane_architecture}"
assert data_source.source.name.startswith(expected_arch_ds_prefix), (
f"DataSource {ds_name} does not reference a control-plane "
f"architecture-specific DataSource (expected prefix: {expected_arch_ds_prefix}). "
f"Actual source: {data_source.source.name}"
)
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.

Also here, why not using subtests?

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

Clean rebase detected — no code changes compared to previous head (b24996b).
The following labels were preserved: changes-requested-OhadRevah.

Store cpu_arch as list in py_config for multi-arch runs. Fix
schedulable_nodes to normalize cpu_arch to list and use 'in' membership
check. Update cluster info log to handle list cpu_arch display.

Signed-off-by: Harel Meir <hmeir@redhat.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
hmeir and others added 3 commits May 26, 2026 12:12
Move validate_metrics_value from tests/observability/utils.py to
utilities/monitoring.py for cross-directory reuse. Accept str|int
expected_value (int 0 for absent metrics). Add unit tests.
Update all observability callers to import from new location.

Signed-off-by: Harel Meir <hmeir@redhat.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Store cpu_arch as list in py_config for multi-arch runs. Fix
schedulable_nodes to normalize cpu_arch to list and use 'in' membership
check. Update cluster info log to handle list cpu_arch display.

Signed-off-by: Harel Meir <hmeir@redhat.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Harel Meir <hmeir@redhat.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@openshift-virtualization-qe-bot-3
Copy link
Copy Markdown
Contributor

/retest all

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

Overlapping files

tests/observability/metrics/test_general_metrics.py
tests/observability/metrics/test_metrics.py

@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

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

/retest all

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

Overlapping files

conftest.py
tests/observability/metrics/test_vms_metrics.py
utilities/hco.py

@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

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

/retest all

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

Overlapping files

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.

5 participants