finos / finos/architecture-as-code
calm-hub: parallelise GitHub namespace cloning (cloneAll/pullAll)
- Dominant language
- TypeScript
- Stars
- 399
- Forks
- 138
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 38
Description
`GitHubCloneManager.cloneAll()` and `pullAll()` clone/pull every configured namespace sequentially (`for (Map.Entry entry : namespaceRepos.entrySet())`, `GitHubCloneManager.java:66,105`). Startup latency is the sum of every repo's clone time.
**Fixable cheaply:**
- Target directories are disjoint per namespace — nothing shared to corrupt
- `GitHubRepoSync` is stateless
- A `ManagedExecutor` is already injected in this package
**Fix:** run each namespace's clone/pull on the executor in parallel; make the success/failure counters atomic (currently plain `int` increments).
Contributor guide
Research direction
Start in GitHubCloneManager.java at lines 66 and 105, then inspect the injected ManagedExecutor and GitHubRepoSync behavior. Verify that each namespace clone and pull runs independently, counters remain correct under parallel execution, and the existing synchronization checks still pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, java
- Domain
- devops, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100