Skip to content

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 spencerschrock marked this pull request as ready for review November 17, 2023 18:45
@spencerschrock spencerschrock requested a review from a team as a code owner November 17, 2023 18:45
@spencerschrock spencerschrock requested review from raghavkaul and laurentsimon and removed request for a team November 17, 2023 18:45
@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
@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