File tree Expand file tree Collapse file tree 7 files changed +38
-1
lines changed
acceptance/bundle/templates/default-python/no-uc Expand file tree Collapse file tree 7 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -18,5 +18,6 @@ See more details here: ([#3225](https://github.com/databricks/cli/pull/3225))
1818* [ Breaking Change] Remove deprecated path fallback mechanism for jobs and pipelines ([ #3225 ] ( https://github.com/databricks/cli/pull/3225 ) )
1919* Add support for Lakebase synced database tables in DABs ([ #3467 ] ( https://github.com/databricks/cli/pull/3467 ) )
2020* Rename Delta Live Tables to Lakeflow Declarative Pipelines in the default-python template ([ #3476 ] ( https://github.com/databricks/cli/pull/3476 ) ).
21+ * Fixed bundle init not working on Standard tier ([ #3496 ] ( https://github.com/databricks/cli/pull/3496 ) )
2122
2223### API Changes
Original file line number Diff line number Diff line change 1+ {
2+ "project_name" : " my_default_python" ,
3+ "include_notebook" : " yes" ,
4+ "include_dlt" : " yes" ,
5+ "include_python" : " yes" ,
6+ "serverless" : " no"
7+ }
Original file line number Diff line number Diff line change 1+ Local = true
2+ Cloud = false
3+
4+ [EnvMatrix ]
5+ DATABRICKS_CLI_DEPLOYMENT = [" terraform" , " direct-exp" ]
Original file line number Diff line number Diff line change 1+
2+ >>> [CLI] bundle init default-python --config-file ./input.json --output-dir output
3+
4+ Welcome to the default Python template for Databricks Asset Bundles!
5+ Workspace to use (auto-detected, edit in 'my_default_python/databricks.yml'): [DATABRICKS_URL]
6+
7+ ✨ Your new project has been created in the 'my_default_python' directory!
8+
9+ Please refer to the README.md file for "getting started" instructions.
10+ See also the documentation at https://docs.databricks.com/dev-tools/bundles/index.html.
Original file line number Diff line number Diff line change 1+ trace $CLI bundle init default-python --config-file ./input.json --output-dir output
2+
3+ rm -rf output
Original file line number Diff line number Diff line change 1+ [[Server ]]
2+ Pattern = " GET /api/2.1/unity-catalog/current-metastore-assignment"
3+ Response.StatusCode = 404
4+ Response.Body = " {\" error_code\" : \" FEATURE_DISABLED\" , \" message\" : \" Unity Catalog is not available for feature tier STANDARD_TIER.\" }"
Original file line number Diff line number Diff line change 88 "net/url"
99 "os"
1010 "regexp"
11+ "slices"
1112 "strings"
1213 "text/template"
1314
3839 cachedCatalog * string
3940)
4041
42+ var metastoreDisabledErrorCodes = []string {
43+ "PERMISSION_DENIED" ,
44+ "METASTORE_DOES_NOT_EXIST" , // Default metastore is not assigned to the workspace.
45+ "FEATURE_DISABLED" , // Unity Catalog is not available for feature tier STANDARD_TIER.
46+ }
47+
4148// UUID that is stable for the duration of the template execution. This can be used
4249// to populate the `bundle.uuid` field in databricks.yml by template authors.
4350//
@@ -141,7 +148,7 @@ func loadHelpers(ctx context.Context) template.FuncMap {
141148 metastore , err := w .Metastores .Current (ctx )
142149 if err != nil {
143150 var aerr * apierr.APIError
144- if errors .As (err , & aerr ) && ( aerr . ErrorCode == "PERMISSION_DENIED" || aerr .ErrorCode == "METASTORE_DOES_NOT_EXIST" ) {
151+ if errors .As (err , & aerr ) && slices . Contains ( metastoreDisabledErrorCodes , aerr .ErrorCode ) {
145152 // Ignore: access denied or workspace doesn't have a metastore assigned
146153 empty_default := ""
147154 cachedCatalog = & empty_default
You can’t perform that action at this time.
0 commit comments