Skip to content
Merged
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
1 change: 1 addition & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ([#5295](https://github.com/databricks/cli/pull/5295)).
Original file line number Diff line number Diff line change
@@ -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


Expand Down
2 changes: 1 addition & 1 deletion bundle/config/mutator/validate_direct_only_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions bundle/config/mutator/validate_direct_only_resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
{
Expand All @@ -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",
},
{
Expand All @@ -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",
},
}
Expand Down
Loading