Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 add retry loop to graphQL commit queries which timeout on large github repos #3680

Merged
merged 7 commits into from
Nov 20, 2023

Conversation

spencerschrock
Copy link
Member

What kind of change does this PR introduce?

bug fix

What is the current behavior?

The graphql query which fetches commit data can time out on large repositories.

What is the new behavior (if this is a feature change)?**

On graphql timeout, we now retry the query up to 3 times, cutting our request in half each time.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

Fixes #3464
Fixes #3663

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

Scorecard processes commit activity from large GitHub repos in chunks to avoid timeout issues

in the event of timeouts, make our pagination smaller

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
@spencerschrock
Copy link
Member Author

Going to run a few more tests locally before marking ready for review

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

Merging #3680 (5e35541) into main (76878e5) will decrease coverage by 14.98%.
The diff coverage is 73.68%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3680       +/-   ##
===========================================
- Coverage   76.12%   61.15%   -14.98%     
===========================================
  Files         209      197       -12     
  Lines       14217    13388      -829     
===========================================
- Hits        10823     8187     -2636     
- Misses       2749     4674     +1925     
+ Partials      645      527      -118     

@spencerschrock
Copy link
Member Author

/scdiff generate

Copy link

Signed-off-by: Spencer Schrock <sschrock@google.com>
Signed-off-by: Spencer Schrock <sschrock@google.com>
@spencerschrock
Copy link
Member Author

/scdiff generate

Copy link

@spencerschrock spencerschrock enabled auto-merge (squash) November 20, 2023 21:05
@spencerschrock spencerschrock merged commit 1a17bb8 into ossf:main Nov 20, 2023
38 checks passed
@spencerschrock spencerschrock deleted the fix/large-repo-graphql branch November 20, 2023 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Only initialize what is needed BUG: List GitHub commit crashing for pytorch/pytorch
2 participants