Make bundle command error more actionable if run without databricks.yml#5953
Make bundle command error more actionable if run without databricks.yml#5953janniklasrose wants to merge 5 commits into
Conversation
Approval status: pending
|
Integration test reportCommit: efe4304
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 5 slowest tests (at least 2 minutes):
|
| } | ||
|
|
||
| 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]) |
There was a problem hiding this comment.
I wonder if we can use a diag here to make it render nicer.
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
There was a problem hiding this comment.
Addressed in the current PR instead to make errors prettier. Please review 🙂
Add a hint to
bundlecommands to runbundle initor change directory since databricks.yml wasn't found.