Reduce Gitaly N+1 requests in Atlassian::JiraConnect serializers by making files optional
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
We send commit data to Jira on certain events. To serialize this data, we use Atlassian::JiraConnect::Serializers::CommitEntity. The entity class requests Gitaly in two places:
Usually a Jira request contains only one commit. In this case, it is okay to request Gitaly once. We are planning to implement synchronization of a whole project that can contain up to 400 commits. To make this more performant, it is necessary to reduce Gitaly requests.
We can make loading files optional, because it is not a required parameter. This will make the data in Jira less complete but it is a good first iteration.
Screenshot of the store dev info API documentation: (Find this page here, click Array<Repository>, Array<Commit> and scroll down to files)
