From a15146956972c9a482f8e040980e12fa764fca0a Mon Sep 17 00:00:00 2001 From: Rada Kamysheva Date: Tue, 23 Jun 2026 08:51:47 +0000 Subject: [PATCH 1/2] acc: run deploy/files/no-snapshot-sync locally Enable the no-snapshot-sync acceptance test to run against the local testserver in addition to cloud. The test already passes end-to-end locally; the only divergence was the wording of the "missing path" error from workspace get-status ("Workspace path not found" on the testserver vs "Path (...) doesn't exist." on the real API), so a test-scoped Repls normalizes both to a stable token. --- .../bundle/deploy/files/no-snapshot-sync/out.test.toml | 2 +- .../bundle/deploy/files/no-snapshot-sync/output.txt | 4 ++-- .../bundle/deploy/files/no-snapshot-sync/test.toml | 9 ++++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/acceptance/bundle/deploy/files/no-snapshot-sync/out.test.toml b/acceptance/bundle/deploy/files/no-snapshot-sync/out.test.toml index 650836edeb3..bbc7fcfd1bd 100644 --- a/acceptance/bundle/deploy/files/no-snapshot-sync/out.test.toml +++ b/acceptance/bundle/deploy/files/no-snapshot-sync/out.test.toml @@ -1,3 +1,3 @@ -Local = false +Local = true Cloud = true EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["terraform", "direct"] diff --git a/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt b/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt index 5ed1d5aa884..1d7859f7c9e 100644 --- a/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt +++ b/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt @@ -50,12 +50,12 @@ Deployment complete! === Check that removed files are not in the workspace anymore >>> errcode [CLI] workspace get-status /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/test.py -Error: Path (/Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/test.py) doesn't exist. +Error: [WORKSPACE_PATH_NOT_FOUND] Exit code: 1 >>> errcode [CLI] workspace get-status /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/notebook -Error: Path (/Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/notebook) doesn't exist. +Error: [WORKSPACE_PATH_NOT_FOUND] Exit code: 1 diff --git a/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml b/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml index 7653e8c8194..7e04e28e0c0 100644 --- a/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml +++ b/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml @@ -1,10 +1,17 @@ -Local = false +Local = true Cloud = true Ignore = [ "databricks.yml", ] +# The local testserver and the real workspace API word the "missing path" error +# differently ("Workspace path not found" vs "Path (...) doesn't exist."), so +# normalize both to a stable token to keep one golden valid for local and cloud. +[[Repls]] +Old = 'Error: (Path \(.*?\) doesn.t exist\.|Workspace path not found)' +New = 'Error: [WORKSPACE_PATH_NOT_FOUND]' + [Env] # MSYS2 automatically converts absolute paths like /Users/$username/$UNIQUE_NAME to # C:/Program Files/Git/Users/$username/UNIQUE_NAME before passing it to the CLI From 6577451eab4712ed1a9518dd55fa347c848065ce Mon Sep 17 00:00:00 2001 From: Rada Kamysheva Date: Wed, 24 Jun 2026 07:30:11 +0000 Subject: [PATCH 2/2] acc: make fake workspace return the real "path doesn't exist" wording Match the real Workspace API error wording in the testserver instead of normalizing it with a repl, and update affected goldens accordingly. --- acceptance/bundle/deploy/files/no-snapshot-sync/output.txt | 4 ++-- acceptance/bundle/deploy/files/no-snapshot-sync/test.toml | 7 ------- .../bundle/deploy/files/out-of-band-delete/output.txt | 2 +- acceptance/selftest/server/output.txt | 2 +- acceptance/workspace/repos/delete_by_path/output.txt | 2 +- acceptance/workspace/repos/get_errors/output.txt | 2 +- libs/testserver/fake_workspace.go | 3 ++- 7 files changed, 8 insertions(+), 14 deletions(-) diff --git a/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt b/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt index 1d7859f7c9e..5ed1d5aa884 100644 --- a/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt +++ b/acceptance/bundle/deploy/files/no-snapshot-sync/output.txt @@ -50,12 +50,12 @@ Deployment complete! === Check that removed files are not in the workspace anymore >>> errcode [CLI] workspace get-status /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/test.py -Error: [WORKSPACE_PATH_NOT_FOUND] +Error: Path (/Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/test.py) doesn't exist. Exit code: 1 >>> errcode [CLI] workspace get-status /Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/notebook -Error: [WORKSPACE_PATH_NOT_FOUND] +Error: Path (/Workspace/Users/[USERNAME]/.bundle/[UNIQUE_NAME]/files/notebook) doesn't exist. Exit code: 1 diff --git a/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml b/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml index 7e04e28e0c0..e2a0ac696d1 100644 --- a/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml +++ b/acceptance/bundle/deploy/files/no-snapshot-sync/test.toml @@ -5,13 +5,6 @@ Ignore = [ "databricks.yml", ] -# The local testserver and the real workspace API word the "missing path" error -# differently ("Workspace path not found" vs "Path (...) doesn't exist."), so -# normalize both to a stable token to keep one golden valid for local and cloud. -[[Repls]] -Old = 'Error: (Path \(.*?\) doesn.t exist\.|Workspace path not found)' -New = 'Error: [WORKSPACE_PATH_NOT_FOUND]' - [Env] # MSYS2 automatically converts absolute paths like /Users/$username/$UNIQUE_NAME to # C:/Program Files/Git/Users/$username/UNIQUE_NAME before passing it to the CLI diff --git a/acceptance/bundle/deploy/files/out-of-band-delete/output.txt b/acceptance/bundle/deploy/files/out-of-band-delete/output.txt index 8ac61e622b7..e769969ddca 100644 --- a/acceptance/bundle/deploy/files/out-of-band-delete/output.txt +++ b/acceptance/bundle/deploy/files/out-of-band-delete/output.txt @@ -23,7 +23,7 @@ Updating deployment state... Deployment complete! >>> musterr [CLI] workspace get-status /Workspace/Users/[USERNAME]/.bundle/out-of-band-delete/default/files/hello_world.py -Error: Workspace path not found +Error: Path (/Workspace/Users/[USERNAME]/.bundle/out-of-band-delete/default/files/hello_world.py) doesn't exist. === Removing the sync snapshot forces a full re-upload, restoring the python_file >>> rm -rf .databricks/bundle/default/sync-snapshots diff --git a/acceptance/selftest/server/output.txt b/acceptance/selftest/server/output.txt index 7147f9c9bef..01748017e83 100644 --- a/acceptance/selftest/server/output.txt +++ b/acceptance/selftest/server/output.txt @@ -16,6 +16,6 @@ custom response >>> errcode [CLI] workspace get-status /a/b/c -Error: Workspace path not found +Error: Path (/a/b/c) doesn't exist. Exit code: 1 diff --git a/acceptance/workspace/repos/delete_by_path/output.txt b/acceptance/workspace/repos/delete_by_path/output.txt index 3f888863e06..d522cbd027d 100644 --- a/acceptance/workspace/repos/delete_by_path/output.txt +++ b/acceptance/workspace/repos/delete_by_path/output.txt @@ -14,6 +14,6 @@ >>> [CLI] repos delete /Repos/me@databricks.com/test-repo >>> [CLI] repos get /Repos/me@databricks.com/test-repo -o json -Error: failed to look up repo by path: Workspace path not found +Error: failed to look up repo by path: Path (/Repos/me@databricks.com/test-repo) doesn't exist. Exit code: 1 diff --git a/acceptance/workspace/repos/get_errors/output.txt b/acceptance/workspace/repos/get_errors/output.txt index 5eda2b1b643..443f30491f3 100644 --- a/acceptance/workspace/repos/get_errors/output.txt +++ b/acceptance/workspace/repos/get_errors/output.txt @@ -1,6 +1,6 @@ >>> [CLI] repos get /Repos/me@databricks.com/doesnotexist -o json -Error: failed to look up repo by path: Workspace path not found +Error: failed to look up repo by path: Path (/Repos/me@databricks.com/doesnotexist) doesn't exist. >>> [CLI] repos get /not-a-repo -o json Error: object at path "/not-a-repo" is not a repo diff --git a/libs/testserver/fake_workspace.go b/libs/testserver/fake_workspace.go index d2925fb1e38..4fb2e1b9da7 100644 --- a/libs/testserver/fake_workspace.go +++ b/libs/testserver/fake_workspace.go @@ -363,9 +363,10 @@ func (s *FakeWorkspace) WorkspaceGetStatus(path string) Response { }, } } else { + // Match the real Workspace API wording, which echoes the requested path. return Response{ StatusCode: 404, - Body: map[string]string{"message": "Workspace path not found"}, + Body: map[string]string{"message": fmt.Sprintf("Path (%s) doesn't exist.", path)}, } } }