Repository navigation
Commit da6874a
direct: allow clearing custom_max_retention_hours (catalog and schema) (#6792)
Removing `custom_max_retention_hours` from a catalog or schema left the
old value in place — the field is `omitempty`, so it was dropped from
the update request and every later plan re-proposed the change.
Force-send it on catalog and schema updates.
Verified against a real AWS workspace with raw API calls:
`{"custom_max_retention_hours": 0}` clears it (create with 240h → PATCH
0 → GET returns 0) for both catalogs and schemas, whereas an empty PATCH
is otherwise rejected with "Nothing to update".
**Catalogs** are direct-only (no terraform converter —
`validate_direct_only_resources` rejects them in terraform mode), so
there is no cross-engine payload to diverge from. Flips
`catalog_optional_fields.custom_max_retention_hours` to `CAN_REMOVE`.
**Schemas** run through terraform, but the terraform `databricks_schema`
resource cannot set this field at all (it silently drops it), so a
schema config that uses it would drift under the `migrate` invariant.
Handled by:
- carrying the field on `schema.yml` (for the direct field-removal
check) and excluding `schema.yml` from `migrate`, and
- adding a terraform-compatible `schema_tf_compat.yml` that keeps
`migrate` coverage for schemas.
This pull request and its description were written by Isaac.
---------
Co-authored-by: Isaac <[email protected]>1 parent 7956221 commit da6874a
17 files changed
Lines changed: 53 additions & 17 deletions
File tree
- .nextchanges/bundles
- acceptance/bundle
- invariant
- configs
- continue_293
- delete_idempotent
- destroy_idempotent
- migrate
- no_drift
- resources
- catalogs/comment_out_of_band
- schemas
- comment_out_of_band
- update
- bundle/direct/dresources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments