Conversation
8942939 to
5a45a0b
Compare
file_path is an internal path when the immutable folder option is toggled on, and thus has no username or shortname in the path.
5a45a0b to
469eeeb
Compare
|
An authorized user can trigger integration tests manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
simonfaltum
left a comment
There was a problem hiding this comment.
I found two issues with enabling immutable folders in development mode. The focused Go tests and existing immutable-path acceptance test pass, but that acceptance test does not exercise development mode. Details inline.
| if b.Config.Workspace.FilePath != "" && !containsName(b.Config.Workspace.FilePath) { | ||
| return "file_path" | ||
| } | ||
| if b.Config.Workspace.ArtifactPath != "" && !containsName(b.Config.Workspace.ArtifactPath) { |
There was a problem hiding this comment.
An explicitly configured workspace.artifact_path survives DefineDefaultWorkspacePaths because it only fills empty values, but this guard now skips it for every immutable bundle. For example, with artifact_path: /Workspace/Shared/libs, a job library at ${workspace.artifact_path}/.internal/pkg.whl resolves to that shared path, while immutable deployment packages the wheel under the snapshot's artifacts/.internal and skips the normal library upload. The job can point to a missing or stale wheel. Please reject an explicit artifact_path in immutable mode, as TranslatePaths already does for file_path, or restrict this exemption to the generated snapshot path. The new test at line 184 uses an explicit /Shared path and would need to change accordingly.
| } | ||
| if b.Config.Workspace.FilePath != "" && !containsName(b.Config.Workspace.FilePath) { | ||
| return "file_path" | ||
| if !b.IsImmutableFolder() { |
There was a problem hiding this comment.
On Databricks Runtime, development mode automatically enables source-linked deployment for bundles under /Workspace. With immutable folders enabled, TranslatePaths sends relative resource paths to the snapshot, but ${workspace.file_path} references in resources still resolve to the mutable sync root through the source-linked lookup. This skip makes that combination pass validation, so a single job can mix snapshot paths with source-tree paths that change without a deploy. Please disable source linking for immutable bundles or make those references resolve to the snapshot; a full-pipeline development-mode test would catch the mismatch.
Changes
Skip checking
file_pathandartifact_pathfor username or shortname ifexperimental.immutable_folderis set to true.Why
With #6084, immutable folders are uploaded as an internal resource, And as such they do not have either username or shortname within the
file_pathorartifact_path, This causes a validation failure on development mode when performingdatabricks bundle deploy. The error currently being:Tests
Added a test to validate
FindNoneUserPath().Version
The bug is reproducible on databricks CLI
v1.18.0.