Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
21f14c2
Add testserver
janniklasrose Mar 25, 2026
0d8d10a
Add bundle/config/resources
janniklasrose Mar 25, 2026
7709fa9
[autogen] make schema
janniklasrose Mar 25, 2026
1373144
[autogen] make schema-for-docs
janniklasrose Mar 25, 2026
114911e
[autogen] make generate-validation
janniklasrose Mar 25, 2026
f252c6d
Fix endpoint URL
janniklasrose Mar 25, 2026
86a7ffe
Add bundle/direct/dresources
janniklasrose Mar 30, 2026
be3589d
Add generate-refschema target
janniklasrose Mar 30, 2026
c2692ec
[autogen] make generate-refschema
janniklasrose Mar 30, 2026
f31ca1e
Add TODO for budgetPolicyId
janniklasrose Mar 30, 2026
f10545a
[autogen] make generate-direct-resources
janniklasrose Mar 30, 2026
3603137
Add resources.yml override
janniklasrose Mar 30, 2026
0533a01
Ignore remote changes for budget_policy_id
janniklasrose Mar 30, 2026
ca87557
Add acceptance tests
janniklasrose Mar 30, 2026
e700521
Add invariant tests
janniklasrose Mar 30, 2026
885309a
Exclude from migrate invariant test
janniklasrose Mar 30, 2026
8d8f392
Fix tests
janniklasrose Mar 30, 2026
7a95921
Appease linters
janniklasrose Mar 30, 2026
63532ee
Add direct-only validation
janniklasrose Mar 30, 2026
56c99d9
Handle 404 in Exists
janniklasrose Mar 30, 2026
c95e932
[WIP] Add permissions, some gen'ed files
janniklasrose Apr 10, 2026
0b615d5
Comments
janniklasrose Apr 10, 2026
08c6565
Use wrapper for uuid for permissions
janniklasrose Apr 10, 2026
e5cbab8
Fix apply-bundle-permissions
janniklasrose Apr 13, 2026
08b590e
Add permissions acceptance test
janniklasrose Apr 13, 2026
097a2bf
Fix tests & schemas
janniklasrose Apr 13, 2026
bf43e56
Missing out.test.toml for permission test
janniklasrose Apr 13, 2026
bbe139f
Capture badness regarding permissions update if endpoint is updated
janniklasrose Apr 13, 2026
5bfac54
Add minQps to test server
janniklasrose Apr 13, 2026
733688f
Missing acceptance test files
janniklasrose Apr 13, 2026
6a153df
Merge branch 'main' into janniklasrose/vs-endpoint
janniklasrose Apr 13, 2026
b526c7f
Lint & generate-validation
janniklasrose Apr 13, 2026
484814f
Appease exhaustruct
janniklasrose Apr 13, 2026
908066b
Add changelog entry
janniklasrose Apr 13, 2026
3e736c0
Skip terraform-direct diff in permissions suite
janniklasrose Apr 13, 2026
4226c79
Add bind/unbind test
janniklasrose Apr 14, 2026
fff9fdc
Merge branch 'main' into janniklasrose/vs-endpoint
janniklasrose Apr 15, 2026
81394d1
Update changelog for Vector Search Endpoints support
denik Apr 16, 2026
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ test-update-templates:
generate-out-test-toml:
go test ./acceptance -run '^TestAccept$$' -only-out-test-toml -timeout=${LOCAL_TIMEOUT}

# Regenerate refschema for new resources
.PHONY: generate-refschema
generate-refschema:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be skipped, you get it automatically when running test-update (unless you reference it in some skill / doc, but then it should be part of that PR).

go test ./acceptance -run '^TestAccept/bundle/refschema$$' -update -timeout=${LOCAL_TIMEOUT}

# Updates acceptance test output (integration tests, requires access)
.PHONY: test-update-aws
test-update-aws:
Expand Down
1 change: 1 addition & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Fix resource references not correctly resolved in apps config section ([#4964](https://github.com/databricks/cli/pull/4964))
* Allow run_as for dashboards with embed_credentials set to false ([#4961](https://github.com/databricks/cli/pull/4961))
* direct: Pass changed fields into update mask for apps instead of wildcard ([#4963](https://github.com/databricks/cli/pull/4963))
* engine/direct: Added support for Vector Search Endpoints ([#4887](https://github.com/databricks/cli/pull/4887))

### Dependency updates

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
bundle:
name: test-bundle-$UNIQUE_NAME

sync:
paths: []

resources:
vector_search_endpoints:
endpoint1:
name: $ENDPOINT_NAME
endpoint_type: STANDARD

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,43 @@

>>> [CLI] vector-search-endpoints create-endpoint test-vs-endpoint-[UNIQUE_NAME] STANDARD
{
"id": "[UUID]",
"name": "test-vs-endpoint-[UNIQUE_NAME]",
"endpoint_type": "STANDARD"
}

>>> [CLI] bundle deployment bind endpoint1 test-vs-endpoint-[UNIQUE_NAME] --auto-approve
Updating deployment state...
Successfully bound vector_search_endpoint with an id 'test-vs-endpoint-[UNIQUE_NAME]'
Run 'bundle deploy' to deploy changes to your workspace

>>> [CLI] bundle deploy --auto-approve
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> [CLI] vector-search-endpoints get-endpoint test-vs-endpoint-[UNIQUE_NAME]
{
"id": "[UUID]",
"name": "test-vs-endpoint-[UNIQUE_NAME]",
"endpoint_type": "STANDARD"
}

>>> [CLI] bundle deployment unbind endpoint1
Updating deployment state...

>>> [CLI] bundle destroy --auto-approve
All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle-[UNIQUE_NAME]/default

Deleting files...
Destroy complete!

>>> [CLI] vector-search-endpoints get-endpoint test-vs-endpoint-[UNIQUE_NAME]
{
"id": "[UUID]",
"name": "test-vs-endpoint-[UNIQUE_NAME]",
"endpoint_type": "STANDARD"
}

>>> [CLI] vector-search-endpoints delete-endpoint test-vs-endpoint-[UNIQUE_NAME]
23 changes: 23 additions & 0 deletions acceptance/bundle/deployment/bind/vector_search_endpoint/script
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
ENDPOINT_NAME="test-vs-endpoint-$UNIQUE_NAME"
export ENDPOINT_NAME
envsubst < databricks.yml.tmpl > databricks.yml

cleanup() {
trace $CLI vector-search-endpoints delete-endpoint "${ENDPOINT_NAME}"
}
trap cleanup EXIT

trace $CLI vector-search-endpoints create-endpoint "${ENDPOINT_NAME}" STANDARD | jq '{id, name, endpoint_type}'

trace $CLI bundle deployment bind endpoint1 "${ENDPOINT_NAME}" --auto-approve

trace $CLI bundle deploy --auto-approve

trace $CLI vector-search-endpoints get-endpoint "${ENDPOINT_NAME}" | jq '{id, name, endpoint_type}'

trace $CLI bundle deployment unbind endpoint1

trace $CLI bundle destroy --auto-approve

# Read the pre-defined endpoint again (expecting it still exists and is not deleted):
trace $CLI vector-search-endpoints get-endpoint "${ENDPOINT_NAME}" | jq '{id, name, endpoint_type}'
10 changes: 10 additions & 0 deletions acceptance/bundle/deployment/bind/vector_search_endpoint/test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Local = true
Cloud = true

Ignore = [
".databricks",
"databricks.yml",
]

[EnvMatrix]
DATABRICKS_BUNDLE_ENGINE = ["direct"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bundle:
name: test-bundle-$UNIQUE_NAME

resources:
vector_search_endpoints:
foo:
name: test-endpoint-$UNIQUE_NAME
endpoint_type: STANDARD
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also add another config with permissions?

2 changes: 1 addition & 1 deletion acceptance/bundle/invariant/continue_293/out.test.toml

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

3 changes: 3 additions & 0 deletions acceptance/bundle/invariant/continue_293/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ EnvMatrixExclude.no_grant_ref = ["INPUT_CONFIG=schema_grant_ref.yml.tmpl"]

# Model permissions did not work until 0.297.0 https://github.com/databricks/cli/pull/4941
EnvMatrixExclude.no_model_with_permissions = ["INPUT_CONFIG=model_with_permissions.yml.tmpl"]

# vector_search_endpoints resource is not supported on v0.293.0
EnvMatrixExclude.no_vector_search_endpoint = ["INPUT_CONFIG=vector_search_endpoint.yml.tmpl"]
2 changes: 1 addition & 1 deletion acceptance/bundle/invariant/migrate/out.test.toml

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

3 changes: 3 additions & 0 deletions acceptance/bundle/invariant/migrate/test.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# vector_search_endpoints has no terraform converter
EnvMatrixExclude.no_vector_search_endpoint = ["INPUT_CONFIG=vector_search_endpoint.yml.tmpl"]

# Error: Catalog resources are only supported with direct deployment mode
EnvMatrixExclude.no_catalog = ["INPUT_CONFIG=catalog.yml.tmpl"]
EnvMatrixExclude.no_external_location = ["INPUT_CONFIG=external_location.yml.tmpl"]
Expand Down
2 changes: 1 addition & 1 deletion acceptance/bundle/invariant/no_drift/out.test.toml

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

1 change: 1 addition & 0 deletions acceptance/bundle/invariant/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ EnvMatrix.INPUT_CONFIG = [
"secret_scope_default_backend_type.yml.tmpl",
"secret_scope_with_permissions.yml.tmpl",
"synced_database_table.yml.tmpl",
"vector_search_endpoint.yml.tmpl",
"volume.yml.tmpl",
]

Expand Down
32 changes: 32 additions & 0 deletions acceptance/bundle/refschema/out.fields.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2885,6 +2885,38 @@ resources.synced_database_tables.*.spec.source_table_full_name string ALL
resources.synced_database_tables.*.spec.timeseries_key string ALL
resources.synced_database_tables.*.unity_catalog_provisioning_state database.ProvisioningInfoState ALL
resources.synced_database_tables.*.url string INPUT
resources.vector_search_endpoints.*.budget_policy_id string INPUT STATE
resources.vector_search_endpoints.*.creation_timestamp int64 REMOTE
resources.vector_search_endpoints.*.creator string REMOTE
resources.vector_search_endpoints.*.custom_tags []vectorsearch.CustomTag REMOTE
resources.vector_search_endpoints.*.custom_tags[*] vectorsearch.CustomTag REMOTE
resources.vector_search_endpoints.*.custom_tags[*].key string REMOTE
resources.vector_search_endpoints.*.custom_tags[*].value string REMOTE
resources.vector_search_endpoints.*.effective_budget_policy_id string REMOTE
resources.vector_search_endpoints.*.endpoint_status *vectorsearch.EndpointStatus REMOTE
resources.vector_search_endpoints.*.endpoint_status.message string REMOTE
resources.vector_search_endpoints.*.endpoint_status.state vectorsearch.EndpointStatusState REMOTE
resources.vector_search_endpoints.*.endpoint_type vectorsearch.EndpointType ALL
resources.vector_search_endpoints.*.endpoint_uuid string REMOTE
resources.vector_search_endpoints.*.id string INPUT REMOTE
resources.vector_search_endpoints.*.last_updated_timestamp int64 REMOTE
resources.vector_search_endpoints.*.last_updated_user string REMOTE
resources.vector_search_endpoints.*.lifecycle resources.Lifecycle INPUT
resources.vector_search_endpoints.*.lifecycle.prevent_destroy bool INPUT
resources.vector_search_endpoints.*.min_qps int64 INPUT STATE
resources.vector_search_endpoints.*.modified_status string INPUT
resources.vector_search_endpoints.*.name string ALL
resources.vector_search_endpoints.*.num_indexes int REMOTE
resources.vector_search_endpoints.*.scaling_info *vectorsearch.EndpointScalingInfo REMOTE
resources.vector_search_endpoints.*.scaling_info.requested_min_qps int64 REMOTE
resources.vector_search_endpoints.*.scaling_info.state vectorsearch.ScalingChangeState REMOTE
resources.vector_search_endpoints.*.url string INPUT
resources.vector_search_endpoints.*.permissions.object_id string ALL
resources.vector_search_endpoints.*.permissions[*] dresources.StatePermission ALL
resources.vector_search_endpoints.*.permissions[*].group_name string ALL
resources.vector_search_endpoints.*.permissions[*].level iam.PermissionLevel ALL
resources.vector_search_endpoints.*.permissions[*].service_principal_name string ALL
resources.vector_search_endpoints.*.permissions[*].user_name string ALL
resources.volumes.*.access_point string REMOTE
resources.volumes.*.browse_only bool REMOTE
resources.volumes.*.catalog_name string ALL
Expand Down
21 changes: 19 additions & 2 deletions acceptance/bundle/resources/permissions/analyze_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
Analyze all requests recorded in subtests to highlight differences between direct and terraform.
"""

import os
import re
import json
import re
import sys
import tomllib
from pathlib import Path
from difflib import unified_diff

Expand Down Expand Up @@ -91,6 +91,20 @@ def to_slash(x):
return str(x).replace("\\", "/")


def load_supported_engines(path):
current = path
while True:
for name in ("out.test.toml", "test.toml"):
config_file = current / name
if config_file.exists():
with config_file.open("rb") as fobj:
config = tomllib.load(fobj)
return set(config.get("EnvMatrix", {}).get("DATABRICKS_BUNDLE_ENGINE", []))
if current == Path("."):
return set()
current = current.parent


def main():
current_dir = Path(".")

Expand All @@ -104,10 +118,13 @@ def main():
terraform_file = direct_file.parent / direct_file.name.replace(".direct.", ".terraform.")

fname = to_slash(direct_file)
supported_engines = load_supported_engines(direct_file.parent)

if terraform_file.exists():
result, diff = compare_files(direct_file, terraform_file)
print(result + " " + fname + diff)
elif "terraform" not in supported_engines:
print(f"DIRECT_ONLY {fname}")
else:
print(f"ERROR {fname}: Missing terraform file {to_slash(terraform_file)}")

Expand Down
2 changes: 2 additions & 0 deletions acceptance/bundle/resources/permissions/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -411,3 +411,5 @@ DIFF target_permissions/out.requests_delete.direct.json
{
"body": {
"job_id": "[NUMID]"
DIRECT_ONLY vector_search_endpoints/current_can_manage/out.requests.deploy.direct.json
DIRECT_ONLY vector_search_endpoints/current_can_manage/out.requests.destroy.direct.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
bundle:
name: test-bundle

resources:
vector_search_endpoints:
foo:
name: vs-permissions-endpoint
endpoint_type: STANDARD
permissions:
- level: CAN_USE
user_name: viewer@example.com
- level: CAN_MANAGE
group_name: data-team
- level: CAN_MANAGE
service_principal_name: f37d18cd-98a8-4db5-8112-12dd0a6bfe38
- level: CAN_MANAGE
user_name: tester@databricks.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"plan_version": 2,
"cli_version": "[DEV_VERSION]",
"plan": {
"resources.vector_search_endpoints.foo": {
"action": "create",
"new_state": {
"value": {
"endpoint_type": "STANDARD",
"name": "vs-permissions-endpoint"
}
}
},
"resources.vector_search_endpoints.foo.permissions": {
"depends_on": [
{
"node": "resources.vector_search_endpoints.foo",
"label": "${resources.vector_search_endpoints.foo.endpoint_uuid}"
}
],
"action": "create",
"new_state": {
"value": {
"object_id": "",
"__embed__": [
{
"level": "CAN_USE",
"user_name": "viewer@example.com"
},
{
"level": "CAN_MANAGE",
"group_name": "data-team"
},
{
"level": "CAN_MANAGE",
"service_principal_name": "[UUID]"
},
{
"level": "CAN_MANAGE",
"user_name": "[USERNAME]"
}
]
},
"vars": {
"object_id": "/vector-search-endpoints/${resources.vector_search_endpoints.foo.endpoint_uuid}"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"method": "PUT",
"path": "/api/2.0/permissions/vector-search-endpoints/[UUID]",
"body": {
"access_control_list": [
{
"permission_level": "CAN_USE",
"user_name": "viewer@example.com"
},
{
"group_name": "data-team",
"permission_level": "CAN_MANAGE"
},
{
"permission_level": "CAN_MANAGE",
"service_principal_name": "[UUID]"
},
{
"permission_level": "CAN_MANAGE",
"user_name": "[USERNAME]"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"method": "DELETE",
"path": "/api/2.0/vector-search/endpoints/vs-permissions-endpoint"
}

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,35 @@

>>> [CLI] bundle validate -o json
[
{
"level": "CAN_USE",
"user_name": "viewer@example.com"
},
{
"group_name": "data-team",
"level": "CAN_MANAGE"
},
{
"level": "CAN_MANAGE",
"service_principal_name": "[UUID]"
},
{
"level": "CAN_MANAGE",
"user_name": "[USERNAME]"
}
]

>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> [CLI] bundle destroy --auto-approve
The following resources will be deleted:
delete resources.vector_search_endpoints.foo

All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default

Deleting files...
Destroy complete!
Loading