From b58da4dd7509e091d2e8cfac4f4d80601f6c8bd6 Mon Sep 17 00:00:00 2001 From: Jan Rose Date: Sun, 12 Jul 2026 23:49:48 +0200 Subject: [PATCH 1/2] Make bundle command error more actionable if run without databricks.yml --- acceptance/bundle/run/inline-script/no-bundle/output.txt | 2 +- acceptance/bundle/run/inline-script/no-separator/output.txt | 2 +- bundle/root.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/acceptance/bundle/run/inline-script/no-bundle/output.txt b/acceptance/bundle/run/inline-script/no-bundle/output.txt index 870f682634f..4c41b8e366d 100644 --- a/acceptance/bundle/run/inline-script/no-bundle/output.txt +++ b/acceptance/bundle/run/inline-script/no-bundle/output.txt @@ -1,6 +1,6 @@ >>> [CLI] bundle run -- echo hello -Error: unable to locate bundle root: databricks.yml not found +Error: unable to locate bundle root: databricks.yml not found. Run 'databricks bundle init' to create a bundle, or run this command from a directory that already contains one Exit code: 1 diff --git a/acceptance/bundle/run/inline-script/no-separator/output.txt b/acceptance/bundle/run/inline-script/no-separator/output.txt index 7a35cab72e4..937988ce833 100644 --- a/acceptance/bundle/run/inline-script/no-separator/output.txt +++ b/acceptance/bundle/run/inline-script/no-separator/output.txt @@ -1,6 +1,6 @@ >>> [CLI] bundle run echo hello -Error: unable to locate bundle root: databricks.yml not found +Error: unable to locate bundle root: databricks.yml not found. Run 'databricks bundle init' to create a bundle, or run this command from a directory that already contains one Exit code: 1 diff --git a/bundle/root.go b/bundle/root.go index 9ea9a8c13fe..9f6f2c5f6bb 100644 --- a/bundle/root.go +++ b/bundle/root.go @@ -45,7 +45,7 @@ func getRootWithTraversal() (string, error) { } } - return "", fmt.Errorf(`unable to locate bundle root: %s not found`, config.FileNames[0]) + return "", fmt.Errorf(`unable to locate bundle root: %s not found. Run 'databricks bundle init' to create a bundle, or run this command from a directory that already contains one`, config.FileNames[0]) } // mustGetRoot returns a bundle root or an error if one cannot be found. From 3d0bfe269aad520c9ab5320ab5d6249eba48f489 Mon Sep 17 00:00:00 2001 From: Jan Rose Date: Fri, 17 Jul 2026 10:47:28 +0200 Subject: [PATCH 2/2] Changelog entry --- .nextchanges/bundles/warn-for-missing-databricks-yml.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nextchanges/bundles/warn-for-missing-databricks-yml.md diff --git a/.nextchanges/bundles/warn-for-missing-databricks-yml.md b/.nextchanges/bundles/warn-for-missing-databricks-yml.md new file mode 100644 index 00000000000..8f89ae17a47 --- /dev/null +++ b/.nextchanges/bundles/warn-for-missing-databricks-yml.md @@ -0,0 +1 @@ +Provide an actionable error message if databricks.yml is missing ([#5953](https://github.com/databricks/cli/pull/5953)).