fix(cli): propagate GraphQL failures in find_prs_for_issue instead of returning empty list#1501
Closed
jaso0n0818 wants to merge 1 commit into
Closed
Conversation
… returning empty list Fixes entrius#1492: when _search_issue_referencing_prs_graphql returns None (rate limit, network error, GraphQL errors, or missing issue payload), find_prs_for_issue now raises RuntimeError instead of collapsing None to []. This surfaces the failure to callers rather than silently reporting zero submissions.
Collaborator
|
Duplicate of #1493 which is better scoped/implemented. Closing. |
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
Fixes #1492: when
_search_issue_referencing_prs_graphqlreturnsNone(rate limit, network error, GraphQL errors, or missing issue payload),find_prs_for_issuenow raisesRuntimeErrorinstead of collapsingNoneto[].This surfaces the failure to callers (e.g.
fetch_open_issue_pull_requestsre-raises asclick.ClickException) rather than silently reporting zero submissions.Related Issues
Fixes #1492
Type of Change
Testing
uv run ruff check gittensor/utils/github_api_tools.pyuv run pytest tests/test_classes.py tests/cli/ -q --ignore=tests/cli/test_cli_helpers.py --ignore=tests/cli/test_cli_json_error_output.py(pre-existing failures in those files)