Skip to content

USHIFT-6984: Skip RPM scenario tests when no brew RPMs are available#6707

Draft
copejon wants to merge 1 commit into
openshift:mainfrom
copejon:fix-ushift-6984-target-version
Draft

USHIFT-6984: Skip RPM scenario tests when no brew RPMs are available#6707
copejon wants to merge 1 commit into
openshift:mainfrom
copejon:fix-ushift-6984-target-version

Conversation

@copejon
Copy link
Copy Markdown
Contributor

@copejon copejon commented May 20, 2026

Summary

  • Skip RPM-based test scenarios (rpm-standard1, rpm-standard2, rpm-upgrade) gracefully when BREW_LREL_RELEASE_VERSION is empty
  • Fixes 56 test failures on release-5.0 periodic CI jobs (amd64 + arm64) caused by passing empty TARGET_VERSION to Robot Framework

Root Cause

MicroShift 5.0 has no brew RPMs yet. The version resolution chain (build_rpms.shmanage_brew_rpms.shcommon_versions.sh) correctly resolves this to empty — brew RPMs are optional by design (see build_rpms.sh lines 111-113). The scenario scripts were the only link that didn't handle the empty result, blindly passing it to Robot Framework where Should Not Be Empty ${TARGET_VERSION} fails and cascades to all tests.

Changes

Each RPM scenario's scenario_run_tests() now checks BREW_LREL_RELEASE_VERSION at the top and returns 0 with a warning if empty. No other changes needed — the upstream chain already does the authoritative "does this exist" check.

Test plan

  • Verify release-5.0 periodic CI jobs no longer fail on RPM scenarios
  • Verify RPM scenarios still run correctly on releases with brew RPMs available (e.g. 4.22)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • RPM test scenarios now gracefully skip when release version information is unavailable, with informative warnings instead of failing. This prevents false test failures during incomplete configurations.

When no brew RPMs exist for the target version (e.g. 5.0 before first
release), BREW_LREL_RELEASE_VERSION resolves to empty. Rather than
passing that empty value to Robot Framework where it fails all tests,
return early from scenario_run_tests() with a warning.

Co-authored-by: Cursor <cursoragent@cursor.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 20, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 20, 2026

@copejon: This pull request references USHIFT-6984 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Skip RPM-based test scenarios (rpm-standard1, rpm-standard2, rpm-upgrade) gracefully when BREW_LREL_RELEASE_VERSION is empty
  • Fixes 56 test failures on release-5.0 periodic CI jobs (amd64 + arm64) caused by passing empty TARGET_VERSION to Robot Framework

Root Cause

MicroShift 5.0 has no brew RPMs yet. The version resolution chain (build_rpms.shmanage_brew_rpms.shcommon_versions.sh) correctly resolves this to empty — brew RPMs are optional by design (see build_rpms.sh lines 111-113). The scenario scripts were the only link that didn't handle the empty result, blindly passing it to Robot Framework where Should Not Be Empty ${TARGET_VERSION} fails and cascades to all tests.

Changes

Each RPM scenario's scenario_run_tests() now checks BREW_LREL_RELEASE_VERSION at the top and returns 0 with a warning if empty. No other changes needed — the upstream chain already does the authoritative "does this exist" check.

Test plan

  • Verify release-5.0 periodic CI jobs no longer fail on RPM scenarios
  • Verify RPM scenarios still run correctly on releases with brew RPMs available (e.g. 4.22)

🤖 Generated with Claude Code

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 06f71646-5605-42c9-95b2-23ba254ee1d1

📥 Commits

Reviewing files that changed from the base of the PR and between 50d7f93 and 3facdd4.

📒 Files selected for processing (3)
  • test/scenarios/releases/el98@rpm-standard1.sh
  • test/scenarios/releases/el98@rpm-standard2.sh
  • test/scenarios/releases/el98@rpm-upgrade.sh

Walkthrough

Three related RPM test scenario scripts now add early guards in their test execution functions. Each checks whether BREW_LREL_RELEASE_VERSION is set, and if absent, logs a warning and exits cleanly without running RPM tests.

Changes

RPM test version availability checks

Layer / File(s) Summary
Early version check guards for RPM scenarios
test/scenarios/releases/el98@rpm-standard1.sh, test/scenarios/releases/el98@rpm-standard2.sh, test/scenarios/releases/el98@rpm-upgrade.sh
Each RPM test scenario now detects when BREW_LREL_RELEASE_VERSION is missing and skips gracefully by logging a warning and returning success, avoiding test execution when brew RPMs are unavailable.

🎯 1 (Trivial) | ⏱️ ~5 minutes

ready-for-human-review

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (11 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'USHIFT-6984: Skip RPM scenario tests when no brew RPMs are available' directly describes the main change—adding conditional logic to skip RPM test scenarios when BREW_LREL_RELEASE_VERSION is empty, fixing test failures on release-5.0 CI jobs.
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.
Stable And Deterministic Test Names ✅ Passed PR modifies bash shell scripts, not Ginkgo Go tests. The check for stable test names applies only to Ginkgo test titles, which are not present here.
Test Structure And Quality ✅ Passed PR modifies shell scripts, not Ginkgo tests. The custom check is for Ginkgo test quality; no Ginkgo code exists in this PR.
Microshift Test Compatibility ✅ Passed PR modifies only shell script scenario test files (el98@rpm-*.sh), not Ginkgo e2e tests. The custom check applies only to new Ginkgo tests and is not applicable here.
Single Node Openshift (Sno) Test Compatibility ✅ Passed PR modifies shell scripts only; no new Ginkgo e2e tests are added. SNO compatibility check is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed This PR modifies test scenario shell scripts only, not deployment manifests, operator code, or controllers. No scheduling constraints are introduced.
Ote Binary Stdout Contract ✅ Passed PR changes are in Robot Framework shell scripts, not OTE binaries. The check for OTE Binary Stdout Contract does not apply to these helper scripts.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR modifies only shell script test scenarios, not Ginkgo e2e tests. The custom check applies to "new Ginkgo e2e tests (It(), Describe(), Context(), When(), etc.)" and is inapplicable to this PR.

✏️ 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.

@copejon copejon marked this pull request as draft May 20, 2026 21:15
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 20, 2026
@openshift-ci openshift-ci Bot requested review from kasturinarra and pmtk May 20, 2026 21:16
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 20, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: copejon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 20, 2026
@coderabbitai coderabbitai Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label May 20, 2026
Comment on lines +66 to +69
if [[ -z "${BREW_LREL_RELEASE_VERSION}" ]]; then
echo "WARNING: No brew RPMs available for ${MAJOR_VERSION}.${MINOR_VERSION}, skipping RPM tests"
return 0
fi
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.

@copejon I'll extract this a function into scenario.sh script to follow the same approach as: exit_if_image_not_found() and exit_if_commit_not_found().

Also, I'll add this check in the 3 steps on the scenario: create VM, run tests and remove VM.

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants