This PR introduces a significant enhancement to the VCS service by adding a new endpoint for parallel fetching of multiple commits. This change improves performance and efficiency when retrieving commit information for multiple refs while maintaining full backwards compatibility
Key changes
Added a new GetCommits endpoint in the proto definition to handle multiple refs in a single request
Implemented a new getCommits function that fetches commits in parallel using goroutines and channels
Updated the service layer to handle partial successes and provide detailed logging for the new endpoint
Added comprehensive tests for the new functionality
Maintained the existing GetCommit endpoint for full backwards compatibility
Main benefits
Reduced network overhead: The frontend can now request multiple commits in a single API call, significantly reducing the number of HTTP requests.
Improved performance: Parallel fetching of commits leads to faster overall response times, especially when dealing with multiple refs.
Better error handling: The service now provides detailed information about both successful and failed commit fetches.
Backwards compatibility: Existing integrations using the GetCommit endpoint remain fully functional and unchanged.
Frontend impact
No breaking changes for existing frontend code
Frontend can update their code to use the new GetCommits endpoint to fetch multiple commits at once.
This PR introduces a significant enhancement to the VCS service by adding a new endpoint for parallel fetching of multiple commits. This change improves performance and efficiency when retrieving commit information for multiple refs while maintaining full backwards compatibility
Key changes
GetCommits
endpoint in the proto definition to handle multiple refs in a single requestgetCommits
function that fetches commits in parallel using goroutines and channelsGetCommit
endpoint for full backwards compatibilityMain benefits
GetCommit
endpoint remain fully functional and unchanged.Frontend impact
GetCommits
endpoint to fetch multiple commits at once.