Immutable folder support in DABs#5254
Conversation
Integration test reportCommit: 60e41d3
25 interesting tests: 13 SKIP, 6 RECOVERED, 3 flaky, 3 FAIL
Top 22 slowest tests (at least 2 minutes):
|
Approval status: pending
|
shreyas-goenka
left a comment
There was a problem hiding this comment.
Minor comments - other than the bit where we use metadata.json
| @@ -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"` | |||
There was a problem hiding this comment.
Will the UI use the immutable snapshot path? In that case we'll need to add it to DMS as well.
| // Allows running the full test suite against the immutable folder code path without | ||
| // modifying any databricks.yml files. | ||
| mutator.OverrideImmutableFolder(), | ||
|
|
There was a problem hiding this comment.
Yes, this is only used for test
| }) | ||
| } | ||
| return acl | ||
| } |
There was a problem hiding this comment.
Nit: can live in a different file.
Changes
Added support for deploying bundles to immutable folders in the workspace
When
experimental.immutable_folder: trueis 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:
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