Branch-Based Development Workflow in Lakebase
Who this is for:
Architecture / Concept Overview: Branch-Based Development Workflow in Lakebase
Branching in Lakebase works similarly to Git branching for code. Each branch is a lightweight, isolated snapshot that only stores the pages that differ from its parent.
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
graph TD
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
A[main branch] --> B[feature/add-payments]
A --> C[feature/user-profiles]
A --> D[hotfix/fix-order-total]
B --> E[Test & Validate]
C --> E
D --> F[Emergency Merge]
E --> G[Merge to main]
F --> A
A:::processing
B:::ingestion
C:::ingestion
D:::source
E:::serving
F:::governance
G:::storage
*Branches isolate changes from production until they are validated and merged, just like feature branches in Git.*
%%{init: {"theme":"base","themeVariables":{"background":"#0B0E14","primaryTextColor":"#E0E6ED","lineColor":"#5D6470","darkMode":true,"primaryColor":"#2E4A4A","secondaryColor":"#374151","secondaryTextColor":"#E0E6ED","tertiaryColor":"#111827","tertiaryTextColor":"#E0E6ED","edgeLabelBackground":"#1f2937"}}}%%
flowchart LR
classDef source fill:#3F4B59,stroke:#9CA3AF,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef ingestion fill:#5A4B36,stroke:#C9A86B,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef processing fill:#535072,stroke:#8E82B4,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef storage fill:#2E4A4A,stroke:#5FAFA8,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef serving fill:#3D5550,stroke:#6BB7AA,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
classDef governance fill:#5A3F52,stroke:#C28BB0,stroke-width:2px,rx:8,ry:8,color:#E0E6ED
A[Create Branch] --> B[Develop Schema Changes]
B --> C[Insert Test Data]
C --> D[Run Application Tests]
D --> E{Tests Pass?}
E -->|Yes| F[Merge to Main]
E -->|No| B
F --> G[Delete Branch]
A:::processing
B:::ingestion
C:::storage
D:::serving
E:::governance
F:::processing
G:::source
*The branch workflow loops through development and testing until changes are validated, then merges and cleans up.*
Key Terms
Prerequisites and Setup
- A Lakebase project with an existing database
- Permission to create and manage branches in the project
- Familiarity with Git branching concepts (helpful but not required)
Step-by-Step Implementation
Configuration Reference
| Parameter | Description | Default |
|---|---|---|
branch.name | Branch identifier (alphanumeric, underscores, hyphens) | Required |
branch.source | Parent branch to fork from | main |
branch.auto_delete_after_merge | Automatically delete branch after merge | false |
branch.max_active_branches | Maximum concurrent branches per database | 50 |
connection.options.lakebase.branch | Branch to connect to via client connection options | main |
merge.conflict_resolution | Strategy for handling conflicting changes | fail |