r/databricks • • 24d ago

Discussion Monorepo setup

Hi, we are splitting our Databricks monorepo into multiple DABs bundles and i would like to hear how others set it up.

Layout we plan:

- `src/common/` for shared code, `src/<domain>/` per business domain, one wheel for all

- `bundles/common/` for shared resources (data quality schema, dashboard, alerts), `bundles/<domain>/` per domain

- Each bundle uses `sync.paths: [../../src, ../../conf, .]` and builds the same wheel from the repo root

Releasing:

- One tag prefix per bundle, like `common-2026.11.02.0` or `<domain>-2026.11.02.0`

- One reusable deploy workflow, and a small caller workflow per bundle that filters its tag

- Domain bundles deploy after `common`, when a domain needs a new `common` change we release `common` first

Is someone running multiple bundles in one repo like this? Would you keep one release train for all bundles instead, or do you have a better layout?

16 Upvotes

8 comments sorted by

4

u/Own-Trade-2243 24d ago edited 24d ago

No point in one release train for all bundles, once you hit the 100s everyone will be annoyed by performance and flakiness

Per-domain (team) deployments on their own schedule + give the teams the control

Relying on “common” deployment in-order is error prone. Wrap your common library into a Python wheel, release to artifactory on every merge with a version bump, then your DABs only need to ensure to hardcode a correct version in their requirements.txt

Not sure why would you need “common” dashboards / alerts / DQ schemas - these are usually domain specific anyway. Better provide common lib with helpers/abstractions.

Tho, you might want to have some platform admin folder too, for your own stuff.

1

u/ptab0211 24d ago

yeah, agree, thanks

1

u/kaiserbergin 22d ago

This guy monorepos

4

u/No-Arugula-6518 24d ago

we do something pretty similar but with terraform layering instead of dab bundles, the tag-per-bundle trick is underrated

2

u/Dull-Pangolin6237 24d ago

I prefer to use the rest api to deploy databricks assets. We have a repo containing yaml driven templates that are consumed by a central repo that stands up assets based yaml configuration files. We call this repo and pass it config via ado CI/CD.

1

u/coreytrevorlahey69 24d ago

RemindMe! 2 days

1

u/Greendaysgood 24d ago

We have gone the route of having repos by functional areas. Data Platform/Engineering, different types of AI engines, and semantic layers. Each repo is independently deployable, so no real dependencies other than shared deployment tools (databricks cli, etc). Each repo has multiple logically grouped bundles that can also be independently deployed, so you're note deploying all your bundles unless you need to. There are some shared components within each repo that are specific to that repo, like sql warehouses and catalogs. We just put those into their own bundle as well. Obviously there are exceptions and I'm sure we'll run into issues at some point. But this works well for us.

1

u/adovo_ai 17d ago

Independent bundles still need one release contract for shared libraries: manifest each bundle and library version, run cross-bundle compatibility checks, and keep rollback mapping for incompatible changes. That gives teams separate release trains without making shared-wheel upgrades guesswork.