Branching - Early access | Feedback discussion #18937
Replies: 61 comments 153 replies
-
What is Supabase Branching? |
Beta Was this translation helpful? Give feedback.
-
Hope you're all doing great! I've been working with supabase on a project for 2 months and noticed something I wanted to share with you that would cause issues for supabase branching. As our projects grow, our seed file (you know, the trusty I've been sidestepping this by ditching the massive seed file and scripting my local database seeding instead. It's a lot like how migrations work: each file is timestamped and has a quick description, and they run in a set order. This means I have separate files for different seeding needs, like permission tables and location table inserts broken down into 1K-insert chunks – it’s pretty neat. Currently, Supabase runs whatever is in I reckon this could be something worth considering for your roadmap for seeding a branch. Thanks for all the hard work you've been putting into Supabase, and I'm excited to see how branching evolves! |
Beta Was this translation helpful? Give feedback.
-
if new branch is created, new Supabase url for client is reserved on new branch?? I maen if I use following url on main branch Can I use a different url for a new branch like staging? For example, |
Beta Was this translation helpful? Give feedback.
-
Can branching be used as a "dev" environment? |
Beta Was this translation helpful? Give feedback.
-
According to the docs: "The database is only seeded once, when the preview branch is created. To rerun seeding, delete the preview branch and recreate it." But when I deleted and recreated the branch ( |
Beta Was this translation helpful? Give feedback.
-
So far pretty good with supabase branching. Should I disable my existing github actions that migrate the production database when merging to the production branch? Is it expected that the migrations should be applied via this new Supabase branching integration? |
Beta Was this translation helpful? Give feedback.
-
@MildTomato does supabase branching support monorepos? Our |
Beta Was this translation helpful? Give feedback.
-
any advice on how to handle issues like this that require setting up things in the database (eg. webhooks)? |
Beta Was this translation helpful? Give feedback.
-
Hello! Loving the concept so far. After spending some time working around issues (seeding not being run and functions not being deployed), I realised you have a CLI for managing branches (which looks great btw!), and I think it could be highlighted more, as I was under the impression that only the "managed" workflows were supported (i.e only Github + Vercel), but atleast for me the feature set is complete enough that I could run this anywhere (and if i missed that that was possible, many others probably have too) |
Beta Was this translation helpful? Give feedback.
-
We are in dire need of selecting non root directories as the Supabase root. We are using a monorepo with TurboRepo. |
Beta Was this translation helpful? Give feedback.
-
Currently, we're testing each branch by setting up a local supabase instance in GH Actions for every run. But that setup takes a significant amount of time compared to the actual test run. The flow that we have in mind is:
Are there any blockers that we should be aware of? Moreover, once this is set up and the Vercel app is used, I'm assuming the preview instances will use the new branched supabase. We also don't want any changes in the preview branches going back into main (which I assume will not happen as we are not using supabase migrations in the preview branches). Can you please confirm this? |
Beta Was this translation helpful? Give feedback.
-
Feedback/idea: It'd be nice (or even crucial) for the preview branch to copy most local and/or production branch settings. Examples:
|
Beta Was this translation helpful? Give feedback.
-
For some reason I'm not seeing migrations running or seed data populated for a preview branch (feature or development). When I create a PR, it's spinning up the branch, just no tables or seed data. |
Beta Was this translation helpful? Give feedback.
-
We handle our migrations via Prisma migrate. Are there any plans to support the |
Beta Was this translation helpful? Give feedback.
-
Hey Folks I want to Setup a Supa Base Branching for the Automation Testing so the scenario is Below So how i can do it can anyone help me out in this Thanks in Advance. |
Beta Was this translation helpful? Give feedback.
-
Loving this feature so far. I know that the default is to keep preview branches not persistent and to delete them once a PR is merged (better for cost and saving on resources), though I think it would be nice to have an indicator or toggle when creating the branch because I had no idea they weren't persistent until I merged my staging branch into production. |
Beta Was this translation helpful? Give feedback.
-
Hi, it wont let me enable SSL for my preview branch |
Beta Was this translation helpful? Give feedback.
-
Getting error: |
Beta Was this translation helpful? Give feedback.
-
I'm seeking clarification on the best practice for implementing Supabase branching in my project. The documentation warns against using branching in a "production setting," but also describes merging branches within a single project. I'm unsure whether I should create two separate Supabase projects (one for production and one for development with branches) or use a single project with a main "production" branch and separate development branches. My app is still in the development stage, but I want to set up a proper workflow that separates development and production environments while leveraging the new branching feature. How should I structure my Supabase project(s) to best utilize branching while following best practices for development and eventual production use? Thank you so much for your help! |
Beta Was this translation helpful? Give feedback.
-
Is there a way to get the full database url / pooler url, project url, anon key for a specific branch via the CLI? When using |
Beta Was this translation helpful? Give feedback.
-
I'm getting this error when trying to set up branching: failed to run supabase --workdir=.: 1 |
Beta Was this translation helpful? Give feedback.
-
The GitHub integration gets extremely confused if you ever make a PR that doesn't target main/master. It will tell you |
Beta Was this translation helpful? Give feedback.
-
Lately, we've been experiencing issues with supabase branching not deleting preview branches when PRs are merged. We have our GitHub repo configured to delete branches on merge, so the branch is removed from the repo, but it isn't being removed from Supabase. Further, the variables that supabase syncs to Vercel are not being removed. Any suggestions on how we can remedy this? |
Beta Was this translation helpful? Give feedback.
-
I am working on setting up branching and I have seen one issue which might very well be a mistake of mine, but it seems like an oversight to me. The documentation suggests to Prevent Migration Failures in GitHub. So setting up a Branch protection rule for status checks to pass before merging. Makes total sense to me. However, if my PR now is for changes made outside of the supabase directory, and I have Supabase only changes feature turned on in the branching, then the status simply is not run and therefor GitHub believes it "failed" or rather, waits for it to run successfully. This seems a fringe edge case, I get that, however if we for example update our README.md documentation or some other files in the root directory of the repository, and want to merge these into master for example with strict rules, thus requiring a PR, supabase integration is going to indefinitely block this PR until I do some arbitrary change inside the supabase directory. Would it not make sense to still run the status check and simply have it pass so it does not block this kind of PR? Again, I understand this is a weird edge case, but maybe I also have made a mistake here or there is no way to fix this? Thx, |
Beta Was this translation helpful? Give feedback.
-
Small bug: If you have more than one vercel project integration, saving does not work correctly. If I change something in the second and press Save there, the Save in the first integration runs. I can not turn off production env keys for the second integration now. |
Beta Was this translation helpful? Give feedback.
-
Tried PR first time with changes in migrations. Branch Preview is created in supabase, but the migrations fail and the only error I see in the logs on GitHub is:
There is a warning also in the GitHub PR comments, however this seems out of my control:
Amy ideas? Thx, |
Beta Was this translation helpful? Give feedback.
-
When setting up my development branch next to my main branch I run
Here I then get the following error:
I have no migration files. I have tried to remove the /supabase folder, /migrations folder, re-init and revert to older migrations when I had some. My supabase CLI is up to date. |
Beta Was this translation helpful? Give feedback.
-
How can I configure Supabase to not show up as unsuccessful action when there are no changes to |
Beta Was this translation helpful? Give feedback.
-
I need to access my branch DB instance via an old-school connection string (I'm using it with an ORM). It seems like the DB instance has its own separate password, but it's not a password I've set anywhere. How can I locate the password Supabase generated with the branch? |
Beta Was this translation helpful? Give feedback.
-
How do we increase the compute/memory for supabase preview branches? |
Beta Was this translation helpful? Give feedback.
-
This discussion is for tracking feedback and possible issues for Supabase Branching.
This will help us plan a roadmap for the feature going forward.
Vote for hosting provider integrations here and Git providers here.
Beta Was this translation helpful? Give feedback.
All reactions