Skip to content

Immutable folder support in DABs#5254

Merged
andrewnester merged 34 commits into
mainfrom
demo-immutable
Jun 25, 2026
Merged

Immutable folder support in DABs#5254
andrewnester merged 34 commits into
mainfrom
demo-immutable

Conversation

@andrewnester

@andrewnester andrewnester commented May 15, 2026

Copy link
Copy Markdown
Contributor

Changes

Added support for deploying bundles to immutable folders in the workspace

When experimental.immutable_folder: true is set, the CLI packages all bundle source files and built artifacts into a single zip archive and uploads it as a content-addressed, immutable snapshot. The snapshot path is derived from the content hash of the zip, so identical code always lands at the same location and re-deploying an unchanged bundle is a no-op at the storage layer.

This mode is currently supported with the direct deployment engine only (DATABRICKS_BUNDLE_ENGINE=direct).

Example databricks.yml:

bundle:
  name: my-bundle

experimental:
  immutable_folder: true

resources:
  jobs:
    my_job:
      name: my-job
      tasks:
        - task_key: main
          python_script_task:
            python_file: ./src/main.py

After bundle deploy, the job's python_file resolves to a path like:

/Workspace/Users/[UUID]/.snapshots///src/files/src/main.py

Tests

Added an acceptance tests

@andrewnester andrewnester requested a review from pietern May 15, 2026 09:56
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: a601876

Run: 28177935465

Env 🟨​KNOWN 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 1 13 240 1030 5:34
🟨​ aws windows 7 1 13 242 1028 8:38
💚​ aws-ucws linux 8 13 327 947 5:07
💚​ aws-ucws windows 8 13 329 945 6:16
💚​ azure linux 2 15 243 1028 4:46
💚​ azure windows 2 15 245 1026 5:38
💚​ azure-ucws linux 2 15 332 943 5:12
💚​ azure-ucws windows 2 15 334 941 5:46
💚​ gcp linux 2 15 242 1030 4:04
💚​ gcp windows 2 15 244 1028 5:39
21 interesting tests: 13 SKIP, 7 KNOWN, 1 RECOVERED
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 🟨​K 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🟨​K 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🟨​K 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 4 slowest tests (at least 2 minutes):
duration env testname
3:58 aws-ucws windows TestAccept
3:38 gcp windows TestAccept
3:20 azure windows TestAccept
3:12 azure-ucws windows TestAccept

@andrewnester andrewnester marked this pull request as ready for review June 1, 2026 11:34
@andrewnester andrewnester requested a review from denik June 2, 2026 10:01

@shreyas-goenka shreyas-goenka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Minor comments - other than the bit where we use metadata.json

Comment thread bundle/phases/deploy.go Outdated
Comment thread bundle/metadata/metadata.go Outdated
@@ -15,6 +15,9 @@ type Bundle struct {

type Workspace struct {
FilePath string `json:"file_path"`
// SnapshotPath is the workspace path of the immutable snapshot uploaded
// during deployment. Only populated for bundles with bundle.immutable = true.
SnapshotPath string `json:"snapshot_path,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will the UI use the immutable snapshot path? In that case we'll need to add it to DMS as well.

Comment thread bundle/deploy/snapshot/upload.go Outdated
Comment thread bundle/deploy/snapshot/client.go
Comment thread bundle/deploy/snapshot/path_test.go Outdated
Comment thread bundle/deploy/metadata/load.go Outdated
Comment thread bundle/config/mutator/translate_paths.go Outdated
Comment thread bundle/config/mutator/resolve_variable_references.go
Comment thread bundle/config/mutator/resourcemutator/process_static_resources.go Outdated
Comment thread acceptance/bundle/deploy/immutable/output.txt Outdated

@pietern pietern left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please take a final pass on the remaining comments (this review and previous ones).

Comment thread bundle/phases/initialize.go
Comment thread bundle/phases/build.go
@andrewnester andrewnester added this pull request to the merge queue Jun 25, 2026
@pietern pietern removed this pull request from the merge queue due to a manual request Jun 25, 2026
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.

4 participants