Skip to content

Commit 865787a

Browse files
Update vector search index test fixtures based on cloud (#5366)
## Changes - Add missing/Fix parameters to DIRECT_ACCESS indexes - Enforce index name (3-part UC identifier) in test server - Change DELTA_SYNC to DIRECT_ACCESS - DELTA_SYNC requires a table, which is significant overhead for tests - Also change recreate test to recreate based on different parameter ## Why Cloud tests are failing ## Tests <!-- How have you tested the changes? --> <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. -->
1 parent ad37ce2 commit 865787a

40 files changed

Lines changed: 214 additions & 125 deletions

acceptance/bundle/deployment/bind/vector_search_index/databricks.yml.tmpl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ resources:
1212
primary_key: id
1313
index_type: DIRECT_ACCESS
1414
direct_access_index_spec:
15-
schema_json: '{"columns":[{"name":"id","type":"integer"}]}'
15+
schema_json: '{"id":"integer","vector":"array<float>"}'
16+
embedding_vector_columns:
17+
- name: vector
18+
embedding_dimension: 768

acceptance/bundle/deployment/bind/vector_search_index/out.test.toml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/deployment/bind/vector_search_index/output.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"endpoint_type": "STANDARD"
66
}
77

8-
>>> [CLI] vector-search-indexes create-index --json {"name":"main.default.test_vs_index_[UNIQUE_NAME]","endpoint_name":"test-vs-endpoint-[UNIQUE_NAME]","primary_key":"id","index_type":"DIRECT_ACCESS","direct_access_index_spec":{"schema_json":"{\"columns\":[{\"name\":\"id\",\"type\":\"integer\"}]}"}}
8+
>>> [CLI] vector-search-indexes create-index --json {"name":"main.default.test_vs_index_[UNIQUE_NAME]","endpoint_name":"test-vs-endpoint-[UNIQUE_NAME]","primary_key":"id","index_type":"DIRECT_ACCESS","direct_access_index_spec":{"schema_json":"{\"id\":\"integer\",\"vector\":\"array<float>\"}","embedding_vector_columns":[{"name":"vector","embedding_dimension":768}]}}
99
{
1010
"name": "main.default.test_vs_index_[UNIQUE_NAME]",
1111
"endpoint_name": "test-vs-endpoint-[UNIQUE_NAME]",

acceptance/bundle/deployment/bind/vector_search_index/script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ trap cleanup EXIT
1111

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

14-
trace $CLI vector-search-indexes create-index --json "{\"name\":\"${INDEX_NAME}\",\"endpoint_name\":\"${ENDPOINT_NAME}\",\"primary_key\":\"id\",\"index_type\":\"DIRECT_ACCESS\",\"direct_access_index_spec\":{\"schema_json\":\"{\\\"columns\\\":[{\\\"name\\\":\\\"id\\\",\\\"type\\\":\\\"integer\\\"}]}\"}}" | jq '{name, endpoint_name, index_type, primary_key}'
14+
trace $CLI vector-search-indexes create-index --json "{\"name\":\"${INDEX_NAME}\",\"endpoint_name\":\"${ENDPOINT_NAME}\",\"primary_key\":\"id\",\"index_type\":\"DIRECT_ACCESS\",\"direct_access_index_spec\":{\"schema_json\":\"{\\\"id\\\":\\\"integer\\\",\\\"vector\\\":\\\"array<float>\\\"}\",\"embedding_vector_columns\":[{\"name\":\"vector\",\"embedding_dimension\":768}]}}" | jq '{name, endpoint_name, index_type, primary_key}'
1515

1616
trace $CLI bundle deployment bind index1 "${INDEX_NAME}" --auto-approve
1717

acceptance/bundle/deployment/bind/vector_search_index/test.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ Local = true
22
Cloud = true
33
RequiresUnityCatalog = true
44

5+
# Vector Search indexes are slow to create, so only run them in the nightly (non-short) cloud job.
6+
CloudSlow = true
7+
58
Ignore = [
69
".databricks",
710
"databricks.yml",

acceptance/bundle/invariant/configs/vector_search_index.yml.tmpl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ resources:
88
endpoint_type: STANDARD
99
vector_search_indexes:
1010
foo:
11-
name: test-index-$UNIQUE_NAME
11+
name: main.default.test_index_$UNIQUE_NAME
1212
endpoint_name: ${resources.vector_search_endpoints.bar.name}
1313
primary_key: id
14-
index_type: DELTA_SYNC
15-
delta_sync_index_spec:
16-
source_table: main.default.source_$UNIQUE_NAME
17-
pipeline_type: TRIGGERED
14+
index_type: DIRECT_ACCESS
15+
direct_access_index_spec:
16+
schema_json: '{"id":"integer","vector":"array<float>"}'
17+
embedding_vector_columns:
18+
- name: vector
19+
embedding_dimension: 768

acceptance/bundle/resources/vector_search_indexes/basic/databricks.yml.tmpl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ resources:
1111
endpoint_type: STANDARD
1212
vector_search_indexes:
1313
my_index:
14-
name: vs-index-$UNIQUE_NAME
14+
name: main.default.vs_index_$UNIQUE_NAME
1515
endpoint_name: ${resources.vector_search_endpoints.my_endpoint.name}
1616
primary_key: id
17-
index_type: DELTA_SYNC
18-
delta_sync_index_spec:
19-
source_table: main.default.source_$UNIQUE_NAME
20-
pipeline_type: TRIGGERED
17+
index_type: DIRECT_ACCESS
18+
direct_access_index_spec:
19+
schema_json: '{"id":"integer","vector":"array<float>"}'
20+
embedding_vector_columns:
21+
- name: vector
22+
embedding_dimension: 768

acceptance/bundle/resources/vector_search_indexes/basic/out.requests.direct.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
"method": "POST",
33
"path": "/api/2.0/vector-search/indexes",
44
"body": {
5-
"delta_sync_index_spec": {
6-
"pipeline_type": "TRIGGERED",
7-
"source_table": "main.default.source_[UNIQUE_NAME]"
5+
"direct_access_index_spec": {
6+
"embedding_vector_columns": [
7+
{
8+
"embedding_dimension": 768,
9+
"name": "vector"
10+
}
11+
],
12+
"schema_json": "{\"id\":\"integer\",\"vector\":\"array<float>\"}"
813
},
914
"endpoint_name": "vs-endpoint-[UNIQUE_NAME]",
10-
"index_type": "DELTA_SYNC",
11-
"name": "vs-index-[UNIQUE_NAME]",
15+
"index_type": "DIRECT_ACCESS",
16+
"name": "main.default.vs_index_[UNIQUE_NAME]",
1217
"primary_key": "id"
1318
}
1419
}

acceptance/bundle/resources/vector_search_indexes/basic/out.test.toml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

acceptance/bundle/resources/vector_search_indexes/basic/output.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ Resources:
2121
URL: [DATABRICKS_URL]/compute/vector-search/vs-endpoint-[UNIQUE_NAME]?w=[NUMID]
2222
Vector Search Indexes:
2323
my_index:
24-
Name: vs-index-[UNIQUE_NAME]
25-
URL: (not deployed)
24+
Name: main.default.vs_index_[UNIQUE_NAME]
25+
URL: [DATABRICKS_URL]/explore/data/main/default/vs_index_[UNIQUE_NAME]?w=[NUMID]
2626

2727
>>> [CLI] bundle deploy
2828
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-vs-index-[UNIQUE_NAME]/default/files...
2929
Deploying resources...
3030
Updating deployment state...
3131
Deployment complete!
3232

33-
>>> [CLI] vector-search-indexes get-index vs-index-[UNIQUE_NAME]
33+
>>> [CLI] vector-search-indexes get-index main.default.vs_index_[UNIQUE_NAME]
3434
{
35-
"name": "vs-index-[UNIQUE_NAME]",
35+
"name": "main.default.vs_index_[UNIQUE_NAME]",
3636
"endpoint_name": "vs-endpoint-[UNIQUE_NAME]",
37-
"index_type": "DELTA_SYNC",
37+
"index_type": "DIRECT_ACCESS",
3838
"primary_key": "id"
3939
}
4040

@@ -51,8 +51,8 @@ Resources:
5151
URL: [DATABRICKS_URL]/compute/vector-search/vs-endpoint-[UNIQUE_NAME]?w=[NUMID]
5252
Vector Search Indexes:
5353
my_index:
54-
Name: vs-index-[UNIQUE_NAME]
55-
URL: (not deployed)
54+
Name: main.default.vs_index_[UNIQUE_NAME]
55+
URL: [DATABRICKS_URL]/explore/data/main/default/vs_index_[UNIQUE_NAME]?w=[NUMID]
5656

5757
>>> print_requests.py //vector-search/indexes
5858

0 commit comments

Comments
 (0)