Repository navigation
Conversation
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>
Co-authored-by: Isaac <no-reply@databricks.com>
|
Commit: Regression test reportSelected 10 changed tests (limit=20, 0 not selected) 15 tests: regression=10 unreleased=0 coverage=5 failing=0
TestAccept/bundle/deployment/bind/genie_agent/DMS=: branch ✅ | main (3db96fa) ❌ | latest (v1.26.0) ❌main (3db96fa): latest (v1.26.0): same output as main (3db96fa) TestAccept/bundle/deployment/bind/genie_agent/DMS=true: branch ✅ | main (3db96fa) ❌ | latest (v1.26.0) ❌main (3db96fa): latest (v1.26.0): same output as main (3db96fa) TestAccept/bundle/invariant/no_drift/DMS=/INPUT_CONFIG=genie_agent.yml.tmpl/READPLAN=: branch ✅ | main (3db96fa) ❌ | latest (v1.26.0) ❌main (3db96fa): latest (v1.26.0): TestAccept/bundle/refschema/DMS=: branch ✅ | main (3db96fa) ❌ | latest (v1.26.0) ❌main (3db96fa): latest (v1.26.0): TestAccept/bundle/refschema/DMS=true: branch ✅ | main (3db96fa) ❌ | latest (v1.26.0) ❌main (3db96fa): latest (v1.26.0): TestAccept/bundle/resources/genie_agents/basic/DMS=: branch ✅ | main (3db96fa) ❌ | latest (v1.26.0) ❌main (3db96fa): latest (v1.26.0): same output as main (3db96fa) TestAccept/bundle/resources/genie_agents/lifecycle/DMS=: branch ✅ | main (3db96fa) ❌ | latest (v1.26.0) ❌main (3db96fa): latest (v1.26.0): same output as main (3db96fa) 3 more failure details omitted, see the full report in the run. |
✅ Integration test reportCommit: 3794b32
Top 3 slowest tests (at least 2 minutes):
|
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
🤖 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.
- Point the genie_agents acceptance and invariant configs at
samples.nyctaxi.trips instead of the example sales table so cloud runs
can read the referenced data, and adjust the sample questions and
descriptions to match.
- Normalize genie agent parent_path like genie_spaces: add the /Workspace
prefix on read and to the bundle config, and strip it before storing in
the fake server, so GET responses match the local configuration.
- Drop the fake server's etag from the genie_agents acceptance goldens
since it cannot match a real backend, and extend the genie_agent bind
test with plan/deploy/unbind/destroy coverage.
- Document the bundle parent_path default (${workspace.resource_path})
instead of the raw API default, and regenerate the bundle JSON schema.
Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.
- Deleting an agent moves it to trash, where its ID stays reserved, so a create with a pinned genie_agent_id returns ALREADY_EXISTS. The test server now models this, the remote-delete test records the failing redeploy, and the genie_agent_id docs warn about reusing a pinned ID after bundle destroy. - The Agents API returns parent_path exactly as submitted. Stop adding the /Workspace prefix on read, drop the prefix-only config fixup, and have the test server echo parent_path unchanged. Only effective_parent_path, which the adapter does not read, may omit /Workspace. Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.
Earlier findings: 2 still open.
Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.
No new issues found.
| GenieAgent: genieAgentBody(config), | ||
| Name: genieAgentNamePrefix + id, | ||
| UpdateMask: fieldmask.FieldMask{Paths: []string{"*"}}, | ||
| Etag: "", |
There was a problem hiding this comment.
No good reason for update, thanks. Update now sends the etag from the plan's remote read, so a definition edited after planning fails the deploy with ABORTED instead of being overwritten.
I left delete unguarded: delete only gets the persisted state, so the only etag available is from the last deploy, and sending it would block bundle destroy after any later UI edit. Happy to change that if you'd prefer it guarded.
GenieAgentConfig now embeds genieagents.GenieAgent instead of mirroring its fields, so the bundle schema and direct config follow the API body. The server-derived name is hidden from the schema and declared as a stable output field. Output-only fields are zeroed in PrepareState, so saved state and local diffs carry only the authored body. DoUpdate sends the etag from the plan's remote read as an optimistic concurrency precondition, so a definition edit made after planning fails the deploy instead of being overwritten. DoDelete sends no etag because it only receives the persisted state, and an etag saved at the last deploy would block destroy after any later definition edit. The fake server enforces the etag on update and delete, and bumps it when the definition changes. Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.
Co-authored-by: Isaac <no-reply@databricks.com>
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Follow-up review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.
No new issues found.
Changes
Adds
resources.genie_agentsto bundles on the direct deployment engine, backed by the Genie Agents API (w.GenieAgentsin the Go SDK).genie_agent_id. It is optional on create (server-assigned when omitted); changing it recreates the agent. Deleted agents stay in the trash with their ID reserved, so a pinnedgenie_agent_idcan't be reused afterbundle destroy; the field docs say so.update_mask: "*";definitionis replaced as a whole.parent_pathdefaults to${workspace.resource_path}and is returned exactly as submitted.permissionsthrough the generic Permissions API (object typegenie)..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_agentssits alongside the existinggenie_spacesresource 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(bind, plan, deploy, unbind, destroy), plus the invariant matrix entry and refschema output.remote-deletecovers redeploying with a pinnedgenie_agent_idafter the agent is trashed. Unit tests cover resource registration and state loading.Integration tests pass on aws, azure and gcp (Linux and Windows):
resources/genie_agents/lifecycleand thegenie_agentinvariants (no_drift,delete_idempotent,destroy_idempotent) run against real workspaces.This pull request and its description were written by Isaac.