From 7cf178c37d4e4f80061feae79323e3f0f5d7b243 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 11 Jun 2026 16:19:17 +0200 Subject: [PATCH] Fix direct-engine genie_spaces apitype drift genie_spaces (#5282) was mapped to dashboards.GenieSpace, but #5484 refreshed cli.json without re-running generate-direct. Regenerating flips the field-overlap matcher to dashboards.GenieUpdateSpaceRequest, which drops the output-only etag ignore_remote_changes behavior: GenieSpace.etag is OUTPUT_ONLY, whereas on GenieUpdateSpaceRequest it is a caller-supplied optimistic-concurrency token. Pin genie_spaces to dashboards.GenieSpace via the apitypes.yml override to keep the etag behavior, and refresh the doc artifacts that had also gone stale. Co-authored-by: Isaac --- .../direct/dresources/apitypes.generated.yml | 2 +- bundle/direct/dresources/apitypes.yml | 7 ++++ bundle/docsgen/output/reference.md | 2 +- bundle/docsgen/output/resources.md | 2 +- bundle/schema/jsonschema_for_docs.json | 40 +++++++++++++------ 5 files changed, 38 insertions(+), 15 deletions(-) diff --git a/bundle/direct/dresources/apitypes.generated.yml b/bundle/direct/dresources/apitypes.generated.yml index 069f8dbbe5f..93faba8ad5a 100644 --- a/bundle/direct/dresources/apitypes.generated.yml +++ b/bundle/direct/dresources/apitypes.generated.yml @@ -18,7 +18,7 @@ experiments: ml.CreateExperiment external_locations: catalog.CreateExternalLocation -genie_spaces: dashboards.GenieSpace +genie_spaces: dashboards.GenieUpdateSpaceRequest jobs: jobs.JobSettings diff --git a/bundle/direct/dresources/apitypes.yml b/bundle/direct/dresources/apitypes.yml index 7d478be47f7..eabb39021cf 100644 --- a/bundle/direct/dresources/apitypes.yml +++ b/bundle/direct/dresources/apitypes.yml @@ -4,6 +4,13 @@ # Set a value to null to remove a type: # jobs: null +# The field-overlap heuristic ties GenieSpace and GenieUpdateSpaceRequest and +# breaks the tie toward GenieUpdateSpaceRequest because GenieSpace carries one +# extra field (space_id). Pin GenieSpace: its etag is OUTPUT_ONLY (server-managed), +# so we ignore remote changes to it, whereas on GenieUpdateSpaceRequest etag is a +# caller-supplied optimistic-concurrency token and that behavior is lost. +genie_spaces: dashboards.GenieSpace + postgres_branches: postgres.BranchSpec postgres_endpoints: postgres.EndpointSpec diff --git a/bundle/docsgen/output/reference.md b/bundle/docsgen/output/reference.md index 44965f6376c..e8e1c08da94 100644 --- a/bundle/docsgen/output/reference.md +++ b/bundle/docsgen/output/reference.md @@ -1,7 +1,7 @@ --- description: 'Configuration reference for databricks.yml' last_update: - date: 2026-06-09 + date: 2026-06-11 --- diff --git a/bundle/docsgen/output/resources.md b/bundle/docsgen/output/resources.md index 273ef066a2b..f86d82e7e78 100644 --- a/bundle/docsgen/output/resources.md +++ b/bundle/docsgen/output/resources.md @@ -1,7 +1,7 @@ --- description: 'Learn about resources supported by Declarative Automation Bundles and how to configure them.' last_update: - date: 2026-06-09 + date: 2026-06-11 --- diff --git a/bundle/schema/jsonschema_for_docs.json b/bundle/schema/jsonschema_for_docs.json index 05547efa830..522f8e38acf 100644 --- a/bundle/schema/jsonschema_for_docs.json +++ b/bundle/schema/jsonschema_for_docs.json @@ -747,31 +747,46 @@ "type": "object", "properties": { "description": { - "$ref": "#/$defs/string" + "description": "Description of the Genie space shown alongside the title in the Databricks UI.", + "$ref": "#/$defs/string", + "x-since-version": "v1.3.0" + }, + "etag": { + "$ref": "#/$defs/string", + "x-since-version": "v1.3.0" }, "file_path": { - "$ref": "#/$defs/string" + "description": "Local path to a `.geniespace.json` file holding the serialized Genie space definition. The contents are inlined into `serialized_space` at deploy time. Mutually exclusive with an inline `serialized_space`.", + "$ref": "#/$defs/string", + "x-since-version": "v1.3.0" }, "lifecycle": { - "$ref": "#/$defs/github.com/databricks/cli/bundle/config/resources.Lifecycle" + "$ref": "#/$defs/github.com/databricks/cli/bundle/config/resources.Lifecycle", + "x-since-version": "v1.3.0" }, "parent_path": { - "$ref": "#/$defs/string" + "description": "Workspace folder under which to create the Genie space. Immutable: changing this field recreates the resource.", + "$ref": "#/$defs/string", + "x-since-version": "v1.3.0" }, "permissions": { - "$ref": "#/$defs/slice/github.com/databricks/cli/bundle/config/resources.Permission" + "$ref": "#/$defs/slice/github.com/databricks/cli/bundle/config/resources.Permission", + "x-since-version": "v1.3.0" }, "serialized_space": { - "$ref": "#/$defs/interface" - }, - "space_id": { - "$ref": "#/$defs/string" + "description": "Serialized Genie space body. May be provided inline as a JSON string (or YAML that will be marshalled to JSON) or referenced via `file_path`. To round-trip an existing space into a bundle, use `databricks bundle generate genie-space`.", + "$ref": "#/$defs/interface", + "x-since-version": "v1.3.0" }, "title": { - "$ref": "#/$defs/string" + "description": "Title of the Genie space shown in the Databricks UI.", + "$ref": "#/$defs/string", + "x-since-version": "v1.3.0" }, "warehouse_id": { - "$ref": "#/$defs/string" + "description": "ID of the SQL warehouse used to run queries for this Genie space.", + "$ref": "#/$defs/string", + "x-since-version": "v1.3.0" } }, "additionalProperties": false @@ -2657,7 +2672,8 @@ "x-since-version": "v0.289.0" }, "genie_spaces": { - "$ref": "#/$defs/map/github.com/databricks/cli/bundle/config/resources.GenieSpace" + "$ref": "#/$defs/map/github.com/databricks/cli/bundle/config/resources.GenieSpace", + "x-since-version": "v1.3.0" }, "jobs": { "description": "The job definitions for the bundle, where each key is the name of the job.",