Skip to content
Draft
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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed `telemetry_config` on model serving endpoints never converging on the direct engine: the field is only accepted on create and is never returned by the serving endpoints GET API, so every subsequent `bundle plan` reported the endpoint as a perpetual update. Changing `telemetry_config` on a deployed endpoint no longer plans an update that cannot be applied, since the API has no method to update it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
bundle:
name: test-bundle-$UNIQUE_NAME

resources:
model_serving_endpoints:
foo:
name: test-endpoint-$UNIQUE_NAME
telemetry_config:
inference_table_config:
sampling_fraction: 0.5
1 change: 1 addition & 0 deletions 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.

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

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/migrate/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/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 @@ -48,6 +48,7 @@ EnvMatrix.INPUT_CONFIG = [
"model.yml.tmpl",
"model_with_permissions.yml.tmpl",
"model_serving_endpoint.yml.tmpl",
"model_serving_endpoint_telemetry_config.yml.tmpl",
"pipeline.yml.tmpl",
"pipeline_allow_duplicate_names.yml.tmpl",
"pipeline_apply_policy_default_values.yml.tmpl",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bundle:
name: test-bundle

resources:
model_serving_endpoints:
endpoint1:
name: test-endpoint
config:
served_entities:
- name: prod
external_model:
name: gpt-4o-mini
provider: openai
task: llm/v1/chat
openai_config:
openai_api_key_plaintext: sk-test-plaintext-key
traffic_config:
routes:
- served_model_name: prod
traffic_percentage: 100
telemetry_config:
inference_table_config:
sampling_fraction: 0.5

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

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

=== Plan is a no-op even though telemetry_config does not round-trip
>>> [CLI] bundle plan
Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged

=== telemetry_config is skipped (confirms the matched rules)
>>> [CLI] bundle plan --output json
{
"config.served_entities[0].external_model.openai_config.openai_api_key_plaintext": {
"action": "skip",
"reason": "input_only",
"old": "sk-test-plaintext-key",
"new": "sk-test-plaintext-key",
"remote": ""
},
"description": {
"action": "skip",
"reason": "empty",
"remote": ""
},
"route_optimized": {
"action": "skip",
"reason": "empty",
"remote": false
},
"telemetry_config": {
"action": "skip",
"reason": "input_only",
"old": {
"inference_table_config": {
"sampling_fraction": 0.5
}
},
"new": {
"inference_table_config": {
"sampling_fraction": 0.5
}
}
}
}

=== Changing telemetry_config plans nothing: it is create-only
>>> [CLI] bundle plan
Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged

=== Redeploy is a no-op (no config/ai-gateway/tags update calls)
>>> [CLI] bundle deploy
Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
Deploying resources...
Updating deployment state...
Deployment complete!

>>> print_requests.py //serving-endpoints
{
"method": "POST",
"path": "/api/2.0/serving-endpoints",
"body": {
"config": {
"served_entities": [
{
"external_model": {
"name": "gpt-4o-mini",
"openai_config": {
"openai_api_key_plaintext": "sk-test-plaintext-key"
},
"provider": "openai",
"task": "llm/v1/chat"
},
"name": "prod"
}
],
"traffic_config": {
"routes": [
{
"served_model_name": "prod",
"traffic_percentage": 100
}
]
}
},
"name": "test-endpoint",
"telemetry_config": {
"inference_table_config": {
"sampling_fraction": 0.5
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
echo "*" > .gitignore

title "Initial deployment"
trace $CLI bundle deploy

title "Plan is a no-op even though telemetry_config does not round-trip"
trace $CLI bundle plan | contains.py "Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged"

title "telemetry_config is skipped (confirms the matched rules)"
trace $CLI bundle plan --output json | jq '.plan[].changes'

title "Changing telemetry_config plans nothing: it is create-only"
update_file.py databricks.yml "sampling_fraction: 0.5" "sampling_fraction: 0.9"
trace $CLI bundle plan | contains.py "Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged"

title "Redeploy is a no-op (no config/ai-gateway/tags update calls)"
trace $CLI bundle deploy
trace print_requests.py //serving-endpoints
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
RecordRequests = true

# Scope this regression to the direct engine where the classification lives.
EnvMatrix.DATABRICKS_BUNDLE_ENGINE = ["direct"]
6 changes: 6 additions & 0 deletions bundle/direct/dresources/resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ resources:
# Accepted on write but not returned by GET.
- field: config.served_entities[*].burst_scaling_enabled
reason: input_only
# Remote always reads back empty, so without this it never converges.
- field: telemetry_config
reason: input_only
# Write-only secrets: the backend stores them and returns the reference field, not the plaintext.
- field: config.served_entities[*].external_model.ai21labs_config.ai21labs_api_key_plaintext
reason: input_only
Expand Down Expand Up @@ -309,6 +312,9 @@ resources:
reason: no_update_api
- field: rate_limits
reason: not_implemented
# Only exists on CreateServingEndpoint; no update API accepts it.
- field: telemetry_config
reason: no_update_api
backend_defaults:
# https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/serving/resource_model_serving.go#L383
# common.CustomizeSchemaPath(m, "config", "served_entities", "name").SetComputed()
Expand Down
Loading