From f8d24f90bd0bd1b54c452787a73a6d6ee7c0e98c Mon Sep 17 00:00:00 2001 From: Jan Rose Date: Thu, 21 May 2026 11:55:08 +0200 Subject: [PATCH 1/3] Suggest bundle.engine config alternative in direct-only resource error Co-authored-by: Isaac --- .../bundle/validate/catalog_requires_direct_mode/output.txt | 2 +- bundle/config/mutator/validate_direct_only_resources.go | 2 +- .../config/mutator/validate_direct_only_resources_test.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/acceptance/bundle/validate/catalog_requires_direct_mode/output.txt b/acceptance/bundle/validate/catalog_requires_direct_mode/output.txt index 2bddbc154b0..c110f0aa7f9 100644 --- a/acceptance/bundle/validate/catalog_requires_direct_mode/output.txt +++ b/acceptance/bundle/validate/catalog_requires_direct_mode/output.txt @@ -1,7 +1,7 @@ Error: Catalog resources are only supported with direct deployment mode in databricks.yml:6:5 -Catalog resources require direct deployment mode. Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' to use catalog resources. +Catalog resources require direct deployment mode. Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' or set 'bundle.engine: direct' in your databricks.yml to use catalog resources. Learn more at https://docs.databricks.com/dev-tools/bundles/direct diff --git a/bundle/config/mutator/validate_direct_only_resources.go b/bundle/config/mutator/validate_direct_only_resources.go index 556b7b815a5..a76feb9482f 100644 --- a/bundle/config/mutator/validate_direct_only_resources.go +++ b/bundle/config/mutator/validate_direct_only_resources.go @@ -51,7 +51,7 @@ func (m *validateDirectOnlyResources) Apply(ctx context.Context, b *bundle.Bundl Severity: diag.Error, Summary: group.Description.SingularTitle + " resources are only supported with direct deployment mode", Detail: fmt.Sprintf("%s resources require direct deployment mode. "+ - "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' to use %s resources.\n"+ + "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' or set 'bundle.engine: direct' in your databricks.yml to use %s resources.\n"+ "Learn more at https://docs.databricks.com/dev-tools/bundles/direct", group.Description.SingularTitle, group.Description.SingularName), Locations: b.Config.GetLocations("resources." + group.Description.PluralName), diff --git a/bundle/config/mutator/validate_direct_only_resources_test.go b/bundle/config/mutator/validate_direct_only_resources_test.go index dbc184c752d..37c5b679cf4 100644 --- a/bundle/config/mutator/validate_direct_only_resources_test.go +++ b/bundle/config/mutator/validate_direct_only_resources_test.go @@ -61,7 +61,7 @@ func TestValidateDirectOnlyResourcesTerraformEngineDirectOnlyEmitsError(t *testi }, expectedSummary: "Catalog resources are only supported with direct deployment mode", expectedDetail: "Catalog resources require direct deployment mode. " + - "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' to use catalog resources.\n" + + "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' or set 'bundle.engine: direct' in your databricks.yml to use catalog resources.\n" + "Learn more at https://docs.databricks.com/dev-tools/bundles/direct", }, { @@ -77,7 +77,7 @@ func TestValidateDirectOnlyResourcesTerraformEngineDirectOnlyEmitsError(t *testi }, expectedSummary: "External Location resources are only supported with direct deployment mode", expectedDetail: "External Location resources require direct deployment mode. " + - "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' to use external_location resources.\n" + + "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' or set 'bundle.engine: direct' in your databricks.yml to use external_location resources.\n" + "Learn more at https://docs.databricks.com/dev-tools/bundles/direct", }, { @@ -93,7 +93,7 @@ func TestValidateDirectOnlyResourcesTerraformEngineDirectOnlyEmitsError(t *testi }, expectedSummary: "Vector Search Endpoint resources are only supported with direct deployment mode", expectedDetail: "Vector Search Endpoint resources require direct deployment mode. " + - "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' to use vector_search_endpoint resources.\n" + + "Please set the DATABRICKS_BUNDLE_ENGINE environment variable to 'direct' or set 'bundle.engine: direct' in your databricks.yml to use vector_search_endpoint resources.\n" + "Learn more at https://docs.databricks.com/dev-tools/bundles/direct", }, } From ed041cb571d2662bdf6152485b4575d0dde0febe Mon Sep 17 00:00:00 2001 From: Jan Rose Date: Thu, 21 May 2026 11:59:45 +0200 Subject: [PATCH 2/3] Add NEXT_CHANGELOG entry for direct-only resource error message Co-authored-by: Isaac --- NEXT_CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index abc781fc6c1..63b75f4172a 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -7,3 +7,4 @@ ### CLI ### Bundles +* The error reported when a direct-only resource (catalogs, external locations, vector search endpoints) is used with the terraform engine now also suggests setting `bundle.engine: direct` in `databricks.yml`, in addition to the `DATABRICKS_BUNDLE_ENGINE` environment variable. From 6794f35fa353f2fa51aaaedf1efaf78403862ff2 Mon Sep 17 00:00:00 2001 From: Jan Rose Date: Thu, 21 May 2026 12:33:30 +0200 Subject: [PATCH 3/3] NEXT_CHANGELOG: link PR for direct-only resource message update Co-authored-by: Isaac --- NEXT_CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 63b75f4172a..f2e569c609c 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -7,4 +7,4 @@ ### CLI ### Bundles -* The error reported when a direct-only resource (catalogs, external locations, vector search endpoints) is used with the terraform engine now also suggests setting `bundle.engine: direct` in `databricks.yml`, in addition to the `DATABRICKS_BUNDLE_ENGINE` environment variable. +* The error reported when a direct-only resource (catalogs, external locations, vector search endpoints) is used with the terraform engine now also suggests setting `bundle.engine: direct` in `databricks.yml`, in addition to the `DATABRICKS_BUNDLE_ENGINE` environment variable ([#5295](https://github.com/databricks/cli/pull/5295)).