Skip to content

Fix verify-packages.sh to dynamically read repo filenames#3898

Open
dfarrell07 wants to merge 1 commit intosubmariner-io:develfrom
dfarrell07:fix-verify-packages-dynamic-repo
Open

Fix verify-packages.sh to dynamically read repo filenames#3898
dfarrell07 wants to merge 1 commit intosubmariner-io:develfrom
dfarrell07:fix-verify-packages-dynamic-repo

Conversation

@dfarrell07
Copy link
Copy Markdown
Member

@dfarrell07 dfarrell07 commented Mar 13, 2026

The script was hardcoded to fetch "submariner-rhel-10.repo" from git, which silently failed (|| true) when verifying older branches that use submariner-rhel-9.repo. This caused the script to verify packages against the wrong RHEL version.

Changes:

  • Extract repo filename from rpms.in.yaml for each component
  • Remove || true to fail fast when repo file is missing
  • Makes the script version-agnostic (works with RHEL 9 and 10)

Verified:

  • release-0.22 (RHEL 9) correctly shows rhel-9 repos
  • release-0.23 (RHEL 10) correctly shows rhel-10 repos

Summary by CodeRabbit

  • Chores
    • Updated package verification script to dynamically determine repository files from configuration instead of using hardcoded values, allowing for more flexible repository management.

The script was hardcoded to fetch "submariner-rhel-10.repo" from git,
which silently failed (|| true) when verifying older branches that use
submariner-rhel-9.repo. This caused the script to verify packages
against the wrong RHEL version.

Changes:
- Extract repo filename from rpms.in.yaml for each component
- Remove || true to fail fast when repo file is missing
- Makes the script version-agnostic (works with RHEL 9 and 10)

Verified:
- release-0.22 (RHEL 9) correctly shows rhel-9 repos
- release-0.23 (RHEL 10) correctly shows rhel-10 repos

Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
@submariner-bot
Copy link
Copy Markdown
Contributor

🤖 Created branch: z_pr3898/dfarrell07/fix-verify-packages-dynamic-repo
🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8e5df1a4-66a6-4143-b9e1-a1f7e94617db

📥 Commits

Reviewing files that changed from the base of the PR and between 252d552 and c727eab.

📒 Files selected for processing (1)
  • .rpm-lockfiles/verify-packages.sh

Walkthrough

This change modifies the package verification script to dynamically extract the repository filename from the rpms.in.yaml configuration file instead of using a hardcoded filename. The script now conditionally fetches the repository file only if one is defined in the configuration.

Changes

Cohort / File(s) Summary
Dynamic Repository File Retrieval
.rpm-lockfiles/verify-packages.sh
Modified script to extract repository filename from rpms.in.yaml repofiles section and conditionally fetch it, replacing hardcoded submariner-rhel-10.repo retrieval.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

ready-to-test

Suggested reviewers

  • sridhargaddam
  • vthapar
  • tpantelis
  • Oats87
  • yboaron

Important

Pre-merge checks failed

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

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Actionable Comments Resolved ❓ Inconclusive Cannot directly access GitHub PR comments interface to verify whether reviewers have raised actionable items that remain unresolved, despite code appearing complete and well-documented. Access PR #3898 directly on GitHub to review all comments from reviewers and verify that actionable feedback has been addressed or resolved.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: making verify-packages.sh dynamically read repo filenames instead of using hardcoded values.
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@dfarrell07 dfarrell07 moved this to In Review in Submariner 0.23 Mar 13, 2026
@dfarrell07 dfarrell07 enabled auto-merge (rebase) March 13, 2026 20:26
@submariner-bot submariner-bot added the ready-to-test When a PR is ready for full E2E testing label Mar 16, 2026
git show "$GIT_REF:.rpm-lockfiles/$comp/submariner-rhel-10.repo" > "$LOCKFILES_DIR/$comp/submariner-rhel-10.repo" 2>/dev/null || true

# Extract repo filename from rpms.in.yaml
repo_file=$(grep -A1 "repofiles:" "$LOCKFILES_DIR/$comp/rpms.in.yaml" | grep "^ *-" | sed 's/.*- //' | head -1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we rely on yq here?

Suggested change
repo_file=$(grep -A1 "repofiles:" "$LOCKFILES_DIR/$comp/rpms.in.yaml" | grep "^ *-" | sed 's/.*- //' | head -1)
repo_file=$(yq '.contentOrigin.repofiles[0]' "$LOCKFILES_DIR/$comp/rpms.in.yaml")

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further
activity occurs. Thank you for your contributions.

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

Labels

ready-to-test When a PR is ready for full E2E testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants