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

fix affiliation chunking and git plugin performance #634

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

j-lanson
Copy link
Collaborator

Resolves #603 .

As I mentioned in the issue comment, the cause of @alilleybrinker's issue related to gRPC message side stems from large outbound requests from the affiliation plugin to the git plugin when analyzing large repositories like torvalds/linux. The Hipcheck gRPC protocol does not support request chunking at present, only response chunking. Updated affiliation plugin to do some chunking of outbound requests of its own, until the time this issue is resolved

Once I fixed that, I found that affiliation's requests to git were taking an extremely and unacceptably long time to execute, and found our way of getting contributor-commit information was extremely inefficient and could be improved by using RawCommits instead of Commit.

@j-lanson j-lanson added type: bug Something isn't working product: hc Relates to the core "hc" binary product: rust-sdk Relates to the Rust plugin SDK labels Nov 15, 2024
@j-lanson j-lanson added this to the 3.8.0 milestone Nov 15, 2024
@j-lanson j-lanson self-assigned this Nov 15, 2024
For really large repos, affiliation might send a request to the git
plugin containing all commits such that the request is larger than the
gRPC maximum. The Hipcheck gRPC protocol currently does not allow for
chunked queries, so the affiliation plugin has been modified to do its
own chunking internally.
Although the git plugin's `RawCommit` struct contains author and
committer information, the `Commit` struct does not. For looking up the
contributors to a commit we were doing a lot of expensive and wasteful
computation to re-engineer what is already available in `RawCommit`.
This commit exposes more functionality to the query endpoint functions
to get `RawCommit` collections so we spend less time looking for
information that was already there before we discarded it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: hc Relates to the core "hc" binary product: rust-sdk Relates to the Rust plugin SDK type: bug Something isn't working
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

failures when analyzing torvalds/linux
1 participant