Skip to content

fix(packaging): regenerate RPM repodata from full local and S3 package set#6761

Draft
arvindcheru wants to merge 2 commits into
mainfrom
users/acheruva/upload_pkg_retry_checker
Draft

fix(packaging): regenerate RPM repodata from full local and S3 package set#6761
arvindcheru wants to merge 2 commits into
mainfrom
users/acheruva/upload_pkg_retry_checker

Conversation

@arvindcheru

Copy link
Copy Markdown
Contributor

Motivation

This pull request introduces a comprehensive refactor and reliability improvement for RPM repository metadata regeneration in the build_tools/packaging/linux/upload_package_repo.py tool. The changes ensure that repodata is always generated from the complete set of RPMs (both local and on S3), eliminating issues caused by deduplication and partial uploads. The update also adds robust validation and new unit tests to prevent incomplete metadata from being uploaded.

Technical Details

  • Refactored RPM metadata regeneration to always use the union of locally built RPMs and all S3-available RPMs, preventing incomplete repository metadata when uploads are skipped due to deduplication.
  • Added fail-fast validation to ensure the generated primary.xml.gz indexes every .rpm file in the repository, catching and preventing stale or incomplete repodata uploads. (upload_package_repo.py)
  • Introduced helper functions and types for S3 interaction, local+S3 RPM materialization, and metadata validation, improving code clarity and maintainability. (upload_package_repo.py)
  • Added a new, self-contained unit test suite for the RPM repodata helpers, including S3 stubbing and filesystem layout, to verify correct behavior and edge cases. (upload_package_repo_test.py)

These changes together ensure that the RPM repository is always consistent and correct, even when some packages are skipped for upload due to deduplication, and provide automated tests to catch regressions.

ISSUE ID: 6540

Test Plan

python3.12 build_tools/packaging/linux/tests/upload_package_repo_test.py -v

Build RPM packages (best — hits upload + repodata directly), or
Re-run all jobs / Re-run failed jobs (same run_id, attempt 2+)

Test Result

Submission Checklist

@therock-pr-bot

therock-pr-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

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

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

1 participant