Repository navigation
Commit cc3bcd3
Treat backend-populated immutable fields as backend defaults by default (#6790)
An immutable (`recreate_on_changes`) field the bundle config never set
but the backend populated — `old` and `new` nil, `remote` set — is now
left in place instead of triggering delete + create, reported as
`immutable_backend_value`.
This generalizes the `trace_location` fix
([#6787](#6787)) to **every**
optional immutable field: the user isn't managing the field, and
recreating to drop a backend-populated immutable value is destructive.
The check is shape-based (config-absent + backend-present), so it only
fires when the user omitted the field; a genuine change to an immutable
field still recreates.
### Fields that already behaved this way (explicit `backend_defaults`,
now removed — implicit)
These had a hand-written `backend_defaults` entry that duplicated the
new implicit rule; removed here:
| Field | Prior link |
|---|---|
| `secret_scopes.scope_backend_type` |
[#4834](#4834); note this field is
also `missing_in_remote`, so the entry was already inert |
| `volumes.storage_location` |
[#5145](#5145) (external volumes)
|
| `experiments.artifact_location` | initial direct-engine field
classification |
| `experiments.trace_location` |
[#6787](#6787) |
| `registered_models.storage_location` | initial direct-engine field
classification |
| `pipelines.storage` | initial direct-engine field classification |
| `model_serving_endpoints.route_optimized` | was
`values:[false]`-restricted; now unconditional |
| `vector_search_indexes.index_subtype` | initial direct-engine field
classification |
`backend_defaults` entries on **non**-recreate fields are kept (e.g.
`pipelines.clusters[*].node_type_id`,
`model_serving_endpoints.config.traffic_config`,
`registered_models.owner/full_name/metastore_id`).
### Fields newly covered by the implicit default
Previously these would recreate on a config-absent, backend-populated
value; now left in place. (Impact is real only for the subset the
backend actually populates when omitted — flagged **⚠**.)
- **catalogs**: `storage_root` ⚠, `connection_name`, `provider_name`,
`share_name`
- **schemas**: `storage_root` ⚠
- **dashboards**: `parent_path` ⚠
- **model_serving_endpoints**: `config.auto_capture_config.catalog_name`
⚠, `.schema_name` ⚠, `.table_name_prefix` ⚠, `description`
- **quality_monitors**: `assets_dir` ⚠
- **volumes**: `volume_type` ⚠
- **vector_search_indexes**: `index_type`, `primary_key`,
`endpoint_name`, `delta_sync_index_spec`, `direct_access_index_spec`
(non-ignored leaves)
- **vector_search_endpoints**: `endpoint_type` ⚠
- **external_locations**: `credential_name`, `encryption_details`,
`file_event_queue`
- **database_instances**: `parent_instance_ref` (non-ignored leaves)
- **instance_pools**: `disk_spec`, `node_type_flexibility`,
`preloaded_spark_versions`, `preloaded_docker_images`
- **pipelines**: `gateway_definition.*`, `ingestion_definition.*`
- **model_provider_services**: `config.provider_type`
- **postgres_roles**: `parent`, `role_id`
- **secrets**: `catalog_name`, `name`, `schema_name` (identity fields;
inert in practice)
### Whole-struct (field-less) recreate resources
These declare the entire resource immutable (`recreate_on_changes: -
reason: immutable`). Any config-absent, backend-populated field is now
left in place rather than recreating the whole resource:
`database_catalogs`, `internal_immutable_snapshots`, `job_runs`,
`postgres_synced_tables`, `synced_database_tables`, `postgres_catalogs`.
(`job_runs`' re-run-on-result-state logic is driven by
`OverrideChangeDesc`, which runs after classification and is
unaffected.)
### Not affected
- Recreate fields already covered by `ignore_remote_changes` (already
skipped when config-absent): `postgres_branches.*`,
`postgres_endpoints.endpoint_type`, `postgres_projects.pg_version`,
`postgres_roles.{postgres_role,auth_method,identity_type}`,
`postgres_catalogs.postgres_database`,
`experiments.trace_location.uc_trace_location.effective_table_prefix`,
`vector_search_indexes.direct_access_index_spec.schema_json`,
`database_instances.parent_instance_ref.{uid,lsn,effective_lsn}`.
- `missing_in_remote` recreate fields (never echoed, so the shape can't
occur):
`secret_scopes.{scope_backend_type,backend_azure_keyvault,initial_manage_principal}`.
### Testing
`TestRecreateBackendDefault` covers the new classifier path directly on
real adapters; plan goldens that show the skip are updated from
`backend_default` to `immutable_backend_value`.
This pull request and its description were written by Isaac.
Co-authored-by: Isaac <[email protected]>1 parent bac9be9 commit cc3bcd3
29 files changed
Lines changed: 105 additions & 60 deletions
File tree
- .nextchanges/bundles
- acceptance/bundle
- migrate
- basic
- default-python
- resource_deps/remote_pipeline
- resources
- grants/volumes
- permissions/pipelines/update
- pipelines
- recreate-keys/change-ingestion-definition
- remote_matches_config
- vector_search_indexes/recreate/with_endpoint
- volumes
- change-name
- comment_out_of_band
- uppercase-name
- templates/default-python/classic
- bundle
- deployplan
- direct
- dresources/configs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
0 commit comments