This PR addresses ticket #13425 by centralizing the release configuration for the mass rebuild orchestration tools, establishing a single source of truth for future Fedora release cycles.
Previously, scripts like `find_failures.py` and `need_rebuild.py` relied on hardcoded variables (e.g., `rebuildid = 'f45'`) that required manual bumps in multiple files.
**Changes Made:**
* **Centralized Configuration:** Removed hardcoded variables from `find_failures.py` and `need_rebuild.py`. They now import the `MASSREBUILDS` dictionary from `mass_rebuilds_info.py` to pull `buildtag`, `desttag`, `epoch`, and `targets`.
* **Dynamic Resolution:** By default, scripts will now dynamically calculate and target the highest release version available in the dictionary.
* **Added CLI Flag:** Introduced a `--rebuildid` argument via `argparse` to allow operators to override the default and target specific older releases (e.g., `--rebuildid f44`).
* **Documentation:** Appended a usage section to the `README.md` detailing the new flag and the centralized configuration source.
**Testing Notes:**
* Verified the scripts parse arguments and load the dictionary correctly locally via `--help`.
* *Note:* The existing `test_mass_rebuild.py` test suite only covers the network retry mechanisms in `mass_rebuild.py` and does not currently mock or cover `find_failures.py` or `need_rebuild.py`.
**Resolves:** #13425
Reviewed-on: #13045
Self-review caught a few rough edges in the dist-git mismatch skip
logic added in c93d4ef:
- append_distgit_skip_report checked file existence before opening it;
replaced with report.tell() == 0 inside the open context to close
the race window.
- getBuild fallback was silently swallowing exceptions; now logs a
warning to stderr so Koji flaps are visible in the run log.
- Guarded tagged_nvr against None in the skip message to avoid
confusing "tagged build None" output.
- Added two missing test cases: a releng bump stacked on top of a
maintainer commit (must still skip), and divergent history from a
force-push (merge-base --is-ancestor must catch it).
Signed-off-by: Samyak Jain <samyak.jn11@gmail.com>
Avoid rebuilding packages whose rawhide HEAD has non-releng commits
beyond the latest build in desttag, so failed-gating content is not
bumped into the rebuild tag. Log skips to skipped_distgit_mismatch.txt.
Fixes: releng/tickets#13428
Signed-off-by: Samyak Jain <samyak.jn11@gmail.com>
Skip packages that already have a checkout, so interrupted runs
Resume past cloned trees instead of deleting and recloning.
Line-buffer output for tee, we used to do it in the last script.
Signed-off-by: jnsamyak <samyak.jn11@gmail.com>