Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@

### Dependency updates

### Bundles
* Fix bundle init not working in Azure Government ([#4286](https://github.com/databricks/cli/pull/4286))

### API Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"project_name": "my_default_python",
"include_notebook": "yes",
"include_dlt": "yes",
"include_python": "yes",
"serverless": "no"
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

>>> [CLI] bundle init default-python --config-file ./input.json --output-dir output
Welcome to the default Python template for Databricks Asset Bundles!

Answer the following questions to customize your project.
You can always change your configuration in the databricks.yml file later.

Note that [DATABRICKS_URL] is used for initialization.
(For information on how to change your profile, see https://docs.databricks.com/dev-tools/cli/profiles.html.)

✨ Your new project has been created in the 'my_default_python' directory!

To get started, refer to the project README.md file and the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
trace $CLI bundle init default-python --config-file ./input.json --output-dir output

rm -rf output
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[[Server]]
Pattern = "GET /api/2.1/unity-catalog/current-metastore-assignment"
Response.StatusCode = 404
Response.Body = "{ \"error\": \"Bad Target: /api/2.1/unity-catalog/current-metastore-assignment\" }"
2 changes: 1 addition & 1 deletion libs/template/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func loadHelpers(ctx context.Context) template.FuncMap {
metastore, err := w.Metastores.Current(ctx)
if err != nil {
var aerr *apierr.APIError
if errors.As(err, &aerr) && slices.Contains(metastoreDisabledErrorCodes, aerr.ErrorCode) {
if errors.As(err, &aerr) && (slices.Contains(metastoreDisabledErrorCodes, aerr.ErrorCode) || aerr.Message == "Bad Target: /api/2.1/unity-catalog/current-metastore-assignment") {
// Ignore: access denied or workspace doesn't have a metastore assigned
empty_default := ""
cachedCatalog = &empty_default
Expand Down