Repository navigation
Add isolation_mode to the catalogs resource - #7463
Conversation
resources.Catalog embeds the SDK's CreateCatalog, which has no isolation_mode because the Create API does not accept it (UC only takes it on UpdateCatalog). The bundle schema is derived from that struct, so `bundle validate` rejected the field, and the direct engine hard-coded IsolationMode to "" in both update paths and dropped the remote value in RemapState. Add IsolationMode to resources.Catalog and introduce CatalogState (CreateCatalog plus isolation_mode) as the direct-engine state type. DoCreate issues a single-field UpdateCatalog after a successful create when the field is set; DoUpdate/DoUpdateWithID pass it through; RemapState carries the remote value so plan and drift detection see it. A backend_defaults rule makes an unset field leave the remote mode alone (UC reports OPEN for new catalogs and keeps the current mode when an update omits the field). The test server now reports OPEN on create, as UC does. Regenerates the JSON schema, enum validation, refschema output, direct engine api types and the pydabs models. Co-authored-by: Isaac <no-reply@databricks.com>
isolation_mode to the catalogs resource,
isolation_mode to the catalogs resource,isolation_mode to the catalogs resource
|
Commit: Regression test reportSelected 8 changed tests (limit=20, 0 not selected) 17 tests: regression=8 unreleased=0 coverage=9 failing=0
TestAccept/bundle/refschema/DMS=: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): same output as main (4eeacdb) TestAccept/bundle/refschema/DMS=true: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): same output as main (4eeacdb) TestAccept/bundle/resources/catalogs/comment_out_of_band/DMS=: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): same output as main (4eeacdb) TestAccept/bundle/resources/catalogs/comment_out_of_band/DMS=true: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): TestAccept/bundle/resources/catalogs/drift/managed_properties/DMS=: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): same output as main (4eeacdb) TestAccept/bundle/resources/catalogs/drift/managed_properties/DMS=true: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): same output as main (4eeacdb) TestAccept/bundle/resources/catalogs/isolation_mode/DMS=: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): TestAccept/bundle/resources/catalogs/isolation_mode/DMS=true: branch ✅ | main (4eeacdb) ❌ | latest (v1.26.0) ❌main (4eeacdb): latest (v1.26.0): |
✅ Integration test reportCommit: 57a8180
Top 30 slowest tests (at least 2 minutes):
|
| Options: nil, | ||
| Owner: "", | ||
| Properties: nil, | ||
| ForceSendFields: nil, |
There was a problem hiding this comment.
should FSF be coped from source?
There was a problem hiding this comment.
nevermind, I see that this only to update isolation_mode, so can we be skipped
There was a problem hiding this comment.
I'd keep it nil. The config's ForceSendFields only names zero values the user set explicitly (comment: "", custom_max_retention_hours: 0), and Create has already applied those one call earlier, so copying them would just re-send the same zero values in the PATCH for no effect. This follow-up is deliberately a single-field patch ({"isolation_mode": "ISOLATED"}, see the recorded request in the isolation_mode acceptance test), and the force-send list should match the fields the request actually carries, same as the targeted PatchEndpoint call in vector_search_endpoint.go. DoUpdate keeps the full list because it sends all of those fields from config; applying that list to this skeleton would send comment: "" and clear what Create just set.
Main commit 8b4f052 (#7003) gave the acceptance `title` helper a trailing newline, so every `=== Section` header is now followed by a blank line. The isolation_mode golden was generated before that change and went stale when main was merged into this branch. Co-authored-by: Isaac <no-reply@databricks.com>
❌ Integration test reportCommit: cec3f63
82 interesting tests: 70 FAIL, 10 KNOWN, 2 RECOVERED
Top 50 slowest tests (at least 2 minutes):
|
Changes
Fixes #5183
isolation_mode(OPEN/ISOLATED) is now accepted underresources.catalogs.*and applied by the direct engine.resources.Cataloggains anIsolationModefield alongside the embeddedCreateCatalog, so the JSON schema, enum validation and pydabs models include it.CatalogState(CreateCatalog+isolation_mode). Because the Create API does not accept the field,DoCreateissues a single-fieldUpdateCatalogright after a successful create when the field is set;DoUpdate/DoUpdateWithIDpass it through;RemapStatecarries the remote value so plan and drift detection see it.backend_defaultsrule makes an unsetisolation_modeleave the remote value alone (UC reportsOPENfor new catalogs, and an update that omits the field keeps the current mode).isolation_mode: OPENon create, matching UC.Workspace bindings are not managed by this change; the schema description says so.
Why
The field is a documented Unity Catalog attribute but was rejected by
bundle validate, forcing users to set it manually after each deploy. The maintainers had confirmed the blocker was the Create/Update API asymmetry.Tests
acceptance/bundle/resources/catalogs/isolation_mode: validate accepts the field; deploy records the create plus the follow-up patch; replan is a no-op; removing the field leaves the remote mode in place (plan shows abackend_defaultskip); settingOPENpatches the catalog.catalog_optional_fields.yml.tmplinvariant config now carriesisolation_mode: ISOLATED # CAN_REMOVE.bundle/direct/dresources/catalog_test.goandlibs/testserver/catalogs_test.go; the shared CRUD fixture setsISOLATEDsoTestAllcovers the create-then-update path.comment_out_of_bandanddrift/managed_properties(they now show theisolation_modebackend-default skip).This PR was written by Claude Code.