Repository navigation
feat: refill skipped repos in the mirror sweep and raise the batch to 2500 - #5161
Conversation
… 2500 Refs linuxfoundation/lfx-cdp-insights-ops#934 Signed-off-by: Mouad BANI <mouad-mb@outlook.com>
|
|
PR SummaryMedium Risk Overview
The Temporal schedule registration default Reviewed by Cursor Bugbot for commit 725af57. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the mirror-sweep changes to count successful mirrors toward the batch limit.
No open issues 🎉
What changed in this PR
Updates the connectors worker’s nightly mirror sweep to count successful mirrors toward its limit, so skipped repositories no longer reduce the batch’s yield.
Changes:
- Continues through ordered candidates until the mirror target is reached or candidates run out, sizing each group to the remaining target.
- Raises the default batch size from 1,000 to 2,500 for newly created schedules; existing schedules require a manual update.
- Adjusts the batch test to verify that seven attempts produce five mirrors despite two skips.
| File | Description |
|---|---|
services/apps/connectors_worker/src/schedules/mirrorSweep.ts |
Raises the schedule’s default batch size to 2,500. |
services/apps/connectors_worker/src/activities/mirrorSweepActivities.ts |
Refills skipped candidates while respecting the successful-mirror limit. |
services/apps/connectors_worker/src/activities/mirrorSweepActivities.test.ts |
Updates the test to verify skip refilling and stopping at the target. |
Review effort: Balanced
| try { | ||
| for (const group of chunk(candidates, MIRROR_RESOLVE_CONCURRENCY)) { | ||
| let next = 0 | ||
| while (result.mirrored < limit && next < candidates.length) { |

Summary
batchSizegoes from 1000 to 2500. The last nights each tried 1000 and mirrored 858–926; the skips were what made up the difference.Rollout
batchSize: 1000until it is updated by hand withtemporal schedule update({ "batchSize": 2500, "shadowCap": 5000 }).@event:mirror_sweep_summaryshould showmirroredequal to the room, notattempted.Notes
shadowCap5000 is what limits the batch now: 2613 repos were in shadow on 2026-10-30, so the room is about 2387 and shrinks as the shadow fills.Verification
tsc -b services/apps/connectors_workerandoxlint --deny-warningsare clean.Refs linuxfoundation/lfx-cdp-insights-ops#934