Skip to content

Add genie_agents bundle resource - #7617

Open
eric-cho1 wants to merge 2 commits into
mainfrom
eric.cho/add-genie-agent-resource
Open

eric-cho1 wants to merge 2 commits into
mainfrom
eric.cho/add-genie-agent-resource

Conversation

@eric-cho1

Copy link
Copy Markdown

Changes

Adds resources.genie_agents to bundles on the direct deployment engine, backed by the Genie Agents API (w.GenieAgents in the Go SDK).

  • The engine tracks the bare genie_agent_id. It is optional on create (server-assigned when omitted); changing it recreates the agent.
  • Updates are in place with update_mask: "*"; definition is replaced as a whole.
  • Supports bundle permissions through the generic Permissions API (object type genie).
  • The resource is marked private preview, so no Python package is generated.
  • Changelog fragment: .nextchanges/bundles/genie_agents.md.

Why

Genie agents can be managed through the API and Terraform but not through bundles. This lets users declare Genie agents next to the rest of their bundle resources.

genie_agents sits alongside the existing genie_spaces resource and manages the same backend object. Declaring the same object under both resource types is unsupported.

Tests

Acceptance tests against the test server: resources/genie_agents/{basic,lifecycle,remote-delete,without-definition}, deployment/bind/genie_agent, plus the invariant matrix entry and refschema output. Unit tests cover resource registration and state loading. Cloud integration tests (lifecycle) are pending maintainer approval.

This pull request and its description were written by Isaac.

Add resources.genie_agents for managing AI/BI Genie agents through the
Genie Agents API. The engine tracks the bare genie_agent_id (optional on
create, server-assigned when omitted; changing it recreates the agent).
Updates are in place with update_mask "*"; definition is replaced as a
whole. The resource is private preview, so no Python package is
generated. It manages the same backend object as genie_spaces;
declaring the same object under both resource types is unsupported.

Co-authored-by: Isaac <no-reply@databricks.com>
@eric-cho1
eric-cho1 requested review from a team as code owners November 13, 2026 22:15
@github-actions github-actions Bot added the DABs DABs related issues label Nov 13, 2026
Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

Copy link
Copy Markdown
Contributor

Commit: fee4b381d | Workflow run

Regression test report

Selected 10 changed tests (limit=20, 0 not selected)

15 tests: regression=10 unreleased=0 coverage=5 failing=0
test branch main (9a9d739) latest (v1.26.0)
TestAccept/bundle/deployment/bind/genie_agent/DMS= ✅ ❌ ❌
TestAccept/bundle/deployment/bind/genie_agent/DMS=true ✅ ❌ ❌
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN= ✅ ✅ ✅
TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN= ✅ ❌ ❌
TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=1 ✅ ✅ ✅
TestAccept/bundle/refschema/DMS= ✅ ❌ ❌
TestAccept/bundle/refschema/DMS=true ✅ ❌ ❌
TestAccept/bundle/resources/genie_agents/basic/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/genie_agents/lifecycle/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/genie_agents/remote-delete/DMS= ✅ ❌ ❌
TestAccept/bundle/resources/genie_agents/without-definition/DMS= ✅ ❌ ❌
TestAccept/experimental/open ✅ ❌ ❌
TestAccept/bundle/deployment/bind/genie_agent/DMS=: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: Diff:
        --- bundle/deployment/bind/genie_agent/output.txt
        +++ /tmp/TestAcceptbundledeploymentbindgenie_agentDMS=3645308418/002/output.txt
        @@ -10,6 +10,10 @@
             }
           }
         } --genie-agent-id 01f0a1b2c3d4e5f60718293a4b5c6d7e
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
        +
         {
           "name": "agents/01f0a1b2c3d4e5f60718293a4b5c6d7e",
           "display_name": "bound-agent",
        @@ -18,31 +22,10 @@
         }
         
         >>> [CLI] bundle deployment bind agent1 01f0a1b2c3d4e5f60718293a4b5c6d7e --auto-approve
        -Successfully bound genie_agent with an id '01f0a1b2c3d4e5f60718293a4b5c6d7e'
        -Run 'bundle deploy' to deploy changes to your workspace
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
         
        ->>> [CLI] bundle summary
        -Name: test-bundle
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
        -Resources:
        -  Genie Agents:
        -    agent1:
        -      Name: bound-agent
        -      URL:  [DATABRICKS_URL]/genie/rooms/01f0a1b2c3d4e5f60718293a4b5c6d7e?w=[WORKSPACE_ID]
        +Error: no such resource: agent1
         
        ->>> [CLI] bundle deployment unbind agent1
        -
        ->>> [CLI] bundle summary
        -Name: test-bundle
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
        -Resources:
        -  Genie Agents:
        -    agent1:
        -      Name: bound-agent
        -      URL:  (not deployed)
        +Exit code: 1

latest (v1.26.0): same output as main (9a9d739)

TestAccept/bundle/deployment/bind/genie_agent/DMS=true: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: Diff:
        --- bundle/deployment/bind/genie_agent/output.txt
        +++ /tmp/TestAcceptbundledeploymentbindgenie_agentDMS=true2054187773/002/output.txt
        @@ -10,6 +10,10 @@
             }
           }
         } --genie-agent-id 01f0a1b2c3d4e5f60718293a4b5c6d7e
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
        +
         {
           "name": "agents/01f0a1b2c3d4e5f60718293a4b5c6d7e",
           "display_name": "bound-agent",
        @@ -18,31 +22,10 @@
         }
         
         >>> [CLI] bundle deployment bind agent1 01f0a1b2c3d4e5f60718293a4b5c6d7e --auto-approve
        -Successfully bound genie_agent with an id '01f0a1b2c3d4e5f60718293a4b5c6d7e'
        -Run 'bundle deploy' to deploy changes to your workspace
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
         
        ->>> [CLI] bundle summary
        -Name: test-bundle
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
        -Resources:
        -  Genie Agents:
        -    agent1:
        -      Name: bound-agent
        -      URL:  [DATABRICKS_URL]/genie/rooms/01f0a1b2c3d4e5f60718293a4b5c6d7e?w=[WORKSPACE_ID]
        +Error: no such resource: agent1
         
        ->>> [CLI] bundle deployment unbind agent1
        -
        ->>> [CLI] bundle summary
        -Name: test-bundle
        -Target: default
        -Workspace:
        -  User: [USERNAME]
        -  Path: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
        -Resources:
        -  Genie Agents:
        -    agent1:
        -      Name: bound-agent
        -      URL:  (not deployed)
        +Exit code: 1

latest (v1.26.0): same output as main (9a9d739)

TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1374
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1115
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:678
        	Error:      	Not equal: 
        	            	expected: "INPUT_CONFIG_OK\n"
        	            	actual  : "INPUT_CONFIG_OK\nExpected at least one update action, found none\n{\n  \"plan_version\": [PLAN_VERSION],\n  \"cli_version\": \"[CLI_VERSION]\",\n  \"plan\": {}\n}\n\n\nExit code: 10\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,11 @@
        	            	 INPUT_CONFIG_OK
        	            	+Expected at least one update action, found none
        	            	+{
        	            	+  "plan_version": [PLAN_VERSION],
        	            	+  "cli_version": "[CLI_VERSION]",
        	            	+  "plan": {}
        	            	+}
        	            	 
        	            	+
        	            	+Exit code: 10
        	            	+
        	Test:       	TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=
        	Messages:   	bundle/invariant/no_drift/output.txt vs /tmp/TestAcceptbundleinvariantno_driftDMS=INPUT_CONFIG=genie_age1803532756/002/output.txt
    acceptance_test.go:1152: 
        LOG.config: bundle:
        LOG.config:   name: test-bundle-ifxkd6252jberjptc7srnakp74
        LOG.config: 
        LOG.config: resources:
        LOG.config:   genie_agents:
        LOG.config:     foo:
        LOG.config:       warehouse_id: 8ec9edc1-db0c-40df-af8d-7580020fe61e
        LOG.config:       display_name: test-genie-agent-ifxkd6252jberjptc7srnakp74
        LOG.config:       description: This is a test genie agent # CAN_REMOVE
        LOG.config:       definition:
        LOG.config:         config:
        LOG.config:           sample_questions:
        LOG.config:             - id: "01f0a1b2c3d4e5f60718293a4b5c6d7e"
        LOG.config:               question: What were total sales last month?
        LOG.config:         data_sources:
        LOG.config:           tables:
        LOG.config:             - identifier: main.sales.orders
        LOG.config:       permissions:
        LOG.config:         - level: CAN_READ
        LOG.config:           group_name: users
    acceptance_test.go:1152: 
        LOG.config.removed: bundle:
        LOG.config.removed:   name: test-bundle-ifxkd6252jberjptc7srnakp74
        LOG.config.removed: 
        LOG.config.removed: resources:
        LOG.config.removed:   genie_agents:
        LOG.config.removed:     foo:
        LOG.config.removed:       warehouse_id: 8ec9edc1-db0c-40df-af8d-7580020fe61e
        LOG.config.removed:       display_name: test-genie-agent-ifxkd6252jberjptc7srnakp74
        LOG.config.removed:       definition:
        LOG.config.removed:         config:
        LOG.config.removed:           sample_questions:
        LOG.config.removed:             - id: "01f0a1b2c3d4e5f60718293a4b5c6d7e"
        LOG.config.removed:               question: What were total sales last month?
        LOG.config.removed:         data_sources:
        LOG.config.removed:           tables:
        LOG.config.removed:             - identifier: main.sales.orders
        LOG.config.removed:       permissions:
        LOG.config.removed:         - level: CAN_READ
        LOG.config.removed:           group_name: users
    acceptance_test.go:1152: LOG.cp: 
    acceptance_test.go:1152: 
        LOG.deploy: 
        LOG.deploy: >>> /tmp/TestAccept977750694/001/databricks bundle deploy
        LOG.deploy: Warning: unknown field: genie_agents
        LOG.deploy:   at resources
        LOG.deploy:   in databricks.yml:5:3
        LOG.deploy: 
        LOG.deploy: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/test-bundle-ifxkd6252jberjptc7srnakp74/default/files...
        LOG.deploy: Files: 12 uploaded, 0 deleted
        LOG.deploy: Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
    acceptance_test.go:1152: 
        LOG.destroy: 
        LOG.destroy: >>> /tmp/TestAccept977750694/001/databricks bundle destroy --auto-approve
        LOG.destroy: Warning: unknown field: genie_agents
        LOG.destroy:   at resources
        LOG.destroy:   in databricks.yml:5:3
        LOG.destroy: 
        LOG.destroy: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/test-bundle-ifxkd6252jberjptc7srnakp74/default
        LOG.destroy: 
        LOG.destroy: Destroy: 0 deleted
    acceptance_test.go:1152: 
        LOG.planjson: {
        LOG.planjson:   "plan_version": 2,
        LOG.planjson:   "cli_version": "1.27.0-dev",
        LOG.planjson:   "plan": {}
        LOG.planjson: }

latest (v1.26.0):

acceptance_test.go:1374: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1374
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1115
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:678
        	Error:      	Not equal: 
        	            	expected: "INPUT_CONFIG_OK\n"
        	            	actual  : "INPUT_CONFIG_OK\nExpected at least one update action, found none\n{\n  \"plan_version\": [PLAN_VERSION],\n  \"cli_version\": \"[CLI_VERSION]\",\n  \"plan\": {}\n}\n\n\nExit code: 10\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,11 @@
        	            	 INPUT_CONFIG_OK
        	            	+Expected at least one update action, found none
        	            	+{
        	            	+  "plan_version": [PLAN_VERSION],
        	            	+  "cli_version": "[CLI_VERSION]",
        	            	+  "plan": {}
        	            	+}
        	            	 
        	            	+
        	            	+Exit code: 10
        	            	+
        	Test:       	TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=
        	Messages:   	bundle/invariant/no_drift/output.txt vs /tmp/TestAcceptbundleinvariantno_driftDMS=INPUT_CONFIG=genie_age2424218534/002/output.txt
    acceptance_test.go:1152: 
        LOG.config: bundle:
        LOG.config:   name: test-bundle-usm5nvwogrhanh6vu3gfua5ioi
        LOG.config: 
        LOG.config: resources:
        LOG.config:   genie_agents:
        LOG.config:     foo:
        LOG.config:       warehouse_id: 8ec9edc1-db0c-40df-af8d-7580020fe61e
        LOG.config:       display_name: test-genie-agent-usm5nvwogrhanh6vu3gfua5ioi
        LOG.config:       description: This is a test genie agent # CAN_REMOVE
        LOG.config:       definition:
        LOG.config:         config:
        LOG.config:           sample_questions:
        LOG.config:             - id: "01f0a1b2c3d4e5f60718293a4b5c6d7e"
        LOG.config:               question: What were total sales last month?
        LOG.config:         data_sources:
        LOG.config:           tables:
        LOG.config:             - identifier: main.sales.orders
        LOG.config:       permissions:
        LOG.config:         - level: CAN_READ
        LOG.config:           group_name: users
    acceptance_test.go:1152: 
        LOG.config.removed: bundle:
        LOG.config.removed:   name: test-bundle-usm5nvwogrhanh6vu3gfua5ioi
        LOG.config.removed: 
        LOG.config.removed: resources:
        LOG.config.removed:   genie_agents:
        LOG.config.removed:     foo:
        LOG.config.removed:       warehouse_id: 8ec9edc1-db0c-40df-af8d-7580020fe61e
        LOG.config.removed:       display_name: test-genie-agent-usm5nvwogrhanh6vu3gfua5ioi
        LOG.config.removed:       definition:
        LOG.config.removed:         config:
        LOG.config.removed:           sample_questions:
        LOG.config.removed:             - id: "01f0a1b2c3d4e5f60718293a4b5c6d7e"
        LOG.config.removed:               question: What were total sales last month?
        LOG.config.removed:         data_sources:
        LOG.config.removed:           tables:
        LOG.config.removed:             - identifier: main.sales.orders
        LOG.config.removed:       permissions:
        LOG.config.removed:         - level: CAN_READ
        LOG.config.removed:           group_name: users
    acceptance_test.go:1152: LOG.cp: 
    acceptance_test.go:1152: 
        LOG.deploy: 
        LOG.deploy: >>> /home/runner/work/cli/cli/acceptance/build/linux_amd64/1.26.0/databricks bundle deploy
        LOG.deploy: Warning: unknown field: genie_agents
        LOG.deploy:   at resources
        LOG.deploy:   in databricks.yml:5:3
        LOG.deploy: 
        LOG.deploy: Uploading bundle files to /Workspace/Users/tester@databricks.com/.bundle/test-bundle-usm5nvwogrhanh6vu3gfua5ioi/default/files...
        LOG.deploy: Files: 12 uploaded, 0 deleted
        LOG.deploy: Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
    acceptance_test.go:1152: 
        LOG.destroy: 
        LOG.destroy: >>> /home/runner/work/cli/cli/acceptance/build/linux_amd64/1.26.0/databricks bundle destroy --auto-approve
        LOG.destroy: Warning: unknown field: genie_agents
        LOG.destroy:   at resources
        LOG.destroy:   in databricks.yml:5:3
        LOG.destroy: 
        LOG.destroy: All files and directories at the following location will be deleted: /Workspace/Users/tester@databricks.com/.bundle/test-bundle-usm5nvwogrhanh6vu3gfua5ioi/default
        LOG.destroy: 
        LOG.destroy: Destroy: 0 deleted
    acceptance_test.go:1152: 
        LOG.planjson: {
        LOG.planjson:   "plan_version": 2,
        LOG.planjson:   "cli_version": "1.26.0",
        LOG.planjson:   "plan": {}
        LOG.planjson: }
TestAccept/bundle/refschema/DMS=: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1345: Missing output file: output/genie_agents.txt

latest (v1.26.0):

acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/schemas.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=2906210781/001/output/schemas.txt
        @@ -23,7 +23,7 @@
         resources.schemas.*.owner	string	REMOTE
         resources.schemas.*.properties	map[string]string	ALL
         resources.schemas.*.properties.*	string	ALL
        -resources.schemas.*.schema_id	string	REMOTE	STATE
        +resources.schemas.*.schema_id	string	REMOTE
         resources.schemas.*.storage_location	string	REMOTE
         resources.schemas.*.storage_root	string	ALL
         resources.schemas.*.updated_at	int64	REMOTE
        
    acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/apps.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=2906210781/001/output/apps.txt
        @@ -67,46 +67,6 @@
         resources.apps.*.default_source_code_path	string	ALL
         resources.apps.*.description	string	ALL
         resources.apps.*.effective_budget_policy_id	string	ALL
        -resources.apps.*.effective_resources	[]apps.AppResource	ALL
        -resources.apps.*.effective_resources[*]	apps.AppResource	ALL
        -resources.apps.*.effective_resources[*].app	*apps.AppResourceApp	ALL
        -resources.apps.*.effective_resources[*].app.name	string	ALL
        -resources.apps.*.effective_resources[*].app.permission	apps.AppResourceAppAppPermission	ALL
        -resources.apps.*.effective_resources[*].database	*apps.AppResourceDatabase	ALL
        -resources.apps.*.effective_resources[*].database.database_name	string	ALL
        -resources.apps.*.effective_resources[*].database.instance_name	string	ALL
        -resources.apps.*.effective_resources[*].database.permission	apps.AppResourceDatabaseDatabasePermission	ALL
        -resources.apps.*.effective_resources[*].description	string	ALL
        -resources.apps.*.effective_resources[*].experiment	*apps.AppResourceExperiment	ALL
        -resources.apps.*.effective_resources[*].experiment.experiment_id	string	ALL
        -resources.apps.*.effective_resources[*].experiment.permission	apps.AppResourceExperimentExperimentPermission	ALL
        -resources.apps.*.effective_resources[*].genie_space	*apps.AppResourceGenieSpace	ALL
        -resources.apps.*.effective_resources[*].genie_space.name	string	ALL
        -resources.apps.*.effective_resources[*].genie_space.permission	apps.AppResourceGenieSpaceGenieSpacePermission	ALL
        -resources.apps.*.effective_resources[*].genie_space.space_id	string	ALL
        -resources.apps.*.effective_resources[*].job	*apps.AppResourceJob	ALL
        -resources.apps.*.effective_resources[*].job.id	string	ALL
        -resources.apps.*.effective_resources[*].job.permission	apps.AppResourceJobJobPermission	ALL
        -resources.apps.*.effective_resources[*].name	string	ALL
        -resources.apps.*.effective_resources[*].postgres	*apps.AppResourcePostgres	ALL
        -resources.apps.*.effective_resources[*].postgres.branch	string	ALL
        -resources.apps.*.effective_resources[*].postgres.database	string	ALL
        -resources.apps.*.effective_resources[*].postgres.permission	apps.AppResourcePostgresPostgresPermission	ALL
        -resources.apps.*.effective_resources[*].secret	*apps.AppResourceSecret	ALL
        -resources.apps.*.effective_resources[*].secret.key	string	ALL
        -resources.apps.*.effective_resources[*].secret.permission	apps.AppResourceSecretSecretPermission	ALL
        -resources.apps.*.effective_resources[*].secret.scope	string	ALL
        -resources.apps.*.effective_resources[*].serving_endpoint	*apps.AppResourceServingEndpoint	ALL
        -resources.apps.*.effective_resources[*].serving_endpoint.name	string	ALL
        -resources.apps.*.effective_resources[*].serving_endpoint.permission	apps.AppResourceServingEndpointServingEndpointPermission	ALL
        -resources.apps.*.effective_resources[*].sql_warehouse	*apps.AppResourceSqlWarehouse	ALL
        -resources.apps.*.effective_resources[*].sql_warehouse.id	string	ALL
        -resources.apps.*.effective_resources[*].sql_warehouse.permission	apps.AppResourceSqlWarehouseSqlWarehousePermission	ALL
        -resources.apps.*.effective_resources[*].uc_securable	*apps.AppResourceUcSecurable	ALL
        -resources.apps.*.effective_resources[*].uc_securable.permission	apps.AppResourceUcSecurableUcSecurablePermission	ALL
        -resources.apps.*.effective_resources[*].uc_securable.securable_full_name	string	ALL
        -resources.apps.*.effective_resources[*].uc_securable.securable_kind	string	ALL
        -resources.apps.*.effective_resources[*].uc_securable.securable_type	apps.AppResourceUcSecurableUcSecurableType	ALL
         resources.apps.*.effective_usage_policy_id	string	ALL
         resources.apps.*.effective_user_api_scopes	[]string	ALL
         resources.apps.*.effective_user_api_scopes[*]	string	ALL
        
    acceptance_test.go:1345: Missing output file: output/genie_agents.txt
    acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/catalogs.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=2906210781/001/output/catalogs.txt
        @@ -12,7 +12,7 @@
         resources.catalogs.*.enable_predictive_optimization	catalog.EnablePredictiveOptimization	REMOTE
         resources.catalogs.*.full_name	string	REMOTE
         resources.catalogs.*.id	string	INPUT
        -resources.catalogs.*.isolation_mode	catalog.CatalogIsolationMode	ALL
        +resources.catalogs.*.isolation_mode	catalog.CatalogIsolationMode	REMOTE
         resources.catalogs.*.lifecycle	resources.Lifecycle	INPUT
         resources.catalogs.*.lifecycle.depends_on	[]resources.DependsOn	INPUT
         resources.catalogs.*.lifecycle.depends_on[*]	resources.DependsOn	INPUT
        
    acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/volumes.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=2906210781/001/output/volumes.txt
        @@ -24,7 +24,7 @@
         resources.volumes.*.updated_at	int64	REMOTE
         resources.volumes.*.updated_by	string	REMOTE
         resources.volumes.*.url	string	INPUT
        -resources.volumes.*.volume_id	string	REMOTE	STATE
        +resources.volumes.*.volume_id	string	REMOTE
         resources.volumes.*.volume_path	string	INPUT
         resources.volumes.*.volume_type	catalog.VolumeType	ALL
         resources.volumes.*.grants.full_name	string	ALL
TestAccept/bundle/refschema/DMS=true: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1345: Missing output file: output/genie_agents.txt

latest (v1.26.0):

acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/apps.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true450270010/001/output/apps.txt
        @@ -67,46 +67,6 @@
         resources.apps.*.default_source_code_path	string	ALL
         resources.apps.*.description	string	ALL
         resources.apps.*.effective_budget_policy_id	string	ALL
        -resources.apps.*.effective_resources	[]apps.AppResource	ALL
        -resources.apps.*.effective_resources[*]	apps.AppResource	ALL
        -resources.apps.*.effective_resources[*].app	*apps.AppResourceApp	ALL
        -resources.apps.*.effective_resources[*].app.name	string	ALL
        -resources.apps.*.effective_resources[*].app.permission	apps.AppResourceAppAppPermission	ALL
        -resources.apps.*.effective_resources[*].database	*apps.AppResourceDatabase	ALL
        -resources.apps.*.effective_resources[*].database.database_name	string	ALL
        -resources.apps.*.effective_resources[*].database.instance_name	string	ALL
        -resources.apps.*.effective_resources[*].database.permission	apps.AppResourceDatabaseDatabasePermission	ALL
        -resources.apps.*.effective_resources[*].description	string	ALL
        -resources.apps.*.effective_resources[*].experiment	*apps.AppResourceExperiment	ALL
        -resources.apps.*.effective_resources[*].experiment.experiment_id	string	ALL
        -resources.apps.*.effective_resources[*].experiment.permission	apps.AppResourceExperimentExperimentPermission	ALL
        -resources.apps.*.effective_resources[*].genie_space	*apps.AppResourceGenieSpace	ALL
        -resources.apps.*.effective_resources[*].genie_space.name	string	ALL
        -resources.apps.*.effective_resources[*].genie_space.permission	apps.AppResourceGenieSpaceGenieSpacePermission	ALL
        -resources.apps.*.effective_resources[*].genie_space.space_id	string	ALL
        -resources.apps.*.effective_resources[*].job	*apps.AppResourceJob	ALL
        -resources.apps.*.effective_resources[*].job.id	string	ALL
        -resources.apps.*.effective_resources[*].job.permission	apps.AppResourceJobJobPermission	ALL
        -resources.apps.*.effective_resources[*].name	string	ALL
        -resources.apps.*.effective_resources[*].postgres	*apps.AppResourcePostgres	ALL
        -resources.apps.*.effective_resources[*].postgres.branch	string	ALL
        -resources.apps.*.effective_resources[*].postgres.database	string	ALL
        -resources.apps.*.effective_resources[*].postgres.permission	apps.AppResourcePostgresPostgresPermission	ALL
        -resources.apps.*.effective_resources[*].secret	*apps.AppResourceSecret	ALL
        -resources.apps.*.effective_resources[*].secret.key	string	ALL
        -resources.apps.*.effective_resources[*].secret.permission	apps.AppResourceSecretSecretPermission	ALL
        -resources.apps.*.effective_resources[*].secret.scope	string	ALL
        -resources.apps.*.effective_resources[*].serving_endpoint	*apps.AppResourceServingEndpoint	ALL
        -resources.apps.*.effective_resources[*].serving_endpoint.name	string	ALL
        -resources.apps.*.effective_resources[*].serving_endpoint.permission	apps.AppResourceServingEndpointServingEndpointPermission	ALL
        -resources.apps.*.effective_resources[*].sql_warehouse	*apps.AppResourceSqlWarehouse	ALL
        -resources.apps.*.effective_resources[*].sql_warehouse.id	string	ALL
        -resources.apps.*.effective_resources[*].sql_warehouse.permission	apps.AppResourceSqlWarehouseSqlWarehousePermission	ALL
        -resources.apps.*.effective_resources[*].uc_securable	*apps.AppResourceUcSecurable	ALL
        -resources.apps.*.effective_resources[*].uc_securable.permission	apps.AppResourceUcSecurableUcSecurablePermission	ALL
        -resources.apps.*.effective_resources[*].uc_securable.securable_full_name	string	ALL
        -resources.apps.*.effective_resources[*].uc_securable.securable_kind	string	ALL
        -resources.apps.*.effective_resources[*].uc_securable.securable_type	apps.AppResourceUcSecurableUcSecurableType	ALL
         resources.apps.*.effective_usage_policy_id	string	ALL
         resources.apps.*.effective_user_api_scopes	[]string	ALL
         resources.apps.*.effective_user_api_scopes[*]	string	ALL
        
    acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/volumes.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true450270010/001/output/volumes.txt
        @@ -24,7 +24,7 @@
         resources.volumes.*.updated_at	int64	REMOTE
         resources.volumes.*.updated_by	string	REMOTE
         resources.volumes.*.url	string	INPUT
        -resources.volumes.*.volume_id	string	REMOTE	STATE
        +resources.volumes.*.volume_id	string	REMOTE
         resources.volumes.*.volume_path	string	INPUT
         resources.volumes.*.volume_type	catalog.VolumeType	ALL
         resources.volumes.*.grants.full_name	string	ALL
        
    acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/catalogs.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true450270010/001/output/catalogs.txt
        @@ -12,7 +12,7 @@
         resources.catalogs.*.enable_predictive_optimization	catalog.EnablePredictiveOptimization	REMOTE
         resources.catalogs.*.full_name	string	REMOTE
         resources.catalogs.*.id	string	INPUT
        -resources.catalogs.*.isolation_mode	catalog.CatalogIsolationMode	ALL
        +resources.catalogs.*.isolation_mode	catalog.CatalogIsolationMode	REMOTE
         resources.catalogs.*.lifecycle	resources.Lifecycle	INPUT
         resources.catalogs.*.lifecycle.depends_on	[]resources.DependsOn	INPUT
         resources.catalogs.*.lifecycle.depends_on[*]	resources.DependsOn	INPUT
        
    acceptance_test.go:1374: Diff:
        --- bundle/refschema/output/schemas.txt
        +++ /tmp/TestAcceptbundlerefschemaDMS=true450270010/001/output/schemas.txt
        @@ -23,7 +23,7 @@
         resources.schemas.*.owner	string	REMOTE
         resources.schemas.*.properties	map[string]string	ALL
         resources.schemas.*.properties.*	string	ALL
        -resources.schemas.*.schema_id	string	REMOTE	STATE
        +resources.schemas.*.schema_id	string	REMOTE
         resources.schemas.*.storage_location	string	REMOTE
         resources.schemas.*.storage_root	string	ALL
         resources.schemas.*.updated_at	int64	REMOTE
        
    acceptance_test.go:1345: Missing output file: output/genie_agents.txt
TestAccept/bundle/resources/genie_agents/basic/DMS=: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: Diff:
        --- bundle/resources/genie_agents/basic/output.txt
        +++ /tmp/TestAcceptbundleresourcesgenie_agentsbasicDMS=2437015599/002/output.txt
        @@ -2,43 +2,29 @@
         === Initial summary before deploy
         
         >>> [CLI] bundle summary -o json
        -{
        -  "definition": {
        -    "config": {
        -      "sample_questions": [
        -        {
        -          "id": "01f0a1b2c3d4e5f60718293a4b5c6d7f",
        -          "question": "What were total sales last month?"
        -        }
        -      ]
        -    },
        -    "data_sources": {
        -      "tables": [
        -        {
        -          "description": "One row per order, with order date and amount.",
        -          "identifier": "main.sales.orders"
        -        }
        -      ]
        -    }
        -  },
        -  "description": "COMMENT1",
        -  "display_name": "my-agent",
        -  "genie_agent_id": "01f0a1b2c3d4e5f60718293a4b5c6d7e",
        -  "modified_status": "created",
        -  "parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources",
        -  "warehouse_id": "test-warehouse-id"
        -}
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
         
        +null
        +
         === Verify it does not exist yet
         
         >>> musterr [CLI] genie-agents get-genie-agent agents/01f0a1b2c3d4e5f60718293a4b5c6d7e
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
        +
         Error: Genie Agent not found
         
         >>> [CLI] bundle deploy
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        -Created genie_agents.agent1
         Files: 1 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
         
         >>> print_requests.py //genie/agents //workspace/mkdirs
         {
        @@ -62,219 +39,26 @@
             "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files"
           }
         }
        -{
        -  "method": "POST",
        -  "path": "/api/2.0/genie/agents",
        -  "q": {
        -    "genie_agent_id": "01f0a1b2c3d4e5f60718293a4b5c6d7e"
        -  },
        -  "body": {
        -    "definition": {
        -      "config": {
        -        "sample_questions": [
        -          {
        -            "id": "01f0a1b2c3d4e5f60718293a4b5c6d7f",
        -            "question": "What were total sales last month?"
        -          }
        -        ]
        -      },
        -      "data_sources": {
        -        "tables": [
        -          {
        -            "description": "One row per order, with order date and amount.",
        -            "identifier": "main.sales.orders"
        -          }
        -        ]
        -      }
        -    },
        -    "description": "COMMENT1",
        -    "display_name": "my-agent",
        -    "parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources",
        -    "warehouse_id": "test-warehouse-id"
        -  }
        -}
        -{
        -  "method": "POST",
        -  "path": "/api/2.0/workspace/mkdirs",
        -  "body": {
        -    "path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources"
        -  }
        -}
        -{
        -  "method": "POST",
        -  "path": "/api/2.0/genie/agents",
        -  "q": {
        -    "genie_agent_id": "01f0a1b2c3d4e5f60718293a4b5c6d7e"
        -  },
        -  "body": {
        -    "definition": {
        -      "config": {
        -        "sample_questions": [
        -          {
        -            "id": "01f0a1b2c3d4e5f60718293a4b5c6d7f",
        -            "question": "What were total sales last month?"
        -          }
        -        ]
        -      },
        -      "data_sources": {
        -        "tables": [
        -          {
        -            "description": "One row per order, with order date and amount.",
        -            "identifier": "main.sales.orders"
        -          }
        -        ]
        -      }
        -    },
        -    "description": "COMMENT1",
        -    "display_name": "my-agent",
        -    "parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources",
        -    "warehouse_id": "test-warehouse-id"
        -  }
        -}
         
         === Summary should show the id and the Genie room url
         
         >>> [CLI] bundle summary -o json
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
        +
         {
        -  "id": "01f0a1b2c3d4e5f60718293a4b5c6d7e",
        -  "url": "[DATABRICKS_URL]/genie/rooms/01f0a1b2c3d4e5f60718293a4b5c6d7e?w=[WORKSPACE_ID]"
        +  "id": null,
        +  "url": null
         }
         
         === Verify deployment
         
         >>> [CLI] genie-agents get-genie-agent agents/01f0a1b2c3d4e5f60718293a4b5c6d7e
        -{
        -  "name": "agents/01f0a1b2c3d4e5f60718293a4b5c6d7e",
        -  "display_name": "my-agent",
        -  "description": "COMMENT1",
        -  "warehouse_id": "test-warehouse-id",
        -  "etag": "1"
        -}
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
         
        -=== Update description (should update in place, not recreate)
        +Error: Genie Agent not found
         
        ->>> update_file.py databricks.yml COMMENT1 COMMENT2
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        -Updated genie_agents.agent1
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -
        ->>> print_requests.py //genie/agents
        -{
        -  "method": "PATCH",
        -  "path": "/api/2.0/genie/agents/01f0a1b2c3d4e5f60718293a4b5c6d7e",
        -  "q": {
        -    "update_mask": "*"
        -  },
        -  "body": {
        -    "definition": {
        -      "config": {
        -        "sample_questions": [
        -          {
        -            "id": "01f0a1b2c3d4e5f60718293a4b5c6d7f",
        -            "question": "What were total sales last month?"
        -          }
        -        ]
        -      },
        -      "data_sources": {
        -        "tables": [
        -          {
        -            "description": "One row per order, with order date and amount.",
        -            "identifier": "main.sales.orders"
        -          }
        -        ]
        -      }
        -    },
... (92 more lines truncated, raise DATABRICKS_CLI_TEST_MAX_LOG to see more)

latest (v1.26.0): same output as main (9a9d739)

TestAccept/bundle/resources/genie_agents/lifecycle/DMS=: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: Diff:
        --- bundle/resources/genie_agents/lifecycle/output.txt
        +++ /tmp/TestAcceptbundleresourcesgenie_agentslifecycleDMS=4263145433/002/output.txt
        @@ -1,52 +1,30 @@
         
         >>> [CLI] bundle deploy
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-genie-agent-test-[UNIQUE_NAME]/default/files...
        -Created genie_agents.agent
         Files: 2 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
        +Traceback (most recent call last):
        +  File "[TESTROOT]/bin/read_id.py", line 89, in <module>
        +    main()
        +    ~~~~^^
        +  File "[TESTROOT]/bin/read_id.py", line 79, in main
        +    id = get_id_terraform(filename, args.name)
        +  File "[TESTROOT]/bin/read_id.py", line 23, in get_id_terraform
        +    raw = open(filename).read()
        +          ~~~~^^^^^^^^^^
        +FileNotFoundError: [Errno 2] No such file or directory: '.databricks/bundle/default/terraform/terraform.tfstate'
         
        ->>> [CLI] genie-agents get-genie-agent agents/[AGENT_ID]
        -{
        -  "name": "agents/[AGENT_ID]",
        -  "display_name": "test_agent_[UNIQUE_NAME]",
        -  "description": "Agent grounded in sales tables",
        -  "warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]",
        -  "etag": "1"
        -}
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        -
        -=== Update description in place
        -
        ->>> update_file.py databricks.yml Agent grounded in sales tables Agent grounded in sales tables, updated
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-genie-agent-test-[UNIQUE_NAME]/default/files...
        -Updated genie_agents.agent
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -
        ->>> [CLI] genie-agents get-genie-agent agents/[AGENT_ID]
        -{
        -  "name": "agents/[AGENT_ID]",
        -  "display_name": "test_agent_[UNIQUE_NAME]",
        -  "description": "Agent grounded in sales tables, updated",
        -  "warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]",
        -  "etag": "1"
        -}
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        -
         >>> [CLI] bundle destroy --auto-approve
        -The following resources will be deleted:
        -  delete resources.genie_agents.agent
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
         
        -This action will result in the deletion of the following Genie agents.
        -The conversation history attached to them is permanently lost:
        -  delete resources.genie_agents.agent
        -
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/deploy-genie-agent-test-[UNIQUE_NAME]/default
         
        -Destroy: 1 deleted
        +Destroy: 0 deleted
        +
        +Exit code: 1
        
FAIL

latest (v1.26.0):

acceptance_test.go:1374: Diff:
        --- bundle/resources/genie_agents/lifecycle/output.txt
        +++ /tmp/TestAcceptbundleresourcesgenie_agentslifecycleDMS=2382356438/002/output.txt
        @@ -1,52 +1,30 @@
         
         >>> [CLI] bundle deploy
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
        +
         Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-genie-agent-test-[UNIQUE_NAME]/default/files...
        -Created genie_agents.agent
         Files: 2 uploaded, 0 deleted
        -Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        +Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
        +Traceback (most recent call last):
        +  File "[TESTROOT]/bin/read_id.py", line 89, in <module>
        +    main()
        +    ~~~~^^
        +  File "[TESTROOT]/bin/read_id.py", line 79, in main
        +    id = get_id_terraform(filename, args.name)
        +  File "[TESTROOT]/bin/read_id.py", line 23, in get_id_terraform
        +    raw = open(filename).read()
        +          ~~~~^^^^^^^^^^
        +FileNotFoundError: [Errno 2] No such file or directory: '.databricks/bundle/default/terraform/terraform.tfstate'
         
        ->>> [CLI] genie-agents get-genie-agent agents/[AGENT_ID]
        -{
        -  "name": "agents/[AGENT_ID]",
        -  "display_name": "test_agent_[UNIQUE_NAME]",
        -  "description": "Agent grounded in sales tables",
        -  "warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]",
        -  "etag": "1"
        -}
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        -
        -=== Update description in place
        -
        ->>> update_file.py databricks.yml Agent grounded in sales tables Agent grounded in sales tables, updated
        -
        ->>> [CLI] bundle deploy
        -Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/deploy-genie-agent-test-[UNIQUE_NAME]/default/files...
        -Updated genie_agents.agent
        -Files: 1 uploaded, 0 deleted
        -Resources: 0 created, 1 changed, 0 deleted, 0 unchanged
        -
        ->>> [CLI] genie-agents get-genie-agent agents/[AGENT_ID]
        -{
        -  "name": "agents/[AGENT_ID]",
        -  "display_name": "test_agent_[UNIQUE_NAME]",
        -  "description": "Agent grounded in sales tables, updated",
        -  "warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]",
        -  "etag": "1"
        -}
        -
        ->>> [CLI] bundle plan
        -Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged
        -
         >>> [CLI] bundle destroy --auto-approve
        -The following resources will be deleted:
        -  delete resources.genie_agents.agent
        +Warning: unknown field: genie_agents
        +  at resources
        +  in databricks.yml:5:3
         
        -This action will result in the deletion of the following Genie agents.
        -The conversation history attached to them is permanently lost:
        -  delete resources.genie_agents.agent
        -
         All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/deploy-genie-agent-test-[UNIQUE_NAME]/default
         
        -Destroy: 1 deleted
        +Destroy: 0 deleted
        +
        +Exit code: 1
TestAccept/bundle/resources/genie_agents/remote-delete/DMS=: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1374
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1115
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:678
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle deploy\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nCreated genie_agents.agent1\nFiles: 1 uploaded, 0 deleted\nResources: 1 created, 0 changed, 0 deleted, 0 unchanged\n\n=== Delete the resource out of band\n\n>>> [CLI] genie-agents delete-genie-agent agents/01f0a1b2c3d4e5f60718293a4b5c6d7e\n\n=== Plan should detect the resource is gone and re-create it\n\n>>> [CLI] bundle plan\ncreate genie_agents.agent1\n\nPlan: 1 to add, 0 to change, 0 to delete, 0 unchanged\n\n>>> [CLI] bundle destroy --auto-approve\nAll files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default\n\nDestroy: 0 deleted\n"
        	            	actual  : "\n>>> [CLI] bundle deploy\nWarning: unknown field: genie_agents\n  at resources\n  in databricks.yml:5:3\n\nUploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...\nFiles: 1 uploaded, 0 deleted\nResources: 0 created, 0 changed, 0 deleted, 0 unchanged\n\n=== Delete the resource out of band\n\n>>> [CLI] genie-agents delete-genie-agent agents/01f0a1b2c3d4e5f60718293a4b5c6d7e\nWarning: unknown field: genie_agents\n  at resources\n  in databricks.yml:5:3\n\nError: Genie Agent not found\n\nExit code: 1\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,6 +2,9 @@
        	            	 >>> [CLI] bundle deploy
        	            	+Warning: unknown field: genie_agents
        	            	+  at resources
        	            	+  in databricks.yml:5:3
        	            	+
        	            	 Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/test-bundle/default/files...
        	            	-Created genie_agents.agent1
        	            	 Files: 1 uploaded, 0 deleted
        	            	-Resources: 1 created, 0 changed, 0 deleted, 0 unchanged
        	            	+Resources: 0 created, 0 changed, 0 deleted, 0 unchanged
        	            	 
        	            	@@ -10,14 +13,9 @@
        	            	 >>> [CLI] genie-agents delete-genie-agent agents/01f0a1b2c3d4e5f60718293a4b5c6d7e
        	            	+Warning: unknown field: genie_agents
        	            	+  at resources
        	            	+  in databricks.yml:5:3
        	            	 
        	            	-=== Plan should detect the resource is gone and re-create it
        	            	+Error: Genie Agent not found
        	            	 
        	            	->>> [CLI] bundle plan
        	            	-create genie_agents.agent1
        	            	+Exit code: 1
        	            	 
        	            	-Plan: 1 to add, 0 to change, 0 to delete, 0 unchanged
        	            	-
        	            	->>> [CLI] bundle destroy --auto-approve
        	            	-All files and directories at the following location will be deleted: /Workspace/Users/[USERNAME]/.bundle/test-bundle/default
        	            	-
        	            	-Destroy: 0 deleted
        	            	-
        	Test:       	TestAccept/bundle/resources/genie_agents/remote-delete/DMS=
        	Messages:   	bundle/resources/genie_agents/remote-delete/output.txt vs /tmp/TestAcceptbundleresourcesgenie_agentsremote-deleteDMS=1412179671/002/output.txt

latest (v1.26.0): same output as main (9a9d739)

TestAccept/bundle/resources/genie_agents/without-definition/DMS=: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1374
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1115
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:678
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate\nWarning: required field \"definition\" is not set\n  at resources.genie_agents.agent\n  in databricks.yml:7:7\n\nName: genie-agent-no-definition-[UNIQUE_NAME]\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/genie-agent-no-definition-[UNIQUE_NAME]/default\n\nFound 1 warning\n"
        	            	actual  : "\n>>> [CLI] bundle validate\nWarning: unknown field: genie_agents\n  at resources\n  in databricks.yml:5:3\n\nName: genie-agent-no-definition-[UNIQUE_NAME]\nTarget: default\nWorkspace:\n  User: [USERNAME]\n  Path: /Workspace/Users/[USERNAME]/.bundle/genie-agent-no-definition-[UNIQUE_NAME]/default\n\nFound 1 warning\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,5 +2,5 @@
        	            	 >>> [CLI] bundle validate
        	            	-Warning: required field "definition" is not set
        	            	-  at resources.genie_agents.agent
        	            	-  in databricks.yml:7:7
        	            	+Warning: unknown field: genie_agents
        	            	+  at resources
        	            	+  in databricks.yml:5:3
        	            	 
        	Test:       	TestAccept/bundle/resources/genie_agents/without-definition/DMS=
        	Messages:   	bundle/resources/genie_agents/without-definition/output.txt vs /tmp/TestAcceptbundleresourcesgenie_agentswithout-definitionDMS=3942463413/002/output.txt

latest (v1.26.0): same output as main (9a9d739)

TestAccept/experimental/open: branch ✅ | main (9a9d739) ❌ | latest (v1.26.0) ❌

main (9a9d739):

acceptance_test.go:1374: Diff:
        --- experimental/open/output.txt
        +++ /tmp/TestAcceptexperimentalopen4275736502/002/output.txt
        @@ -12,7 +12,7 @@
         === unknown resource type
         
         >>> [CLI] experimental open --url unknown 123
        -Error: unknown resource type "unknown", must be one of: alerts, apps, catalogs, cluster_policies, clusters, dashboards, database_catalogs, database_instances, experiments, feature_specs, features, genie_agents, genie_spaces, instance_pools, jobs, mcp_services, model_provider_services, model_services, model_serving_endpoints, models, notebooks, pipelines, postgres_catalogs, postgres_synced_tables, quality_monitors, queries, registered_models, schemas, secrets, synced_database_tables, vector_search_endpoints, vector_search_indexes, volumes, warehouses
        +Error: unknown resource type "unknown", must be one of: alerts, apps, catalogs, cluster_policies, clusters, dashboards, database_catalogs, database_instances, experiments, feature_specs, features, genie_spaces, instance_pools, jobs, mcp_services, model_provider_services, model_services, model_serving_endpoints, models, notebooks, pipelines, postgres_catalogs, postgres_synced_tables, quality_monitors, queries, registered_models, schemas, secrets, synced_database_tables, vector_search_endpoints, vector_search_indexes, volumes, warehouses
         
         === test auto-completion handler
         
        @@ -28,7 +28,6 @@
         experiments
         feature_specs
         features
        -genie_agents
         genie_spaces
         instance_pools
         jobs

latest (v1.26.0): same output as main (9a9d739)

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

❌ Integration test report

Commit: fee4b38

Run: 43518790138

Env ❌​FAIL 🟨​KNOWN ✅​pass 🙈​skip Time
❌​ aws linux-2core-8gb 11 1 270 21 11:51
❌​ aws-windows-latest-4core-16gb 11 1 272 19 15:37
❌​ azure linux-2core-8gb 11 1 269 21 13:31
❌​ azure-windows-latest-4core-16gb 11 1 271 19 13:20
❌​ gcp linux-2core-8gb 11 1 270 21 13:23
❌​ gcp-windows-latest-4core-16gb 11 1 272 19 14:59
12 interesting tests: 11 FAIL, 1 KNOWN
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
🟨​ TestAccept 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
❌​ TestAccept/bundle/invariant/delete_idempotent ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN= ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/delete_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=1 ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/destroy_idempotent ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN= ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/destroy_idempotent/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=1 ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/no_drift ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN= ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=1 ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/genie_agents/lifecycle ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/genie_agents/lifecycle/DMS= ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F

@Sankalp-Mittal Sankalp-Mittal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI review from review-factory: 2 independent reviewer models (Claude Opus 5.5, Claude Fable 5.2) with cross-verification. Only findings that reviewers agreed on are posted.

Adds a direct-engine genie_agents bundle resource with tests; reviewers flagged possible permanent drift from server-sorted lists and unvalidated real-workspace behavior.

Findings: 1 major, 1 minor, 1 nit.

"display_name": "test_agent_[UNIQUE_NAME]",
"description": "Agent grounded in sales tables",
"warehouse_id": "[TEST_DEFAULT_WAREHOUSE_ID]",
"etag": "1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major: No passing cloud run yet, and the lifecycle golden pins the fake server's etag

The adapter depends on real-API behavior that only the fake server has exercised so far, and the code comments describe that behavior as already confirmed by the cloud run:

  • DoCreate relies on the Agents API reporting a missing parent folder in one of the two shapes isMissingGenieParentPathError recognises. The default parent_path is workspace.resource_path, which does not exist on a first deploy, so if the shape differs every first deploy fails.
  • DoUpdate relies on update_mask: "*" semantics.
  • responseToGenieAgentConfig copies parent_path back verbatim. The sibling genie_spaces resource (same backend object, per this PR) adds the /Workspace prefix on read and in config because GET returns the path without it. If the Agents API does the same, every plan after deploy shows an update on parent_path.
  • The fake server hard-deletes on DELETE, while the real API moves the agent to trash. Whether a pinned genie_agent_id can be reused after destroy or an out-of-band delete is untested (remote-delete is local only).

The PR description says the cloud lifecycle run is still pending, and the integration report on this head commit shows 11 failures in every environment (the report is truncated, so which tests failed is not visible).

Separately, the lifecycle test is Cloud = true but its golden contains "etag": "1" twice. That value is what the fake server assigns; a real etag will differ, so the cloud variant cannot match. The cloud-enabled genie_spaces tests leave etag out of their projection, and the cloud dashboard tests mask it as [ETAG].

Suggested changes:

  1. Drop etag from agent_fields (or add a Repl) so the golden is backend-independent.
  2. Get a green cloud run of resources/genie_agents/lifecycle and the genie_agent.yml.tmpl invariants before merging, as bundle/direct/dresources/README.md asks for new resource types.
  3. Until then, reword the comments in genie_agent.go that say the cloud run confirms these behaviors.

Evidence: acceptance/bundle/resources/genie_agents/lifecycle/output.txt:14 and :36 contain "etag": "1"; acceptance/bundle/resources/genie_agents/script.prepare:3 projects etag; acceptance/bundle/resources/genie_agents/test.toml:2 sets Cloud = true and lifecycle/out.test.toml:1 confirms it; libs/testserver/genie_agents.go:63 sets agent.Etag = "1". bundle/direct/dresources/genie_agent.go:106-108 says the error shape "is confirmed by the lifecycle test's cloud run" and :135-136 says the lifecycle test "exercises this mask against a real workspace". bundle/direct/dresources/genie_agent.go:85 copies agent.ParentPath unchanged, while bundle/direct/dresources/genie_space.go:85 uses ensureWorkspacePrefix(space.ParentPath). libs/testserver/genie_agents.go:127 hard-deletes. acceptance/bundle/resources/genie_spaces/simple and the bind test project {title, parent_path, warehouse_id} without etag; acceptance/bundle/resources/dashboards/detect-change/output.txt:36 shows [ETAG_1]. bundle/direct/dresources/README.md Testing section: "For new resource types, run at least one test on a live cloud environment."

Agreed by 2 reviewer model(s).

}
}' --genie-agent-id "$AGENT" | agent_fields

trace $CLI bundle deployment bind agent1 "$AGENT" --auto-approve

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: Bind test never plans, deploys or destroys after binding

The script runs bind, summary, unbind, summary. It never checks that the first bundle plan after bind is clean, that bundle deploy then updates the bound agent in place rather than recreating it, or that bundle destroy after unbind leaves the agent alone. The genie_space bind test checks all of these (bind, plan, deploy, get, unbind, destroy, get again). bundle/direct/dresources/README.md describes bind tests as verifying "that binding an existing resource and then deploying/destroying works correctly".

This matters for agents in particular: genie_agent_id is a provided_id_fields entry (bundle/direct/dresources/configs/genie_agents.yml:5), so a local-vs-state difference on it plans a recreate (classifyIDField, bundle/direct/bundle_plan.go:718-722), and recreating an agent loses its conversation history. Bind also has resource-specific logic in bundle/direct/bind.go (it copies the etag for dashboards and genie_spaces and fills state from config). A regression in how bind seeds state for this resource would not be caught by the current test.

Please extend the script to cover bundle plan, bundle deploy, unbind, bundle destroy, and a final get-genie-agent.

Evidence: acceptance/bundle/deployment/bind/genie_agent/script:16-20 contains only bind, summary, unbind, summary. acceptance/bundle/deployment/bind/genie_space/script runs bundle plan, bundle deploy, genie get-space, unbind, bundle destroy --auto-approve and a final genie get-space.

Agreed by 2 reviewer model(s).

Settings that control the deployment lifecycle of the resource, such as preventing it from being destroyed.
"parent_path":
"description": |-
Workspace folder in which to create the Genie Agent. If omitted, the caller's home folder is used. On update, setting it moves the agent and clearing it does not.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: parent_path description gives the API default, not the bundle default

The schema description, and the matching Go doc comment, say that when parent_path is omitted "the caller's home folder is used" and that clearing it on update does not move the agent. That is the raw API behavior.

In a bundle, an omitted parent_path defaults to ${workspace.resource_path}, so a bundle user never gets the home folder and can never send an empty value. Please describe the bundle behavior instead, since this text is what users see in the JSON schema.

Evidence: bundle/internal/schema/annotations.yml:1017 and bundle/config/resources/genie_agent.go:35-37 carry the home-folder wording, which is emitted into bundle/schema/jsonschema.json:1264. bundle/config/mutator/resourcemutator/resource_mutator.go:56 sets the default resources.genie_agents.*.parent_path to b.Config.Workspace.ResourcePath. acceptance/bundle/resources/genie_agents/basic/output.txt shows the pre-deploy summary with "parent_path": "/Workspace/Users/[USERNAME]/.bundle/test-bundle/default/resources" for a config that does not set it.

Agreed by 2 reviewer model(s).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants