Repository navigation
refactor(ci): extract rebuild matrix resolver to tools/rebuild_matrix.py - #119
Closed
mrbobbytables wants to merge 1 commit into
Closed
mrbobbytables wants to merge 1 commit into
mrbobbytables wants to merge 1 commit into
Conversation
Extract the inline heredoc in .github/workflows/rebuild-rpms.yml prepare job into tools/rebuild_matrix.py. Consume package source locks via tools.package_inventory.source_locks so contract validation (duplicate locks, unknown stages) runs before matrix resolution. Add pure functions select_builds and stage_outputs, with impure git diff and published repodata fetches isolated in main(). Add unit test coverage in tests/test_rebuild_matrix.py and add tools/rebuild_matrix.py to the workflow path filters. Fixes projectbluefin#101 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
Member
|
Closing as superseded: Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR resolves #101 by extracting the matrix resolution step in
.github/workflows/rebuild-rpms.ymlintotools/rebuild_matrix.py.Summary of changes
tools.package_inventory.source_locksinstead of parsingconfig/upstream-sources.jsondirectly with an unvalidated heredoc. Contract violations (duplicate locks, unknown stages) are now caught before matrix derivation.select_buildsandstage_outputsoperate purely over the lock entries, with impure git diff and published repodata fetching isolated inmain().tests/test_rebuild_matrix.pywith 19 test cases covering version normalization, package selection (full rebuild, recipe changes, skip published), stage distribution, stage >= 5 overflow detection, and workflow delegation assertions.tools/rebuild_matrix.pytopush.pathsandpull_request.pathsin.github/workflows/rebuild-rpms.yml.— hive: backend=copilot model=gemini-3.8-flash
🐝 Hive Agent:
contributor| SHA:c4110f1