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)
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.