Skip to content

USHIFT-7412: Add RPM presubmit scenarios - #7175

Open
agullon wants to merge 2 commits into
openshift:mainfrom
agullon:USHIFT-7412
Open

USHIFT-7412: Add RPM presubmit scenarios#7175
agullon wants to merge 2 commits into
openshift:mainfrom
agullon:USHIFT-7412

Conversation

@agullon

@agullon agullon commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Replace bootc and ostree standard-suite presubmit scenarios with RPM-based equivalents that install MicroShift via dnf install on bare RHEL VMs.

This is the first PR in a series to migrate all presubmit scenarios from scenarios-bootc/ and scenarios/ to scenarios-rpm/. Once all scenarios are migrated (symlinked to scenarios-rpm/), the current 6 presubmit CI lines (2 ostree + 4 bootc) can be consolidated into fewer RPM-only jobs that skip the image build phase entirely — eliminating ~30-40 minutes of ostree/bootc image builds per job.

Changes

test/bin/scenario.sh — Add configure_rpm_scenario() function that:

  • Configures firewall and registers with RHSM
  • Sets up rhocp, fast-datapath, and local source RPM repos
  • Installs MicroShift and third-party dependencies via dnf
  • Verifies NetworkManager connectivity after RPM %post restart
  • Starts MicroShift and waits for healthcheck (all core workloads ready)

test/scenarios-rpm/ — Add 4 new RPM scenarios:

  • el9/presubmits/el98-src@standard1.sh
  • el9/presubmits/el98-src@standard2.sh
  • el10/presubmits/el102-src@standard1.sh
  • el10/presubmits/el102-src@standard2.sh

Symlinks — Link RPM scenarios into existing CI directories so they
run in current bootc and ostree presubmit jobs without release repo changes.

Deletions — Remove the bootc and ostree originals these replace:

  • scenarios-bootc/el9/presubmits/el98-src@standard-suite{1,2}.sh
  • scenarios/presubmits/el98-src@standard-suite{1,2}.sh

How it works

Each RPM scenario boots a bare RHEL VM from a cached installer ISO (rhel98-installer / rhel102-installer), calls configure_rpm_scenario() to install MicroShift from source-built RPMs, then runs the standard test suite directly. No ostree commits or bootc images are consumed.

Symlinks in scenarios-bootc/ and scenarios/ point to the canonical scripts in scenarios-rpm/, so existing CI jobs pick them up automatically.

Test plan

  • e2e-aws-tests-bootc-el9 passes with the el9 RPM scenarios
  • e2e-aws-tests-bootc-el10 passes with the el10 RPM scenarios
  • e2e-aws-tests passes with the ostree RPM scenarios
  • Standard test suites pass identically to the replaced bootc/ostree versions

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 11, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 11, 2026

Copy link
Copy Markdown

@agullon: This pull request references USHIFT-7412 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 epic to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add scenarios-rpm type to the CI framework (common.sh)
  • Add RPM build path to ci_phase_iso_build.sh — downloads installer ISOs from S3 build cache and builds RPMs from source, skipping composer and image builds entirely
  • Skip composer cleanup and mirror registry for RPM scenarios in ci_phase_boot_and_test.sh
  • Add 4 presubmit scenarios in test/scenarios-rpm/presubmits/:
  • el98-src@standard1.sh, el98-src@standard2.sh
  • el102-src@standard1.sh, el102-src@standard2.sh

Each scenario boots a bare RHEL VM from a cached installer ISO, installs MicroShift via dnf install from source-built RPMs, runs a standard test suite, and removes MicroShift.

Companion PR

  • openshift/release: TBD (adds e2e-aws-tests-rpm Prow job)

Test plan

  • /test e2e-aws-tests-rpm on this PR (after release PR merges)
  • Verify RPM build path downloads ISOs from S3 cache
  • Verify scenarios boot VMs and run standard tests successfully

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

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

RPM scenarios are detected by path and routed through dedicated CI build logic. RPM jobs download RHEL 9.8 and 10.2 installer ISOs, build packages, and run four new presubmit scenarios.

Changes

RPM CI workflow

Layer / File(s) Summary
Scenario detection and boot-test routing
test/bin/common.sh, test/bin/ci_phase_boot_and_test.sh
RPM paths set SCENARIO_TYPE=rpm. RPM jobs skip Composer cache cleanup and mirror registry setup.
RPM ISO and package build flow
test/bin/ci_phase_iso_build.sh
RPM jobs start nginx, download RHEL 9.8 and 10.2 installer ISOs from S3, and run build_rpms.sh. Non-RPM jobs retain cache and image-build processing.
RHEL RPM presubmit scenarios
test/scenarios-rpm/presubmits/*
Four scenarios add VM lifecycle management, repository and release configuration, and ordered RPM test execution for RHEL 9.8 and 10.2.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Scenario
  participant CI
  participant S3
  participant RPMBuilder
  participant InstallerVM
  Scenario->>CI: select RPM presubmit
  CI->>S3: download RHEL installer ISOs
  CI->>RPMBuilder: build RPMs
  CI->>InstallerVM: create and configure VM
  InstallerVM->>InstallerVM: run ordered RPM tests
  CI->>InstallerVM: remove VM
Loading

Suggested reviewers: eslutsky, pacevedom


Caution

Pre-merge checks failed

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

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error The new RPM path runs manage_webserver.sh with bash -x; its auth_pass and base64 auth_cred assignments are then written to CI logs by xtrace. Run manage_webserver.sh without xtrace, or disable xtrace around setup_ocp_mirror_proxy and redact credential-bearing assignments.
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 (13 passed)
Check name Status Explanation
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 The cumulative PR diff adds shell orchestration and Robot suite paths only; it adds no Ginkgo APIs or test titles, dynamic or otherwise.
Test Structure And Quality ✅ Passed Not applicable: all PR-listed test changes are Bash orchestration scripts that delegate to Robot Framework .robot suites; no Ginkgo It/BeforeEach/AfterEach/Eventually code is present.
Microshift Test Compatibility ✅ Passed The PR adds only shell CI/scenario scripts and invokes existing Robot suites; it adds no Ginkgo e2e tests, so MicroShift API compatibility checks are not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The PR adds Bash CI/scenario files that invoke Robot Framework suites (suites/*.robot); no new Ginkgo constructs (It, Describe, Context, or When) are present, so this check is not applica...
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only shell-based CI scripts and RPM test scenarios; no deployment manifests, operator code, controllers, or topology-dependent scheduling constraints were added or modified.
Ote Binary Stdout Contract ✅ Passed The PR changes only shell scripts; RPM scenarios call Robot run_tests, and no changed Go code contains main/TestMain/RunSpecs or process-level stdout logging.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The feature diff adds only .sh CI/scenario files; the four new scenarios invoke Robot suites and contain no Ginkgo It/Describe/Context/When tests, so this check is not applicable.
No-Weak-Crypto ✅ Passed The seven changed shell files add no MD5, SHA1, DES, RC4, Blowfish, ECB, custom crypto, or secret/token comparisons.
Container-Privileges ✅ Passed The PR adds no privileged container or Kubernetes settings; changed lines contain no privileged, hostPID/Network/IPC, SYS_ADMIN, or allowPrivilegeEscalation controls.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: adding RPM presubmit scenarios and related CI support.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci
openshift-ci Bot requested review from eslutsky and pacevedom August 11, 2026 09:00
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon

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 Aug 11, 2026
@agullon
agullon marked this pull request as draft August 11, 2026 09:17
@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 Aug 11, 2026
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 11, 2026

@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: 3

🤖 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 `@test/scenarios-rpm/presubmits/el102-src`@standard1.sh:
- Line 32: Update configure_fast_datapath_repo usage in
test/scenarios-rpm/presubmits/el102-src@standard1.sh lines 32-32 and
test/scenarios-rpm/presubmits/el102-src@standard2.sh lines 32-32 to use a RHEL
10-compatible Fast Datapath configuration, or skip the repository when
unsupported; do not allow the helper’s non-9 branch to configure the RHEL 9 CDN
path.
- Around line 1-3: Update the shell initialization in
test/scenarios-rpm/presubmits/el102-src@standard1.sh lines 1-3,
test/scenarios-rpm/presubmits/el102-src@standard2.sh lines 1-3,
test/scenarios-rpm/presubmits/el98-src@standard1.sh lines 1-3, and
test/scenarios-rpm/presubmits/el98-src@standard2.sh lines 1-3: use the
/usr/bin/bash shebang and add set -euo pipefail immediately afterward in each
scenario script.
- Around line 23-25: In test/scenarios-rpm/presubmits/el102-src@standard1.sh
lines 23-25, declare source_reponame and target_version separately from their
command substitutions so failures from basename and local_rpm_version propagate;
preserve source_repo_url and existing readonly behavior. Apply the same change
to test/scenarios-rpm/presubmits/el102-src@standard2.sh lines 23-25,
test/scenarios-rpm/presubmits/el98-src@standard1.sh lines 23-25, and
test/scenarios-rpm/presubmits/el98-src@standard2.sh lines 23-25, ensuring all
scripts pass shellcheck.
🪄 Autofix

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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: a2ccf907-00bf-4b73-acb9-ab429a4b1295

📥 Commits

Reviewing files that changed from the base of the PR and between 18568ca and 323860f.

📒 Files selected for processing (7)
  • test/bin/ci_phase_boot_and_test.sh
  • test/bin/ci_phase_iso_build.sh
  • test/bin/common.sh
  • test/scenarios-rpm/presubmits/el102-src@standard1.sh
  • test/scenarios-rpm/presubmits/el102-src@standard2.sh
  • test/scenarios-rpm/presubmits/el98-src@standard1.sh
  • test/scenarios-rpm/presubmits/el98-src@standard2.sh

Comment thread test/scenarios-rpm/el10/presubmits/el102-src@standard1.sh
Comment thread test/scenarios-rpm/el10/presubmits/el102-src@standard1.sh Outdated
Comment thread test/scenarios-rpm/el10/presubmits/el102-src@standard1.sh Outdated

@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: 2

🤖 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 `@test/bin/ci_phase_iso_build.sh`:
- Line 215: Remove the unconditional “|| true” from the EPEL installation
command in the CI setup flow so failures stop the build. If idempotency is
required, explicitly handle only the already-installed case while propagating
all other installation errors before the subsequent parallel dependency setup.
- Line 215: Update test/bin/ci_phase_iso_build.sh to use the required
#!/usr/bin/bash shebang and quote the %{rhel} RPM macro in the dnf installation
command as rpm -E '%{rhel}'. Validate the script with shellcheck
--external-sources.
🪄 Autofix

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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 553ec018-f114-4a11-8ca2-8fdf9b92deb7

📥 Commits

Reviewing files that changed from the base of the PR and between fb45a24 and 190d711.

📒 Files selected for processing (1)
  • test/bin/ci_phase_iso_build.sh

Comment thread test/bin/ci_phase_iso_build.sh Outdated
@agullon
agullon force-pushed the USHIFT-7412 branch 2 times, most recently from 927a193 to f6eabc0 Compare August 12, 2026 10:32
@agullon
agullon marked this pull request as ready for review August 12, 2026 10:40
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 12, 2026
@openshift-ci
openshift-ci Bot requested a review from jerpeter1 August 12, 2026 10:41
@agullon
agullon marked this pull request as draft August 12, 2026 15: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 Aug 12, 2026
@agullon
agullon force-pushed the USHIFT-7412 branch 3 times, most recently from cdd1299 to 0c56fff Compare August 13, 2026 08:47
Add a function that configures a bare RHEL VM for RPM-based MicroShift
testing. It handles firewall, RHSM registration, RPM repo setup,
MicroShift installation from source-built RPMs, NetworkManager
connectivity verification, and healthcheck wait.

This enables scenario scripts to install and test MicroShift via dnf
on plain RHEL installer ISOs, without ostree or bootc images.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@agullon
agullon marked this pull request as ready for review August 13, 2026 10:14
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 13, 2026
@openshift-ci
openshift-ci Bot requested a review from copejon August 13, 2026 10:14
@openshift-ci
openshift-ci Bot requested a review from ggiguash August 13, 2026 10:14
@agullon
agullon marked this pull request as draft August 13, 2026 12:23
@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 Aug 13, 2026
@agullon

agullon commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-release

4 similar comments
@agullon

agullon commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-release

@agullon

agullon commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-release

@agullon

agullon commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-release

@agullon

agullon commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests-release

@agullon

agullon commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

/test e2e-aws-tests

@agullon
agullon force-pushed the USHIFT-7412 branch 8 times, most recently from 7862782 to 3741f90 Compare August 14, 2026 09:40
…riginals

Add 4 RPM scenarios in test/scenarios-rpm/ that boot bare RHEL VMs
from cached installer ISOs and install MicroShift via dnf:

  el9/presubmits/el98-src@standard1.sh   (RHEL 9.8, standard suite 1)
  el9/presubmits/el98-src@standard2.sh   (RHEL 9.8, standard suite 2)
  el10/presubmits/el102-src@standard1.sh (RHEL 10.2, standard suite 1)
  el10/presubmits/el102-src@standard2.sh (RHEL 10.2, standard suite 2)

Symlink them into scenarios-bootc/ and scenarios/ so existing CI jobs
pick them up. Delete the bootc and ostree originals they replace:

  scenarios-bootc/el9/presubmits/el98-src@standard-suite{1,2}.sh
  scenarios/presubmits/el98-src@standard-suite{1,2}.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

pre-commit.check-secrets: ENABLED
@agullon
agullon marked this pull request as ready for review August 14, 2026 09:45
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 14, 2026
@openshift-ci
openshift-ci Bot requested review from jogeo and pmtk August 14, 2026 09:46
@agullon

agullon commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@agullon

agullon commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@agullon

agullon commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@agullon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-tests-bootc-release-el9 ca06df5 link true /test e2e-aws-tests-bootc-release-el9
ci/prow/test-rebase ca06df5 link false /test test-rebase
ci/prow/ocp-full-conformance-rhel-eus ca06df5 link true /test ocp-full-conformance-rhel-eus
ci/prow/e2e-aws-tests-bootc-release-el10 ca06df5 link true /test e2e-aws-tests-bootc-release-el10
ci/prow/e2e-aws-tests-bootc-release-arm-el9 ca06df5 link true /test e2e-aws-tests-bootc-release-arm-el9
ci/prow/e2e-aws-ai-model-serving ca06df5 link true /test e2e-aws-ai-model-serving
ci/prow/e2e-aws-tests-bootc-upstream ca06df5 link true /test e2e-aws-tests-bootc-upstream
ci/prow/e2e-aws-tests-bootc-upstream-arm ca06df5 link true /test e2e-aws-tests-bootc-upstream-arm
ci/prow/e2e-aws-tests-bootc-release-arm-el10 ca06df5 link true /test e2e-aws-tests-bootc-release-arm-el10
ci/prow/e2e-aws-tests-release-arm ca06df5 link true /test e2e-aws-tests-release-arm
ci/prow/test-rpm ca06df5 link true /test test-rpm
ci/prow/ocp-full-conformance-serial-rhel-eus ca06df5 link true /test ocp-full-conformance-serial-rhel-eus
ci/prow/e2e-aws-tests-bootc-c2cc-arm ca06df5 link true /test e2e-aws-tests-bootc-c2cc-arm
ci/prow/e2e-aws-tests-bootc-c2cc ca06df5 link true /test e2e-aws-tests-bootc-c2cc
ci/prow/e2e-aws-tests-periodic 4dd9386 link true /test e2e-aws-tests-periodic
ci/prow/e2e-aws-tests-bootc-periodic-el9 4dd9386 link true /test e2e-aws-tests-bootc-periodic-el9
ci/prow/e2e-aws-tests-release 175ade6 link true /test e2e-aws-tests-release

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants