-
Notifications
You must be signed in to change notification settings - Fork 15
chore: pre-start Supabase for affected packages in CI #423
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
Conversation
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
View your CI Pipeline Execution ↗ for commit 76aeb5a
☁️ Nx Cloud last updated this comment at |
10d531a to
2ffb78b
Compare
2ffb78b to
76aeb5a
Compare
| echo "Preparing Supabase for client..." | ||
| mkdir -p "$PKG_DIR/supabase/migrations/" | ||
| rm -f "$PKG_DIR/supabase/migrations/"*.sql | ||
| cp "$PKG_DIR/../core/supabase/migrations/"*.sql "$PKG_DIR/supabase/migrations/" |
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.
The wildcard *.sql will cause the script to fail if no SQL migration files exist in the core package. Since the script uses set -e, the cp command will exit with an error when the wildcard doesn't match any files, breaking the CI pipeline.
Fix: Add a check before copying or use a glob pattern that won't fail:
if ls "$PKG_DIR/../core/supabase/migrations/"*.sql 1> /dev/null 2>&1; then
cp "$PKG_DIR/../core/supabase/migrations/"*.sql "$PKG_DIR/supabase/migrations/"
fiOr use shopt -s nullglob to make unmatched globs expand to nothing.
| cp "$PKG_DIR/../core/supabase/migrations/"*.sql "$PKG_DIR/supabase/migrations/" | |
| if ls "$PKG_DIR/../core/supabase/migrations/"*.sql 1> /dev/null 2>&1; then | |
| cp "$PKG_DIR/../core/supabase/migrations/"*.sql "$PKG_DIR/supabase/migrations/" | |
| fi | |
Spotted by Graphite Agent
Is this helpful? React 👍 or 👎 to let us know.
Merge activity
|
# Optimize CI by Pre-starting Supabase for Affected Packages This PR improves CI performance by intelligently pre-starting Supabase instances for affected packages. The implementation: 1. Adds a new CI step that pre-starts Supabase for packages that need it 2. Creates a new script `ci-prestart-supabase.sh` that: - Identifies affected packages requiring Supabase - Starts the first instance sequentially (to pull Docker images) - Starts remaining instances in parallel (saving ~1 minute per CI run) 3. Adds `supabase:ci-marker` targets to packages that require Supabase: - core - client - edge-worker This optimization reduces CI time by avoiding redundant Docker image pulls and parallelizing container startup, which typically takes ~28 seconds even with cached images.
🔍 Preview Deployment: Website✅ Deployment successful! 🔗 Preview URL: https://pr-423.pgflow.pages.dev 📝 Details:
_Last updated: _ |

Optimize CI by Pre-starting Supabase for Affected Packages
This PR improves CI performance by intelligently pre-starting Supabase instances for affected packages. The implementation:
Adds a new CI step that pre-starts Supabase for packages that need it
Creates a new script
ci-prestart-supabase.shthat:Adds
supabase:ci-markertargets to packages that require Supabase:This optimization reduces CI time by avoiding redundant Docker image pulls and parallelizing container startup, which typically takes ~28 seconds even with cached images.