Branching - Early access | Feedback discussion #18937
Replies: 37 comments 96 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.
-
Great feature! I'm using Cloudflare pages and enjoy their automatic deployment of my frontend app. Is there a way to automatically retrieve the connection string of a branch so that I could pass it to the build of the frontend application? Alternatively (and much preferred), might it be possible to configure connection data via code or repository secrets? |
Beta Was this translation helpful? Give feedback.
-
Hello. Since last week Supabase branching is public so Im able to test this feature and here is my feedback: I watched https://youtu.be/peXKxavGnBo?si=RnJ6OtjpnbZRmYEk and I really cant understand why Jon created feature directly from "production" branch. For TODO app which no-one gonna use its ok but in real life your always wanna create "main", "qa", "dev" branches on git. Take a look on photo: I dont understand why do I need to create 3 separate projects for PROD, QA and DEV and not just one with 3 permanent branches inside + one more temporary branch per feature. I also dont understand pricing: If I would like to create this one project with dev branch, qa branch and prod branch why do I need to pay 0.33$ per day per branch if separate project is free? Maybe Im not as experienced as you guys but I have a hard time with this. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hey @MildTomato & @kamilogorek ! So pumped about public availability! Congrats! Loving the innovation & listening (I'm watching from the background most of the time). I'm waiting with baited breath to get my whole stack across to branching the moment it's production ready! In the announcement above, it was said:
Can you give us some insight into what the "many features" are please? |
Beta Was this translation helpful? Give feedback.
-
Hey, maybe i have missed something, but each time i updated my persistent branches i need to re-enable the social auth providers. They appear switched on/enabled but i am getting this error in frontend: If I turn the provider off/on again its working, just a bit of a pain to do that each time. |
Beta Was this translation helpful? Give feedback.
-
Can I get help understanding branching and how to use it? It seems to me that when I move to a branching workflow I'm moving all of my editing work to my local environment which makes all of the hosted UI not useful anymore. I really enjoy the help that the supabase pro ui gives me but if i'm just doing all the postgres stuff locally i'm not really getting any of that benefit anymore. Is there something I'm missing? What I am currently imagining is that i can go into my "dev" supabase branch on the dashboard and make edits there that I can migrate into main, but that does not appear to be how it works at all. I still have to do all the changes in the local and then it gets pushed to the supabase branch so the UI tools are removed from my workflow. Edit: Looks like I might be able to just pull from a persistant dev branch using And the only way to pull the data to seed dev is to do it locally and so i would also need to push from local to dev? 🤔 I know there's a lot going on in this post I'll try to rewrite it after i clean up what I did 😆 |
Beta Was this translation helpful? Give feedback.
-
Im waiting 18 minutes for Supabase Github extension is it normal? |
Beta Was this translation helpful? Give feedback.
-
It seems there is some unexpected interaction between branches and the Vercel integration.
To work around this, I need to delete Vercel's integration. |
Beta Was this translation helpful? Give feedback.
-
Is there a way to set the JWT secret programmatically for branches? I'm using the Clerk Supabase integration, which requires that the JWT secret matches between the Supabase instance and Clerk. However, each branch in Supabase has its own JWT secret, which seems to only be set manually. Ideally, the JWT secret would be copied from the base ("production") settings. |
Beta Was this translation helpful? Give feedback.
-
Wondering what the best way to use Supabase + Drizzle with branching is? Should I be using the Drizzle migrations? https://twitter.com/plushdohn/status/1780126181490135371 |
Beta Was this translation helpful? Give feedback.
-
The concept of branching seems very promising, but I'm not sure where the front-end side of things fits in. If Supabase spins up a new back-end for a PR at a different address, that's only a partial solution and we can't actually test our app without a corresponding front-end being deployed. I think the component that's missing is some kind of API with a corresponding GitHub action that can be used to retrieve the details of the branch Supabase server which would then be used by our custom deploy scripts to launch a branch-specific version of the front-end. |
Beta Was this translation helpful? Give feedback.
-
I'm receiving a "Migration failed" in my preview branch. I create the main branch, ran the subabase init and created the schema. |
Beta Was this translation helpful? Give feedback.
-
Hey there! Love Supabase, appreciate all your work. Trying to set up a preview branch. Unfortunately, getting an error:
Clearly the |
Beta Was this translation helpful? Give feedback.
-
Hey, I've manually created a branch and it has been stuck on "Running migrations" for the last 10 minutes. Database is healthy, I can see all the migrations in the list. My seed file is fairly large, about 15,000 rows. I've removed my Is there a limit for the size of the seed.sql? If I try the same query in the editor I get a payload too large error, could this be happening when the branch tries to setup the seed? |
Beta Was this translation helpful? Give feedback.
-
We have been testing branching with vercel deployments for a bit. Some feedback:
|
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