Skip to content

Conversation

@kanterov
Copy link
Collaborator

@kanterov kanterov commented Aug 8, 2025

Changes

Add volume resource type support to Python

Why

It makes it possible to define volumes with Python code, similar to jobs and pipelines

Tests

Acceptance and unit tests

from dataclasses import replace

from databricks.bundles.core import volume_mutator
from databricks.bundles.catalog import Volume
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JSON schema volumes are located in the "catalog" namespace. We need to decide whether to vendor them into a separate namespace (e.g. databricks.bundles.volumes) or co-locate them with "catalog" objects.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pietern I think databricks.bundles.volumes will be a better option. We should keep each resource contained. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think following the schema makes it easier to navigate for someone already familiar with any of the SDKs, no?

What's the advantage of separate module per each resource?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are switching to a model where each service will have an independent set of classes. That is how SDK v1, which is replacing SDK v0, is built. So, if we want to be consistent with it, we should follow the same approach. It simplifies making major/breaking changes because they can be isolated to a particular namespace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to that. Prefer separate namespace over using catalog now and having to retrofit one later when the SDK moves on. Mental model is also simpler, as the "boundary" here is the resource.

@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Aug 8, 2025

Run: 17132097479

Env ✅‌pass 🙈‌skip
✅‌ aws linux 310 487
✅‌ aws windows 311 486
✅‌ aws-ucws linux 424 385
✅‌ aws-ucws windows 425 384
✅‌ azure linux 310 486
✅‌ azure windows 311 485
✅‌ azure-ucws linux 426 382
✅‌ azure-ucws windows 427 381
✅‌ gcp linux 309 488
✅‌ gcp windows 310 487

from dataclasses import replace

from databricks.bundles.core import volume_mutator
from databricks.bundles.catalog import Volume
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think following the schema makes it easier to navigate for someone already familiar with any of the SDKs, no?

What's the advantage of separate module per each resource?

Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

from dataclasses import replace

from databricks.bundles.core import volume_mutator
from databricks.bundles.catalog import Volume
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to that. Prefer separate namespace over using catalog now and having to retrofit one later when the SDK moves on. Mental model is also simpler, as the "boundary" here is the resource.

@kanterov kanterov temporarily deployed to test-trigger-is August 21, 2025 15:50 — with GitHub Actions Inactive
@kanterov kanterov enabled auto-merge August 21, 2025 16:13
@kanterov kanterov added this pull request to the merge queue Aug 21, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2025
## Changes
Add volume resource type support to Python

## Why
It makes it possible to define volumes with Python code, similar to jobs
and pipelines

## Tests
Acceptance and unit tests
Merged via the queue into main with commit 0297797 Aug 21, 2025
19 checks passed
@kanterov kanterov deleted the add-volumes branch August 21, 2025 16:47
deco-sdk-tagging bot added a commit that referenced this pull request Aug 27, 2025
## Release v0.266.0

### Notable Changes
* Breaking change: DABs now return an error when paths are incorrectly defined relative to the job or
pipeline definition location instead of the configuration file location. Previously, the CLI would show a
warning and fallback to resolving the path relative to the resource location. Users must update their bundle
configurations to define all relative paths relative to the configuration file where the path is specified.
See more details here: ([#3225](#3225))
* Add support volumes in Python support ([#3383])(#3383))

### Bundles
* [Breaking Change] Remove deprecated path fallback mechanism for jobs and pipelines ([#3225](#3225))
* Add support for Lakebase synced database tables in DABs ([#3467](#3467))
* Rename Delta Live Tables to Lakeflow Declarative Pipelines in the default-python template ([#3476](#3476)).
* Fixed bundle init not working on Standard tier ([#3496](#3496))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants