Repository navigation
fix(tools): skip malformed repoquery lines in scan_rawhide_state - #179
Closed
mrbobbytables wants to merge 1 commit into
Closed
mrbobbytables wants to merge 1 commit into
mrbobbytables wants to merge 1 commit into
Conversation
tools/scan_rawhide_state.py crashed when repoquery returned lines that did not contain four tab-separated fields (such as dnf5 warning or progress lines), raising ValueError: not enough values to unpack. Skip lines that do not have four tab-separated fields, print a warning to stderr for discarded lines, and return the first valid four-field entry. Also add unit test coverage in tests/test_scan_rawhide_state.py for stdout containing warning lines, malformed lines, and partially tabbed lines. Closes projectbluefin#172 Assisted-by: Gemini 3.8 Flash via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com>
castrojo
reviewed
Sep 19, 2026
castrojo
left a comment
Contributor
There was a problem hiding this comment.
Substantive review:
- Bug fix: Hardens query() in tools/scan_rawhide_state.py against malformed/un-tabbed stdout lines from dnf repoquery (such as repository warning messages), avoiding ValueError crashes by verifying field counts and selecting the first valid entry.
- Test Coverage: Adds unit test cases in tests/test_scan_rawhide_state.py verifying discarding of warning lines and partially tabbed lines.
- Validation: Factory contract, validate.py, and unittest suite pass without errors.
- Outstanding: CI rebuild matrix jobs are currently queued/running; awaiting CI completion and independent peer review (+2).
Member
|
Closing to consolidate the queue on the merged #178 full-factory candidate. The branch is retained; please re-open or submit a fresh, rebased PR after that build establishes the current baseline. |
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.
Summary
Skip lines in
repoquerystdout that do not contain four tab-separated fields intools/scan_rawhide_state.py, print a warning tosys.stderrfor any discarded lines, and select the first valid line.When
dnf repoqueryemits warnings, progress output, or unexpected text without tabs, unpackinglines[0].split("\t", 3)raisedValueError: not enough values to unpack (expected 4, got 1), crashing the entire scan.Changes
tools/scan_rawhide_state.py: Iterate over non-empty lines fromrepoquery, checkinglen(parts) == 4. Discard and warn on malformed lines tosys.stderr, returning the first parsed entry. ReturnNoneif no line matches.tests/test_scan_rawhide_state.py: Add unit tests forquery()when stdout mixes warning lines before valid lines, when all lines are malformed, and when lines have incomplete tab separations.Closes #172
— hive: backend=copilot model=gemini-3.8-flash
🐝 Hive Agent:
contributor| SHA:e2865e7