Fix verify-packages.sh to dynamically read repo filenames#3898
Fix verify-packages.sh to dynamically read repo filenames#3898dfarrell07 wants to merge 1 commit intosubmariner-io:develfrom
Conversation
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>
|
🤖 Created branch: z_pr3898/dfarrell07/fix-verify-packages-dynamic-repo |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis change modifies the package verification script to dynamically extract the repository filename from the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
📝 Coding Plan
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. Comment |
| 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) |
There was a problem hiding this comment.
Can we rely on yq here?
| 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") |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further |
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:
Verified:
Summary by CodeRabbit