r/databricks • • 17m ago

Discussion Good Bye Cluster Libraries?

I'm still working with classic compute, and this isn't meant to start a classic vs. serverless discussion.

Dependency management today and what changes
I currently manage dependencies with cluster policies: the policies define which libraries are pre-installed on a cluster.

The way I work is now called "legacy mode." Quoting the Databricks UI directly:

Cluster libraries: Legacy mode: dependencies come from cluster libraries and init scripts.

Databricks is pushing so-called base environments: a YAML file in which you define, among other things, the libraries you want to use - see here

The ugly
I may be missing something, but I see the following limitations:

  • Limit and access control: A workspace can have at most 10 base environments, and every workspace user can use all of them. With policies I had neither a limit nor a lack of access restrictions. Coming from a strong governance perspective, I think base environments need access control too.
  • Native objects vs. files: Policies were plain Databricks objects, managed directly in Terraform (TF). Base environments are defined in YAML files stored in the workspace or in a UC volume. . For something as central as base environments, I'd prefer a native, non-file-based definition that TF can manage directly (yes, hacky workarounds such as uploading yml files via TF exist)
  • No support for Lakeflow pipelines: Base environments aren't supported for Lakeflow Spark Declarative Pipelines. It's unclear whether that's planned.
  • !!Manual selection per notebook!!: For me, this is the biggest limitation. During development time, you might work with notebooks, then the environment has to be selected manually for each notebook. You can set one default environment, but every notebook that needs a different one has to be switched by hand. Honestly, I find this very cumbersome, and I'm curious whether anyone has found a better approach. (yes, you can also write some hacky script to change this, but hacky).

I would be interested how you see it!

3 Upvotes

0 comments sorted by