Skip to content

Commit b634235

Browse files
authored
direct: model_serving: ignore budget_policy_id, rate_limits at plan level (#4638)
## Why Previously changing these fields would result in planned 'update' but DoUpdate is actually no-op for these, see https://github.com/databricks/cli/blob/10d976b5d086fb8993532bb5640b32cbd08fa106/bundle/direct/dresources/model_serving_endpoint.go#L288 Now, this will be skipped at plan level with appropriate reason. ## Tests No new tests, this a config-only change.
1 parent 393284c commit b634235

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

NEXT_CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
### Bundles
88
* Validate that either source_code_path or git_source is set for apps ([#4632](https://github.com/databricks/cli/pull/4632))
9+
* direct: model_serving_endpoints: ignore budget_policy_id, rate_limits changes in the plan. Previously they were ignored as well but action as "update". ([#4638](https://github.com/databricks/cli/pull/4638))
910

1011
### Dependency updates
1112

bundle/direct/dresources/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- The logic what kind of update it is should be in FieldTriggers / ClassifyChange methods. The methods performing update should not have logic in them on what method to call.
1111
- Create/Update/Delete methods should not need to read any state. (We can implement support for passing remoteState we already to these methods if such need arises though).
1212
- Prefer “with refresh” variants of methods if resource API supports that. That avoids explicit DoRead() call.
13+
- For update with complex logic, ensure that DoUpdate() does not result in no-op. If certain fields could not be updated, they should be excluded at plan level in resources.yml.
1314

1415
Nice to have
1516
- Add link to corresponding API documentation before each method.

bundle/direct/dresources/resources.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ resources:
227227
# Routes have custom SuppressDiff (lines 387-388)
228228
- field: config.traffic_config
229229
reason: managed
230+
- field: budget_policy_id
231+
reason: no_update_api
232+
# There is PublicPreview endpoints but we're not using it https://docs.databricks.com/api/workspace/servingendpoints/put
233+
- field: rate_limits
234+
reason: not_implemented
235+
ignore_local_changes:
236+
- field: budget_policy_id
237+
reason: no_update_api
238+
- field: rate_limits
239+
reason: not_implemented
230240
backend_defaults:
231241
# https://github.com/databricks/terraform-provider-databricks/blob/4eba541abe1a9f50993ea7b9dd83874207e224a1/serving/resource_model_serving.go#L383
232242
# common.CustomizeSchemaPath(m, "config", "served_entities", "name").SetComputed()

0 commit comments

Comments
 (0)