fix: stagger collection-bucket copy pipe schedules (CM-XXXX) - #4420
fix: stagger collection-bucket copy pipe schedules (CM-XXXX)#4420gaspergrom wants to merge 2 commits into
Conversation
…rd collision (CM-XXXX) Collection-bucketing's clean_enrich and aggregate copy pipes were scheduled on the same 5-minute grid as the pre-existing leaderboards_* copy pipes, causing exact minute-for-minute collisions across the 1-3 AM window (e.g. leaderboards_commits and clean_enrich_copy_pipe_4 both at 1:20 AM). Under the account's concurrent-copy-job quota this caused leaderboards_members, leaderboards_commits, leaderboards_forks, and leaderboards_issue_response to get stuck permanently queued, leaving the contributors leaderboard empty. Shifts clean_enrich shards by +2 min and aggregate shards (+ aggregate_projects) by -2/+3 min so no two pipes in the 1-3 AM window share a start minute. No leaderboards_* files changed. Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
PR SummaryMedium Risk Overview The ten Reviewed by Cursor Bugbot for commit c56eadc. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability. Example:
Projects:
Please add a Jira issue key to your PR title. |
There was a problem hiding this comment.
🟡 Not ready to approve
Four new schedules still collide with other hourly copy jobs, leaving account-level contention unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Staggers collection-bucketing copy jobs to reduce Tinybird scheduling contention.
Changes:
- Shifts ten clean/enrich shards by two minutes.
- Shifts aggregate shards and project aggregation.
- Note: replace the
CM-XXXXtitle placeholder with a valid JIRA key.
File summaries
| File | Description |
|---|---|
collection_insights_aggregate_projects_copy_pipe.pipe |
Reschedules project aggregation. |
collection_insights_aggregate_copy_pipe_0.pipe |
Reschedules aggregate shard 0. |
collection_insights_aggregate_copy_pipe_1.pipe |
Reschedules aggregate shard 1. |
collection_insights_aggregate_copy_pipe_2.pipe |
Reschedules aggregate shard 2. |
collection_insights_aggregate_copy_pipe_3.pipe |
Reschedules aggregate shard 3. |
collection_insights_aggregate_copy_pipe_4.pipe |
Reschedules aggregate shard 4. |
collection_insights_aggregate_copy_pipe_5.pipe |
Reschedules aggregate shard 5. |
collection_insights_aggregate_copy_pipe_6.pipe |
Reschedules aggregate shard 6. |
collection_insights_aggregate_copy_pipe_7.pipe |
Reschedules aggregate shard 7. |
collection_insights_aggregate_copy_pipe_8.pipe |
Reschedules aggregate shard 8. |
collection_insights_aggregate_copy_pipe_9.pipe |
Reschedules aggregate shard 9. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_0.pipe |
Reschedules clean/enrich shard 0. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_1.pipe |
Reschedules clean/enrich shard 1. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_2.pipe |
Reschedules clean/enrich shard 2. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_3.pipe |
Reschedules clean/enrich shard 3. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_4.pipe |
Reschedules clean/enrich shard 4. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_5.pipe |
Reschedules clean/enrich shard 5. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_6.pipe |
Reschedules clean/enrich shard 6. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_7.pipe |
Reschedules clean/enrich shard 7. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_8.pipe |
Reschedules clean/enrich shard 8. |
activityRelations_collection_bucket_clean_enrich_copy_pipe_9.pipe |
Reschedules clean/enrich shard 9. |
Review details
- Files reviewed: 21/21 changed files
- Comments generated: 4
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
| TARGET_DATASOURCE collection_insights_aggregate_consolidated_ds | ||
| COPY_MODE append | ||
| COPY_SCHEDULE 5 2 * * * | ||
| COPY_SCHEDULE 3 2 * * * |
| TARGET_DATASOURCE activityRelations_collection_deduplicated_cleaned_bucket_4_ds | ||
| COPY_MODE replace | ||
| COPY_SCHEDULE 20 1 * * * | ||
| COPY_SCHEDULE 22 1 * * * |
| TARGET_DATASOURCE collection_insights_aggregate_projects_ds | ||
| COPY_MODE replace | ||
| COPY_SCHEDULE 0 3 * * * | ||
| COPY_SCHEDULE 3 3 * * * |
| TARGET_DATASOURCE collection_insights_aggregate_consolidated_ds | ||
| COPY_MODE append | ||
| COPY_SCHEDULE 20 2 * * * | ||
| COPY_SCHEDULE 18 2 * * * |
…eaderboards (CM-XXXX) The previous commit staggered minutes within the same 1-3 AM hour block the leaderboards_* copy pipes already use, but both groups still contended for the same account-level concurrent-copy-job quota (12) in that shared window. Move the whole collection-bucket block to a later, previously near-empty span so it no longer overlaps leaderboards_* at all: - activityRelations_collection_bucket_clean_enrich_copy_pipe_0..9: 1 AM -> 4 AM (restored original :00,:05,...:45 grid) - collection_insights_aggregate_copy_pipe_0..9: 2 AM -> 5 AM (restored original :05,:10,...:50 grid) - collection_insights_aggregate_projects_copy_pipe: 3 AM -> 6 AM Verified zero minute-for-minute collisions across all leaderboards_* and collection-bucket pipes with this layout, and confirmed the only pre-existing pipe in the 4-6 AM window (contributions_with_local_time at 4:44) doesn't collide with the new clean_enrich :00-:45 grid. Note: the 10 clean_enrich_copy_pipe_* files were already pushed to production with the previous commit's minute-offset values (1 AM range) before this correction landed; deploying this commit moves them again, to 4 AM. Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c56eadc. Configure here.
| TARGET_DATASOURCE activityRelations_collection_deduplicated_cleaned_bucket_0_ds | ||
| COPY_MODE replace | ||
| COPY_SCHEDULE 0 1 * * * | ||
| COPY_SCHEDULE 0 4 * * * |
There was a problem hiding this comment.
Schedules shifted hours, not minutes
Medium Severity
COPY_SCHEDULE values move the hour by +3 (1→4, 2→5, 3→6) while keeping the same minutes. The intended fix was a minute-level stagger inside the 1–3 AM window (+2 / −2/+3 minutes) so all 26 pipes keep unique start minutes there. Tinybird cron is minute hour ..., so these edits change the wrong field relative to that plan, delay collection refreshes by three hours, and leave the stated 1–3 AM uniqueness check unverified for the new 4–6 AM window. Pipe DESCRIPTION text still documents the old 01:00 / 2:05 / 3:00 times.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit c56eadc. Configure here.
There was a problem hiding this comment.
🟡 Not ready to approve
The title uses CM-XXXX instead of the numeric JIRA key required by CI.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
- Files reviewed: 21/21 changed files
- Comments generated: 0 new
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.


Summary
leaderboards_*copy pipes, contending for the same account-level concurrent-copy-job quota (12) — this causedleaderboards_members,leaderboards_commits,leaderboards_forks, andleaderboards_issue_responseto get stuck permanentlyqueued, emptying the public contributors leaderboard (insights.linuxfoundation.org/leaderboards/contributors)leaderboards_*for the quota at all:activityRelations_collection_bucket_clean_enrich_copy_pipe_0..9: 1 AM → 4 AMcollection_insights_aggregate_copy_pipe_0..9: 2 AM → 5 AMcollection_insights_aggregate_projects_copy_pipe: 3 AM → 6 AMleaderboards_*+ collection-bucket pipes, and that the one pre-existing pipe in the 4–6 AM window (contributions_with_local_timeat 4:44) doesn't collide with the new gridleaderboards_*files touchedDeploy note: the first commit's minute-offset values for the 10
clean_enrich_copy_pipe_*pipes were already pushed to production before this correction landed. Deploying the current commit moves them again (1 AM → 4 AM). The four originally-stuck pipes were already manually retriggered tookearlier as an immediate fix.Test plan
.pipefile diffs that no two pipes among the 26 in the 1–6 AM window share the same hour+minute after this change.pipefiles themselvesmonitoring_copy_pipe_executionsshows all 26 pipes reachingok(notqueued) on the next scheduled runleaderboardsendpoint (leaderboardType=contributors) continues returning data the day after deploy