Skip to content

Implement Adaptive Chunking for DevIndex Updater to Fix 504 Timeouts #9128

@tobiu

Description

@tobiu

I have verified that the user davidhu2000 is NOT a heavy public user (created 2015, 46 repos, 182 followers), but fetching their contribution data in a 4-year chunk consistently fails with a 504 Gateway Timeout.

However, fetching a 1-year chunk succeeds instantly.

This confirms that the issue is likely due to a specific data quirk or hidden complexity (e.g., massive private contributions) that makes the 4-year query too expensive for GitHub to compute in one go.

Solution: Adaptive Chunking
We will modify Updater.mjs to implement a smart fallback:

  1. Attempt to fetch the standard 4-year chunk.
  2. If it fails (throws an error), catch it.
  3. Log a warning and switch to fetching the years one by one for that specific chunk.

This ensures the updater remains fast for normal users while automatically handling these edge cases without crashing.

Metadata

Metadata

Assignees

Labels

aibugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions