elliott: fix close_reconciliation_bugs crash on unbounded JQL when target versions are missing - #3284
Conversation
…ered out _query() returns None when every configured target-release version is missing from the JIRA project (e.g. a new OCP release whose Target Version values haven't been created yet), and every other caller (search, blocker_search, cve_tracker_search) already checks for that and short-circuits to []. close_reconciliation_bugs skipped that check and passed None straight to _search(), which sent JIRA a query with no real restriction and got rejected with "Unbounded JQL queries are not allowed here", failing the whole find-bugs:qe step. rh-pre-commit.version: 2.4.0 rh-pre-commit.check-secrets: ENABLED
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: openshift-eng/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Walkthrough
ChangesReconciliation query handling
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: ⚪ Minimal · up to The change prevents the reconciliation command from issuing an unbounded query when target versions are unavailable and safely returns without modifying bugs; no actionable merge-blocking risk remains after normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@kopero2000: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: joepvd The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
3ccde95
into
openshift-eng:main
Summary
close_reconciliation_bugs(elliottfind-bugs:qe) crashed withJiraError HTTP 400: Unbounded JQL queries are not allowed herewhenever a group's configured target-release versions (e.g.5.1.0,5.1.z,5.1fromocp-build-data/bug.yml) don't yet exist as "Target Version" options in the OCPBUGS JIRA project (e.g. right after a new OCP release is cut).BugTracker._query()already handles this case by returningNonewhen all configured target versions are filtered out, and every other caller (search,blocker_search,cve_tracker_search) checks forNoneand short-circuits to[].close_reconciliation_bugswas the one caller that skipped this check and passedNonestraight into_search(), which sent JIRA a query with no real restriction.if query is None: return []-style guard toclose_reconciliation_bugs, matching the existing pattern used elsewhere inbzutil.py.Test plan
test_close_reconciliation_bugs_no_valid_target_versionscovering the_query() -> Nonepath (asserts_searchis never called and no bugs are transitioned/commented on).uv run pytest elliott/tests/test_find_bugs_qe_cli.py— all 5 tests pass.make lint— clean.Summary by CodeRabbit
Bug Fixes
Tests