Branching - Early access | Feedback discussion #18937
Replies: 88 comments 200 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.
-
Is it expected to have to configure Oauth (eg google OAuth) for each new supabase branch? |
Beta Was this translation helpful? Give feedback.
-
Is branching working when self-hosting Supabase or is it not there yet? :) Given our constraints some clients want self-hosted option and we want to have branching for them as well (so that they can review features). :) |
Beta Was this translation helpful? Give feedback.
-
When creating Supabase branches, the following settings are not automatically inherited from
|
Beta Was this translation helpful? Give feedback.
-
Is it possible to use Snaplet with database branching? I couldn't find anything that mentions this in the docs. As part of the seed process, we have some Snaplet scripts that populate storage buckets with some images and need to continue using this |
Beta Was this translation helpful? Give feedback.
-
Hi! Although I'm on PR #128 (with db migrations). The dashboard still says: #113 (creates confusion). |
Beta Was this translation helpful? Give feedback.
-
My Migration is failing and this is the error message please help me out. 2024/12/13 11:04:15 cannot read config in /app: open supabase/supabase/config.toml: no such file or directory |
Beta Was this translation helpful? Give feedback.
-
Hi :) Amazing tools. Ive just installed Supabase CLI for the first time (required me to mess around with KVM on Hyper-V, but that all worked out well). Whilst running through the main docs for branching, When I run `supabase pull --db-url...." the same thing always happens. The DB connects, output appears up to the point:
And stops. if I press ctrl-c, or "space bar", the process drops to ctrl-z style, stopped background process, and then when I run And now I have sorted out some schema pull missmatch (wasnt logged in the first time with supabase login / link, would be nice to have that in the docs), then precistely the same thing happens, but now, when I press space, and then
So also.. I have... installed all the stuffs, I have a "supable/config.toml" which was created, run the
|
Beta Was this translation helpful? Give feedback.
-
Hey everyone, I'm curious about which parts (if any) of the Supabase Branching feature are open source. If any devs here could point me to the relevant code or drop a link, I'd really appreciate it. I’d love to check it out and explore how branching works under the hood. Thanks! |
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.
-
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