Repository navigation
Fix Z-stream fix approach logic bugs - #729
Conversation
PR Summary by QodoFix Z-stream fix approach misclassification for shipped and rejected clones
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
7 rules 1.
|
|
/agentic_review |
|
Code review by qodo was updated up to the latest commit 8e1ec74 |
8e1ec74 to
0be6a57
Compare
Does it? The code literally says |
nforro
left a comment
There was a problem hiding this comment.
Apart from the comments, LGTM.
0be6a57 to
cf345ca
Compare
cf345ca to
15f33c7
Compare
_check_zstream_fix_approach() only checked the "Fixed in Build" custom field to decide whether a Z-stream clone was ready. A clone that had already reached Closed/Done-Errata (shipped) but had an empty "Fixed in Build" field was incorrectly treated as still pending, causing the Y-stream issue to be postponed indefinitely. Changes: - Request status/resolution from Jira alongside "Fixed in Build" field - Check status/resolution before falling back to "Fixed in Build": * Closed + Done-Errata/Done with NVR → existing Koji lookup (CS vs RHEL) * Closed + Done-Errata/Done without NVR → RHEL_FIRST (proceed) * Closed + rejected resolution → skip the clone * Closed + other resolution → skip (not a shipping resolution) - Continue checking all clones instead of early-return (CS_FIRST can still be found in later clones even if an earlier one is shipped without NVR) - Track best RHEL_FIRST result found, preventing overwrites - Use case-insensitive comparison for resolution names (matches pattern elsewhere in the file) - Add helper function to centralize RHEL_FIRST tuple construction Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
SearchJiraIssuesTool can return None for requested fields that are
missing in Jira's response. Accessing status.name with chained .get()
calls raises AttributeError when status is None.
Changed to use the defensive (... or {}) pattern consistently with
line 554:
- status_name = (issue.get("fields", {}).get("status") or {}).get("name", "")
- resolution_name = (issue.get("fields", {}).get("resolution") or {}).get("name", "")
Also simplified resolution extraction by removing the intermediate
resolution_raw variable.
Added unit test for status=None/resolution=None case.
Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Matches the pattern used for rejected resolutions to handle case variations consistently.
15f33c7 to
8388317
Compare
Summary
Fixes Low/Moderate Y-stream postponement that ignores shipped Z-stream clones.
Problem
_check_zstream_fix_approach()only checked the "Fixed in Build" custom field to decide whether a Z-stream clone was ready. A clone that had already reached Closed/Done-Errata (shipped) but had an empty "Fixed in Build" field was incorrectly treated as still pending, causing the Y-stream issue to be postponed indefinitely.Solution
The function now requests status and resolution from Jira and checks them before falling back to the "Fixed in Build" field:
Additional improvements (latest commit)
Also fixed 6 related bugs discovered during code review:
.upper()consistently)_build_rhel_first_result()helper to eliminate code duplicationTest plan
🤖 Generated with Claude Code