Skip to content

NO-ISSUE: Refactor RPM repository configuration common functionality#7080

Merged
openshift-merge-bot[bot] merged 3 commits into
openshift:mainfrom
ggiguash:refactor-rpm-repo-config
Jul 21, 2026
Merged

NO-ISSUE: Refactor RPM repository configuration common functionality#7080
openshift-merge-bot[bot] merged 3 commits into
openshift:mainfrom
ggiguash:refactor-rpm-repo-config

Conversation

@ggiguash

@ggiguash ggiguash commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Refactor
    • Consolidated repository setup across RPM installation, upgrade, presubmit, and standard test scenarios into shared helpers.
    • Updated scenarios to use shared Fast Datapath repository configuration instead of per-script inline subscription/cdn setup.
    • Removed duplicated MicroShift, CDN, and RHOCP repo helper implementations from individual scenario scripts.
    • Added shared utilities to create/enable/disable CDN-backed repos and conditionally handle mirror URLs and repo arguments across supported RHEL variants.

@openshift-ci-robot

Copy link
Copy Markdown

@ggiguash: This pull request explicitly references no jira issue.

Details

In response to this:

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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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: 8b2d0d1a-ed27-4a88-b25f-4a450979e0f7

📥 Commits

Reviewing files that changed from the base of the PR and between b88beb7 and e23cb18.

📒 Files selected for processing (1)
  • test/bin/scenario.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/bin/scenario.sh

Walkthrough

Changes

The change centralizes RPM repository configuration in test/bin/scenario.sh. Bootc and release scenario scripts remove duplicated helpers and replace inline Fast Datapath setup with configure_fast_datapath_repo.

RPM repository configuration

Layer / File(s) Summary
Shared repository helpers
test/bin/scenario.sh
Adds helpers for CDN, RHOCP, Fast Datapath, and MicroShift repository configuration with RHEL-version and URL-based handling.
Bootc scenario integration
test/scenarios-bootc/el10/..., test/scenarios-bootc/el9/...
Removes local repository helpers, removes unused architecture variables, and uses the shared Fast Datapath helper.
Release scenario integration
test/scenarios/releases/*
Removes duplicated repository helpers and replaces inline Fast Datapath enablement with the shared helper.

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

Sequence Diagram(s)

sequenceDiagram
  participant scenario_run_tests
  participant configure_fast_datapath_repo
  participant host1
  participant subscription_manager
  scenario_run_tests->>configure_fast_datapath_repo: Configure Fast Datapath
  configure_fast_datapath_repo->>host1: Detect RHEL version
  alt RHEL 9
    configure_fast_datapath_repo->>subscription_manager: Enable fast-datapath
  else Other RHEL version
    configure_fast_datapath_repo->>host1: Write CDN repository file
  end
Loading

Suggested reviewers: kasturinarra, agullon

🚥 Pre-merge checks | ✅ 14 | ❌ 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 (14 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: refactoring shared RPM repository configuration helpers.
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 Only shell quoting changed in test/bin/scenario.sh; no It/Describe/Context/When titles were added or modified.
Test Structure And Quality ✅ Passed Only shell repo-helper code changed; no Ginkgo It/BeforeEach/Eventually tests were touched, so this check is not applicable.
Microshift Test Compatibility ✅ Passed No new Ginkgo tests were added; touched files only refactor shell repo helpers and contain no MicroShift-incompatible APIs.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the PR only refactors shell repo helpers and adds no SNO-sensitive test logic.
Topology-Aware Scheduling Compatibility ✅ Passed Only RPM repo helper shell functions changed; no manifests, controllers, affinity, nodeSelectors, or topology-based replica logic were added.
Ote Binary Stdout Contract ✅ Passed The PR only refactors shell scenario scripts; the new helpers write repo files with tee >/dev/null and add no process-level stdout writes in OTE binaries.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed PR only refactors shell repo helpers and scenario scripts; no new It/Describe/Context/When tests or new IPv4/public-network assumptions were added.
No-Weak-Crypto ✅ Passed No MD5/SHA1/DES/RC4/3DES/Blowfish/ECB, custom crypto, or secret comparisons appear in the changed RPM-repo helper code.
Container-Privileges ✅ Passed Only test/bin/scenario.sh changed; it just tightens repo-copy quoting, with no container/K8s manifests or privilege flags present.
No-Sensitive-Data-In-Logs ✅ Passed New repo helpers write .repo files and invoke repo setup, but add no logging of secrets/PII/hostnames; changed scripts only replace inline repo setup with helper calls.
✨ 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.

@openshift-ci
openshift-ci Bot requested review from agullon and kasturinarra July 21, 2026 05:29
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 21, 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/bin/scenario.sh`:
- Line 1271: The architecture checks at test/bin/scenario.sh lines 1271-1271 and
1304-1304 must query the remote VM rather than the local host. In both
locations, declare arch separately and assign it from run_command_on_vm host1
"uname -m", preserving shellcheck compliance.
- Line 1238: Quote the remote-shell variable expansions in test/bin/scenario.sh
at lines 1238-1238, 1290-1290, and 1344-1344: use single quotes around tmp_file
and repo_id at 1238-1238, tmp_file and ocp_repo_name at 1290-1290, and tmp_file
at 1344-1344.
- Around line 1221-1223: Update test/bin/scenario.sh at lines 1221-1223 to
declare cert, key, and tmp_file separately before assigning command-substitution
results. Apply the same separation to rhel_ver at line 1266, tmp_file at line
1279, rhel_ver at line 1299, and tmp_file at line 1334, preserving each existing
assignment and allowing command exit statuses to propagate.
🪄 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: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: d935bdb1-aeff-49d8-bc4e-fb0c8233d871

📥 Commits

Reviewing files that changed from the base of the PR and between f2f3c5b and b88beb7.

📒 Files selected for processing (7)
  • test/bin/scenario.sh
  • test/scenarios-bootc/el10/presubmits/el102-src@rpm-install.sh
  • test/scenarios-bootc/el10/releases/el102@rpm-standard.sh
  • test/scenarios-bootc/el9/presubmits/el98-src@rpm-install.sh
  • test/scenarios/releases/el98@rpm-standard1.sh
  • test/scenarios/releases/el98@rpm-standard2.sh
  • test/scenarios/releases/el98@rpm-upgrade.sh

Comment thread test/bin/scenario.sh
Comment thread test/bin/scenario.sh Outdated
Comment thread test/bin/scenario.sh
@agullon

agullon commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 21, 2026
@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: agullon, ggiguash

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

@ggiguash

Copy link
Copy Markdown
Contributor Author

Release tests are failing due to other reasons.
/override ci/prow/e2e-aws-tests-bootc-release-arm-el9 ci/prow/e2e-aws-tests-bootc-release-arm-el9 ci/prow/e2e-aws-tests-bootc-release-arm-el10 ci/prow/e2e-aws-tests-bootc-release-el9 ci/prow/e2e-aws-tests-bootc-release-el10 ci/prow/e2e-aws-tests-release ci/prow/e2e-aws-tests-release-arm ci/prow/e2e-aws-tests-bootc-periodic-el9

@ggiguash

Copy link
Copy Markdown
Contributor Author

/verified by ci

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 21, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@ggiguash: This PR has been marked as verified by ci.

Details

In response to this:

/verified by ci

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 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@ggiguash: Overrode contexts on behalf of ggiguash: ci/prow/e2e-aws-tests-bootc-periodic-el9, ci/prow/e2e-aws-tests-bootc-release-arm-el10, ci/prow/e2e-aws-tests-bootc-release-arm-el9, ci/prow/e2e-aws-tests-bootc-release-el10, ci/prow/e2e-aws-tests-bootc-release-el9, ci/prow/e2e-aws-tests-release, ci/prow/e2e-aws-tests-release-arm

Details

In response to this:

Release tests are failing due to other reasons.
/override ci/prow/e2e-aws-tests-bootc-release-arm-el9 ci/prow/e2e-aws-tests-bootc-release-arm-el9 ci/prow/e2e-aws-tests-bootc-release-arm-el10 ci/prow/e2e-aws-tests-bootc-release-el9 ci/prow/e2e-aws-tests-bootc-release-el10 ci/prow/e2e-aws-tests-release ci/prow/e2e-aws-tests-release-arm ci/prow/e2e-aws-tests-bootc-periodic-el9

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.

@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

@ggiguash: all tests passed!

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.

@ggiguash

Copy link
Copy Markdown
Contributor Author

/cherry-pick release-4.22

@openshift-cherrypick-robot

Copy link
Copy Markdown

@ggiguash: once the present PR merges, I will cherry-pick it on top of release-4.22 in a new PR and assign it to you.

Details

In response to this:

/cherry-pick release-4.22

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.

@openshift-merge-bot
openshift-merge-bot Bot merged commit db404b5 into openshift:main Jul 21, 2026
25 checks passed
@ggiguash
ggiguash deleted the refactor-rpm-repo-config branch July 21, 2026 10:29
@openshift-cherrypick-robot

Copy link
Copy Markdown

@ggiguash: #7080 failed to apply on top of branch "release-4.22":

Applying: Implement repository configuration functions in scenario.sh
Applying: Adjust RPM scenarios to use common repository configuration functions
Using index info to reconstruct a base tree...
M	test/scenarios-bootc/el10/presubmits/el102-src@rpm-install.sh
M	test/scenarios-bootc/el10/releases/el102@rpm-standard.sh
M	test/scenarios-bootc/el9/presubmits/el98-src@rpm-install.sh
M	test/scenarios/releases/el98@rpm-standard1.sh
M	test/scenarios/releases/el98@rpm-standard2.sh
M	test/scenarios/releases/el98@rpm-upgrade.sh
Falling back to patching base and 3-way merge...
Auto-merging test/scenarios-bootc/el10/presubmits/el102-src@rpm-install.sh
CONFLICT (content): Merge conflict in test/scenarios-bootc/el10/presubmits/el102-src@rpm-install.sh
Auto-merging test/scenarios-bootc/el10/releases/el102@rpm-standard.sh
CONFLICT (content): Merge conflict in test/scenarios-bootc/el10/releases/el102@rpm-standard.sh
Auto-merging test/scenarios-bootc/el9/presubmits/el98-src@rpm-install.sh
Auto-merging test/scenarios/releases/el98@rpm-standard1.sh
CONFLICT (content): Merge conflict in test/scenarios/releases/el98@rpm-standard1.sh
Auto-merging test/scenarios/releases/el98@rpm-standard2.sh
CONFLICT (content): Merge conflict in test/scenarios/releases/el98@rpm-standard2.sh
Auto-merging test/scenarios/releases/el98@rpm-upgrade.sh
CONFLICT (content): Merge conflict in test/scenarios/releases/el98@rpm-upgrade.sh
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0002 Adjust RPM scenarios to use common repository configuration functions

Details

In response to this:

/cherry-pick release-4.22

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.

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. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants