Skip to content

Commit b7faa0d

Browse files
authored
Merge branch 'main' into simonfaltum/b39-python-tmpdir-leak
2 parents decbd9a + 983a9b0 commit b7faa0d

55 files changed

Lines changed: 588 additions & 19761 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/rules/auto-generated-files.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ globs:
1414
- "internal/genkit/tagging.py"
1515
- "internal/mocks/**/*.go"
1616
- "bundle/direct/dresources/*.generated.yml"
17-
- "bundle/docsgen/output/**/*.md"
1817
- "bundle/internal/schema/annotations_openapi.yml"
1918
- "bundle/internal/validation/generated/*.go"
2019
- "bundle/schema/jsonschema.json"
@@ -36,7 +35,6 @@ paths:
3635
- "internal/genkit/tagging.py"
3736
- "internal/mocks/**/*.go"
3837
- "bundle/direct/dresources/*.generated.yml"
39-
- "bundle/docsgen/output/**/*.md"
4038
- "bundle/internal/schema/annotations_openapi.yml"
4139
- "bundle/internal/validation/generated/*.go"
4240
- "bundle/schema/jsonschema.json"
@@ -75,8 +73,6 @@ Files matching this rule's glob pattern are most likely generated artifacts. Aut
7573
- `./task generate-schema`
7674
- `./task generate-schema-docs`
7775
- This can also refresh `bundle/internal/schema/annotations_openapi.yml` when OpenAPI annotation extraction is enabled.
78-
- Bundle docs:
79-
- `./task generate-docs`
8076
- Validation generated code:
8177
- `./task generate-validation`
8278
- Mock files:

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ linters:
6262
no-stdlib-log:
6363
files:
6464
- "**"
65-
- "!**/bundle/docsgen/**"
6665
- "!**/bundle/internal/schema/**"
6766
- "!**/bundle/internal/tf/codegen/**"
6867
- "!**/bundle/internal/validation/**"

.wsignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,3 @@ python/databricks/bundles/*/_models/*.py
2626

2727
# Developed elsewhere:
2828
internal/genkit/tagging.py
29-
30-
# Docsgen:
31-
bundle/docsgen/output/resources.md
32-
bundle/docsgen/output/reference.md
33-
bundle/docsgen/testdata/anchors.md

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ This is the Databricks CLI, a command-line interface for interacting with Databr
4040
### Specialized Commands
4141

4242
- `./task generate-schema` - Generate bundle JSON schema
43-
- `./task generate-docs` - Generate bundle documentation
4443
- `./task generate-cligen` - Regenerate CLI command stubs from the checked-in .codegen/cli.json
4544
- `./task generate-clijson` - Refresh .codegen/cli.json from the OpenAPI spec via genkit (requires universe repo)
4645
- `./task generate` - Run all generators

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* Remove API enum values and types that are still in development from the `databricks-bundles` Python package; these were never accepted by the backend ([#5484](https://github.com/databricks/cli/pull/5484)).
1212
* direct: Fix resolving a resource reference that is used more than once within the same field ([#5558](https://github.com/databricks/cli/pull/5558)).
1313
* Bundle variable references now accept Unicode letters in path segments (e.g. `${var.变量}`). ([#5532](https://github.com/databricks/cli/pull/5532))
14+
* Ignore remote changes for vector search direct_access_index_spec.schema_json to prevent drift when the backend normalizes the schema ([#5481](https://github.com/databricks/cli/pull/5481)).
1415

1516
### Dependency updates
1617

Taskfile.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ tasks:
5757
- task: generate-schema-map
5858
- task: generate-schema-docs
5959
- task: generate-validation
60-
- task: generate-docs
6160
- task: generate-direct
6261
- task: pydabs-codegen
6362
- task: pydabs-lint
@@ -743,7 +742,6 @@ tasks:
743742
- task: generate-schema
744743
- task: generate-schema-docs
745744
- task: generate-validation
746-
- task: generate-docs
747745
- task: generate-direct
748746
- task: pydabs-codegen
749747

@@ -765,7 +763,6 @@ tasks:
765763
- task: generate-refschema
766764
- task: generate-schema
767765
- task: generate-validation
768-
- task: generate-docs
769766
- task: generate-direct
770767
- task: pydabs-codegen
771768

@@ -861,12 +858,12 @@ tasks:
861858

862859
# Regenerates the OpenAPI annotation files (annotations_openapi*.yml) from the
863860
# checked-in .codegen/cli.json. This is the step that propagates a cli.json
864-
# change into the schema/docs artifacts: generate-schema, generate-schema-docs
865-
# and generate-docs all depend on it, so editing cli.json and running
866-
# `task generate` percolates into jsonschema.json, the docs and pydabs.
861+
# change into the schema/docs artifacts: generate-schema and generate-schema-docs
862+
# both depend on it, so editing cli.json and running `task generate`
863+
# percolates into jsonschema.json, jsonschema_for_docs.json and pydabs.
867864
generate-annotations:
868865
desc: Regenerate annotation files from .codegen/cli.json
869-
# Dep of generate-schema, generate-schema-docs and generate-docs; `run: once`
866+
# Dep of generate-schema and generate-schema-docs; `run: once`
870867
# plus the fingerprint keep `task generate` from re-running it per parent.
871868
run: once
872869
sources:
@@ -913,23 +910,6 @@ tasks:
913910
- git fetch origin 'refs/tags/v*:refs/tags/v*'
914911
- "go run ./bundle/internal/schema ./bundle/internal/schema ./bundle/schema/jsonschema_for_docs.json --docs"
915912

916-
generate-docs:
917-
desc: Generate bundle documentation
918-
deps: ['generate-annotations']
919-
sources:
920-
- "**/*.go"
921-
- bundle/docsgen/templates/**
922-
- bundle/internal/schema/annotations*.yml
923-
- exclude: "**/*_test.go"
924-
- go.mod
925-
- go.sum
926-
- "{{.EMBED_SOURCES}}"
927-
generates:
928-
- bundle/docsgen/output/reference.md
929-
- bundle/docsgen/output/resources.md
930-
cmds:
931-
- "go run ./bundle/docsgen ./bundle/internal/schema ./bundle/docsgen"
932-
933913
generate-validation:
934914
desc: Generate enum and required field validation code
935915
sources:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ resources:
1212
primary_key: id
1313
index_type: DIRECT_ACCESS
1414
direct_access_index_spec:
15-
schema_json: '{"id":"integer","vector":"array<float>"}'
15+
schema_json: '{"id":"int","vector":"array<float>"}'
1616
embedding_vector_columns:
1717
- name: vector
1818
embedding_dimension: 768

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":"{\"id\":\"integer\",\"vector\":\"array<float>\"}","embedding_vector_columns":[{"name":"vector","embedding_dimension":768}]}}
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\":\"int\",\"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\":\"{\\\"id\\\":\\\"integer\\\",\\\"vector\\\":\\\"array<float>\\\"}\",\"embedding_vector_columns\":[{\"name\":\"vector\",\"embedding_dimension\":768}]}}" | 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\\\":\\\"int\\\",\\\"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/resources/vector_search_indexes/recreate/with_endpoint/output.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged
6969
"name": "vector"
7070
}
7171
],
72-
"schema_json": "{\"id\":\"integer\",\"vector\":\"array\u003cfloat\u003e\"}"
72+
"schema_json": "{\"id\":\"int\",\"vector\":\"array\u003cfloat\u003e\"}"
7373
},
7474
"endpoint_name": "vs-endpoint-[UNIQUE_NAME]",
7575
"endpoint_uuid": "[UUID]",
@@ -82,6 +82,13 @@ Plan: 1 to add, 0 to change, 1 to delete, 1 unchanged
8282
}
8383
},
8484
"changes": {
85+
"direct_access_index_spec.schema_json": {
86+
"action": "skip",
87+
"reason": "normalized_by_backend",
88+
"old": "{\"id\":\"integer\",\"vector\":\"array\u003cfloat\u003e\"}",
89+
"new": "{\"id\":\"integer\",\"vector\":\"array\u003cfloat\u003e\"}",
90+
"remote": "{\"id\":\"int\",\"vector\":\"array\u003cfloat\u003e\"}"
91+
},
8592
"endpoint_uuid": {
8693
"action": "skip",
8794
"reason": "state-only field",

0 commit comments

Comments
 (0)