-
Notifications
You must be signed in to change notification settings - Fork 727
fix: wider spaces between leaderboard copy pipes to prevent hitting queue limits #3868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| #!/bin/bash | ||
|
|
||
| PIPES_FOLDER="pipes" | ||
|
|
||
| cd "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." || exit 1 | ||
|
|
||
| show_help() { | ||
| cat << EOF | ||
| Usage: push.sh [OPTIONS] | ||
|
|
||
| Push Tinybird pipe files using "tb push". | ||
|
|
||
| OPTIONS: | ||
| --help Show this help message and exit | ||
| --match PATTERN Match files containing PATTERN in their name (wildcard match) | ||
|
|
||
| EXAMPLES: | ||
| push.sh | ||
| Push all pipe files | ||
|
|
||
| push.sh --match leaderboards_ | ||
| Push only files containing "leaderboards_" in their name | ||
|
|
||
| EOF | ||
| exit 0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Error paths exit with success status codeLow Severity
Additional Locations (2) |
||
| } | ||
|
|
||
| # Parse command line arguments | ||
| MATCH_PATTERN="" | ||
|
|
||
| while [[ $# -gt 0 ]]; do | ||
| case $1 in | ||
| --help|-h) | ||
| show_help | ||
| ;; | ||
| --match) | ||
| if [ -z "$2" ] || [[ "$2" == --* ]]; then | ||
| echo "Error: --match requires a pattern argument" | ||
| echo "" | ||
| show_help | ||
| fi | ||
| MATCH_PATTERN="$2" | ||
| shift 2 | ||
| ;; | ||
| *) | ||
| echo "Error: Unknown option: $1" | ||
| echo "" | ||
| show_help | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| for file in "$PIPES_FOLDER"/*; do | ||
| if [ -f "$file" ]; then | ||
| local_basename=$(basename "$file") | ||
|
|
||
| # Skip file if pattern is set and doesn't match | ||
| if [ -n "$MATCH_PATTERN" ] && [[ ! "$local_basename" == *$MATCH_PATTERN* ]]; then | ||
| continue | ||
| fi | ||
|
|
||
| tb push "$PIPES_FOLDER/$local_basename" --force --yes | ||
| fi | ||
| done | ||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New schedule collision with existing daily copy pipe
Medium Severity
leaderboards_merge_time.pipewas moved toCOPY_SCHEDULE 0 2 * * *, which is the exact same schedule as the existingproject_insights_copy.pipe(also0 2 * * *). This introduces a new concurrent execution that didn't exist before (it was previously at15 1 * * *), working against the PR's goal of reducing queue pressure. Several hourly copy pipes also fire at:00, compounding the overlap at the 2:00 AM slot.