Branching - Early access | Feedback discussion #18937
Replies: 69 comments 166 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.
-
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.
-
Beta Was this translation helpful? Give feedback.
-
Anyone else running into an issue where branches don't close automatically after their associated PR is closed/merged? Causing me to pay a lot in unnecessary compute.... |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I've run into repeated cases where the logs end in: (on main)
(on a branch)
Any idea what's going on? |
Beta Was this translation helpful? Give feedback.
-
Is it possible to add Edge Function secrets? Right now, it seems the only workflow is to copy secrets from the main branch manually.. |
Beta Was this translation helpful? Give feedback.
-
It seems like import_maps aren't being used for deploying edge functions - I keep getting relative import errors (It's not using the import_map.json and is therefor interpretting some of the imports as relative). The functions deploy perfectly fine when deployed manually ( The import map is in the "correct" folder as described in the docs (functions folder) I did manage to find a fix, but it's less than ideal - explicitly defining the import map in the config.toml, per function, like so:
|
Beta Was this translation helpful? Give feedback.
-
Hi! I'm running into an issue and looking for some help. I have my prod (main) db to be connected to my main branch for my project on Github, and I have a branch for dev as well that's connected to my dev github branch. When I put the environment variables in my local env file, everything runs as normal, but when I paste them into Vercel, Supabase is missing an auth session and not allowing me to do any authentication on the Vercel links. Could this have something to do with the branching? This did not happen before I set up branching on Supabase. I copied the DB schema from prod to dev, so they are the exact same, but I have not done anything else on the command line, and I'm not sure if I need to. Any help would be appreciated, and I can add clarifications as well! |
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