Make bundle command error more actionable if run without databricks.yml - #5953
Merged
janniklasrose merged 5 commits intoJul 21, 2026
Merged
Conversation
Collaborator
Integration test reportCommit: efe4304
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 5 slowest tests (at least 2 minutes):
|
pietern
reviewed
Jul 20, 2026
| } | ||
|
|
||
| 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]) |
Contributor
There was a problem hiding this comment.
I wonder if we can use a diag here to make it render nicer.
Contributor
Author
There was a problem hiding this comment.
It already gets printed via logdiag.LogError inside the caller's err != nil but that lacks the Details field. Can do a follow-up to have bundle/root.go return diag.Diagnostics instead for richer errors
Contributor
Author
There was a problem hiding this comment.
Addressed in the current PR instead to make errors prettier. Please review 🙂
janniklasrose
deleted the
janniklasrose/bundle-warn-on-missing-databricks-yml
branch
July 21, 2026 20:43
Collaborator
Integration test reportCommit: c8746be
653 interesting tests: 645 FAIL, 6 KNOWN, 2 SKIP
Top 7 slowest tests (at least 2 minutes):
|
tanishgupta-db
pushed a commit
to tanishgupta-db/cli
that referenced
this pull request
Jul 21, 2026
## Changes - Slim down the "default-minimal" template to use during `databricks bundle init` by parameterizing the underlying template to python-specific vs generic content - Create an alias "empty" ## Why Related: databricks#5953 Make it easier to get started with bundles: Running `bundle generate` requires a `databricks.yml`, and all the other existing templates created by `bundle init` add way more than needed for the workflow of: ```sh databricks bundle init empty databricks bundle generate ... ``` ## Tests Updated tests for all three permutations of `default-minimal` Manual: ``` % ./cli bundle init empty Welcome to the minimal Declarative Automation Bundle template! This template creates a minimal project structure without sample code, ideal for advanced users. (For getting started with Python or SQL code, use the default-python or default-sql templates instead.) Your workspace at https://dogfood.staging.databricks.com is used for initialization. (See https://docs.databricks.com/dev-tools/cli/profiles.html for how to change your profile.) Unique name for this project [my_project]: Default catalog for any tables created by this project [main]: Initial language for this project: skip ✨ Your new project has been created in the 'my_project' directory! To get started, refer to the project README.md file and the documentation at https://docs.databricks.com/dev-tools/bundles/index.html. % tree -a my_project my_project ├── .gitignore ├── .vscode │ ├── extensions.json │ └── settings.json ├── databricks.yml ├── README.md ├── resources └── src 4 directories, 5 files ``` Expected golden outputs: [acceptance/bundle/templates/default-minimal/](https://github.com/databricks/cli/tree/janniklasrose/bundle-init-improvements/acceptance/bundle/templates/default-minimal)
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Jul 22, 2026
## Release v1.9.0 ### CLI * `databricks auth profiles` no longer stalls on an unreachable workspace and instead fails validation after 5 seconds per host ([#5928](#5928)). * Fixed `databricks fs rm -r` failing on UC Volumes backed by GCS when a directory becomes empty during recursive deletion ([#5958](#5958)). * You can now ask questions about your data directly from the CLI with `databricks genie ask "..."`. Genie answers natural-language questions ("what were total sales last month?", "which tables are in the sales catalog?"), runs the query inside Databricks, and renders the answer in the terminal. This promotes the former `databricks experimental genie ask` command; the experimental alias still works but is deprecated and will be removed in a future release ([#6010](#6010)). ### Bundles * `bundle validate` now reports a clear error when a `sql_warehouse` is missing a `name` (including whitespace-only names), and a warning when a grant is missing a `principal` ([#5818](#5818)). * Bundle templates now scaffold an `AGENTS.md` that points coding agents at Databricks AI Tools, alongside a minimal `CLAUDE.md` that includes it via `@AGENTS.md` ([#5996](#5996)). * `bundle generate job` can now download workspace files referenced by `spark_python_task`, rewriting them to a relative path like it already does for notebooks. This is opt-in via the `--download-spark-python-files` flag ([#5799](#5799)). * Simplified the `default-minimal` bundle template and added an alias `databricks bundle init empty` ([#5899](#5899)). * Add support for the `instance_pools` resource type in Declarative Automation Bundles. Instance pools are only supported in direct deployment mode. * Do not emit "unknown field" warnings for YAML anchors grouped in a list or map, matching the existing suppression for standalone anchors ([#5975](#5975)). * Provide an actionable error message if databricks.yml is missing or DATABRICKS_BUNDLE_ROOT is invalid ([#5953](#5953)). ### Dependency Updates * Bump `github.com/databricks/databricks-sdk-go` from v0.154.0 to v0.160.0 ([#5982](#5982)). * Bump Terraform provider from v1.121.0 to v1.122.0 ([#5977](#5977)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a hint to
bundlecommands to runbundle initor change directory since databricks.yml wasn't found.