Source: www.databricks.com/blog/lakebase-branching-cicd-lessons-100-pr-databases
Snorkel's CI pipeline on Kubernetes creates an ephemeral namespace for each pull request, and restoring a copy of its Aurora PostgreSQL database took about 20 minutes per environment. Shared staging databases, trimmed fixtures and synthetic data were ruled out because they bring back test interference, stale schemas and bugs that only appear with real data.
Snorkel uses AWS DMS to replicate its Aurora database into the main branch of a Lakebase project, with a full load followed by change data capture that keeps main within about 2 minutes of production. When a PR opens, the pipeline calls the Lakebase API to create a branch from main with an expiration time, then deletes it when the PR merges or closes, with TTL as a backstop.
Developers sign in through Okta SSO, while CI pipelines run as Databricks service principals that obtain short-lived OAuth tokens, and traffic stays on private networking. Each PR branch writes about 5 to 10 GB of changes on a roughly 1 TB base, and compute scales to zero between runs. The rollout reached 60 to 70 developers across teams.
Why it matters if you build agents
Teams building agents can give each test run or agent task a disposable branch of a production-scale Postgres database, created in seconds regardless of database size. Without expiration, old branches keep holding older storage pages as main is updated, so set a TTL that matches how long a run usually lasts. Run automated workloads as service principals with short-lived tokens so every query can be traced in the audit logs.
Get stories like this every weekday
One short email with the day's agent tooling news.