Branching - Early access | Feedback discussion #18937
Replies: 96 comments 217 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.
-
It seems like whatever the branching is doing to handle force pushes from Github doesn't play well with views that don't fall into very specific patterns. With a simple view like this:
any force pushes at all result in this branch error:
|
Beta Was this translation helpful? Give feedback.
-
Does anyone know why running |
Beta Was this translation helpful? Give feedback.
-
Hello! I am currently using branching on a project, where I have a persistent 'staging' branch. The issue I am facing is system emails aren't sent when, say, the user signs up. I set up the SMTP settings correctly (copied everything from the production branch). I also checked the auth logs and found no errors, everything seems like it works correctly but the email wasn't sent. Anyone have any ideas about why that is? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Hey all, one issue I'm facing is that when I create a persistent branch manually, Supabase does not populate the environment variables for that branch. I've tried:
I have the github + vercel integration on and I would have expected that creating a branch in Supabase would keep the env variables in Vercel for that same branch in sync. Any ideas? EDIT: it seems the only way to trigger Supabase adding env vars in Vercel is if a PR is opened which triggers the Supabase job, however there are scenarios where we simply want a persistent branch that was created manually to still have their env variables synced. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Would be nice if we can set the default compute size used by the branch, my seed.sql takes a while to be inserted so I usually manually update the compute size for the preview db. |
Beta Was this translation helpful? Give feedback.
-
Using the combination of branching, database functions, and edge functions currently seems to be entirely unconsidered by Supabase. Every example of making database functions work with edge functions (such as with cron triggers) involves hardcoding of the project ref, even the example in the official documentation, which obviously doesn't work at all for branching. To make these features actually work together, the current project ref needs to be exposed to the database in an automatic way, such as through a |
Beta Was this translation helpful? Give feedback.
-
I'm stuck, edge functions can't deploy because the private repo can't be accessed. The npmrc file needs an env variable replaced (because I'm not going to commit that to source), but the name of the env is not being replaced. It ends up being |
Beta Was this translation helpful? Give feedback.
-
Hello, I've had a bit of a strange problem today, my permanent ‘dev’ branch has been deleted for no apparent reason. I hadn't pushed on my dev branch for 3/4 days, and I had the bad experience today of realising that the branch had disappeared. Given that it's my persistent branch that acts as my staging database, I'm a bit stuck because I no longer have a database for my staging environment. Could you give me some clues as to why this branch was deleted? |
Beta Was this translation helpful? Give feedback.
-
We've encountered some weird behaviour with a persistent branch. Under URL Configuration, both the Site URL and the list of Redirect URLs are getting reset to the default value of I've noticed that this corresponds to the defaults in We can define these values in directly in the config file, or by using a Has anyone else run into this or developed a good flow to handle defining auth URLs? |
Beta Was this translation helpful? Give feedback.
-
Hey there, does anyone know how to configure the customized smtp for branch project? I wrote configuration into the |
Beta Was this translation helpful? Give feedback.
-
I have the preview branch working properly, but there are some settings that reset every time there's a commit to the branch. So far I've identified these that I have to keep resetting: Under Authentication -> URL Configuration, Site URL always resets to http://127.0.0.1:3000/ and Redirect URLs resets to https://127.0.0.1:3000/ I intentionally omitted site URL and redirect URL's from the config.toml because I want to set them once and not overwrite them. I'm guessing that these are defaults that are being reset every time there's a push to the branch, these defaults are certainly nowhere in the code base. Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
-
we are enjoying branching but i'd like to point out an edge case: if i merge my github branch before the supabase branch is finished building, the supabase branch hangs open with an error. this is notable because these branches do cost money. my team would prefer that the supabase branch just closed itself out no matter what if the github branch is closed. |
Beta Was this translation helpful? Give feedback.
-
Hello again. |
Beta Was this translation helpful? Give feedback.
-
Is there any kind of best practices to follow RE seeding object storage - especially for branching. I want to potentially be able to seed brand images and content on branches or is this something we should be handling ourselves? Use case is for having static content get served via the Supabase CDN for things like logos etc. |
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