Skip to content

Conversation

@sachin-panayil
Copy link

@sachin-panayil sachin-panayil commented Jun 30, 2025

Issue Pool Improvements

Problem

Previously, the data parsing was shaky and we were not handling rate limiting. This would cause alot of 403 and 429 errors.

Solution

The changes take this into account by adding simple rate limiting and add parallel processing to speed up the script time.

Result

We should be able to hit all repos in codegov.json without recieving any rate limiting errors.

Notes

  • Processing 6 repos at once but need to find the sweetspot because at this rate, it takes 18 minutes for the entire script to run through codegov.json. the "bathtub curve" is what we have here and what we need to experiment with and solve 👀

Test Plan

Ran the script using node ../config/updateIssuePool.js

Signed-off-by: Sachin Panayil <sachinpanayil01@gmail.com>
Signed-off-by: Sachin Panayil <sachinpanayil01@gmail.com>
Copy link

@decause-gov decause-gov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM +1 🚢

// process repositories in chunks of 3 for parallel processing
for (let i = 0; i < repoInfo.length; i += CONFIG.concurrentRepos) {
const chunk = repoInfo.slice(i, i + CONFIG.concurrentRepos)
console.log(`Processing chunk ${Math.floor(i/CONFIG.concurrentRepos) + 1}/${Math.ceil(repoInfo.length/CONFIG.concurrentRepos)} (${chunk.length} repos)`)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@sachin-panayil sachin-panayil merged commit 79bf2fd into main Jul 7, 2025
6 of 9 checks passed
@sachin-panayil sachin-panayil deleted the sachin/issuePoolChanges branch July 7, 2025 17:42
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.

3 participants