refactor: remove unused MAX_FILES_PER_GRAPHQL_BATCH constant#1277
Open
ebios-star wants to merge 1 commit into
Open
refactor: remove unused MAX_FILES_PER_GRAPHQL_BATCH constant#1277ebios-star wants to merge 1 commit into
ebios-star wants to merge 1 commit into
Conversation
MAX_FILES_PER_GRAPHQL_BATCH gated the legacy GraphQL file-content batched fetch (split into batches of 50 to avoid 502 errors on large PRs — see entrius#331's reasoning). That fetch path was removed in entrius#1202 when the legacy scoring pipeline was stripped; mirror-only scoring pulls file contents one PR at a time via MirrorClient.get_pr_files. grep -rn MAX_FILES_PER_GRAPHQL_BATCH across gittensor/, neurons/, and tests/ returns only the definition line. Dropping it also drops the explanatory comment that only made sense in the context of the removed batching code.
Contributor
Author
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
MAX_FILES_PER_GRAPHQL_BATCH = 50ingittensor/constants.py:29gated the legacy GraphQL file-content batched fetch — files were split into batches of 50 to avoid 502 errors on large PRs (see #331's reasoning, preserved in the inline comment).That fetch path was removed in #1202 when the legacy scoring pipeline was stripped. Mirror-only scoring pulls file contents one PR at a time via
MirrorClient.get_pr_files, which doesn't batch — the mirror itself handles the size limit on the response side.grep -rn MAX_FILES_PER_GRAPHQL_BATCH --include='*.py' .acrossgittensor/,neurons/, andtests/returns only the definition line — no remaining call sites.Dropping the constant also drops the explanatory comment that only made sense in the context of the removed batching code.
Net: -2 lines, single file. Same shape as #1187 (drop orphaned
get_github_id), #437, #448, #466.Type of Change
Testing
pytest tests/— all 753 tests pass.Checklist