Skip to content

Add direct-mode bundle support for AI Gateway mcp_service - #6633

Open
alex-khakhlyuk wants to merge 5 commits into
mainfrom
aigov-dabs-mcp-service
Open

alex-khakhlyuk wants to merge 5 commits into
mainfrom
aigov-dabs-mcp-service

Conversation

@alex-khakhlyuk

Copy link
Copy Markdown
Member

Second of a stacked split of #6410 (databricks/cli), stacked on the model_service PR. Adds the direct-engine bundle resource for the AI Gateway MCP service securable (mcp_services): config/resource + dresources CRUD, testserver, acceptance (basic + remote-delete + bind) and an invariant config, plus registration and regenerated schema. All SDK struct literals set every field to satisfy exhaustruct; mcp_services added to the TF-lifecycle ignore list and the statemgmt full-resource-coverage fixtures. Direct engine only.

Changes

Why

Tests

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

30 files changed
Suggested: @janniklasrose
Also eligible: @denik, @pietern, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

/bundle/ - needs approval

21 files changed
Suggested: @janniklasrose
Also eligible: @denik, @pietern, @andrewnester, @shreyas-goenka, @anton-107, @lennartkats-db

General files (require maintainer)

21 files changed
Based on git history:

  • @janniklasrose -- recent work in bundle/direct/dresources/, bundle/internal/validation/generated/, libs/testserver/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 0dbe249

Run: 34886437288

Env ❌​FAIL 🟨​KNOWN ✅​pass 🙈​skip Time
❌​ aws linux 2 1 276 21 6:49
❌​ aws windows 2 1 278 19 6:12
❌​ azure linux 2 1 275 21 6:53
❌​ azure windows 2 1 277 19 6:21
❌​ gcp linux 2 1 276 21 8:02
❌​ gcp windows 2 1 278 19 6:24
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K 🟨​K
❌​ TestAccept/bundle/resources/mcp_services/lifecycle ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F
❌​ TestAccept/bundle/resources/mcp_services/lifecycle/DATABRICKS_BUNDLE_ENGINE=direct/DMS=true ❌​F ❌​F ❌​F ❌​F ❌​F ❌​F

Comment thread bundle/direct/dresources/resources.yml Outdated
reason: id_field
- field: mcp_service_id
reason: id_field
ignore_remote_changes:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

see #6654

alex-khakhlyuk and others added 4 commits September 14, 2026 16:45
Second of a stacked split of #6410 (databricks/cli), stacked on the model_service PR. Adds the direct-engine bundle resource for the AI Gateway MCP service securable (mcp_services): config/resource + dresources CRUD, testserver, acceptance (basic + remote-delete + bind) and an invariant config, plus registration and regenerated schema. All SDK struct literals set every field to satisfy exhaustruct; mcp_services added to the TF-lifecycle ignore list and the statemgmt full-resource-coverage fixtures. Direct engine only.

Co-authored-by: Isaac <no-reply@databricks.com>
Adds a Cloud=true lifecycle test for mcp_services, matching model_services
and model_provider_services. An MCP service must point at a pre-existing UC
connection hosting the MCP server (config.source_connection), and there is no
bundle `connections` resource to deploy it as a dependency, so the script
creates a bearer-auth connection out-of-band on cloud (guarded by CLOUD_ENV)
and tears it down via trap. Bearer auth with a placeholder host avoids the
OAuth/DCR reachability probe the backend runs at create time for MCP
connections. The mock testserver doesn't validate source_connection, so the
connection is only created on the real-workspace run.

basic and remote-delete opt out with Cloud=false (they inspect the recorded
request stream / use a fixed out-of-band delete that can't run on cloud).

Co-authored-by: Isaac <no-reply@databricks.com>
Follow-up to the mcp_service support, mirroring #6654 for model_services now
that #6618 enabled it. Added catalog.McpService to apitypes.yml so the
generator reads field behaviors from the response type (config.* paths),
removed the hand-written config.source_connection.is_deleted override from
resources.yml, and regenerated resources.generated.yml. The suppression is
unchanged, just auto-derived from the OpenAPI schema instead of hand-listed.

Co-authored-by: Isaac <no-reply@databricks.com>
…t_tag)

Main upgraded databricks-sdk-go v0.177 -> v0.178, which is the GA-sync SDK that
dropped `owner` (now effective_owner only) and the request_tag rate-limit
feature from the AI Gateway securable types. Adapted the mcp_service resource to
v0.178: removed the stale Owner field from mcpServiceBody, and regenerated the
schema/validation/refschema/pydabs outputs. RATE_LIMIT_KEY_REQUEST_TAG (and the
request_tag_key/value fields) are now absent from mcp_services and model_services
alike, matching the v0.178 spec.

Co-authored-by: Isaac <no-reply@databricks.com>
…test

The earlier cloud test created a metastore-level UC connection out-of-band,
which failed in CI: the deco service principal lacks metastore CREATE
CONNECTION, and under `bash -euo pipefail` the suppressed failure aborted the
script before deploy ("No active deployment found to destroy!").

Switch to a SCHEMA-SCOPED connection (parent schemas/main.default), which needs
only schema-level privileges the deploy SP already has. Schema-level connections
can't set is_mcp_connection (metastore-only), but the mcp_service accepts a
plain HTTP connection as its source_connection (validated end to end against a
staging workspace: create schema-scoped connection -> deploy -> no-drift plan ->
destroy). The reference uses the 3-part form connections/{catalog}.{schema}.{name}.

Also adds temporary debug output around `connections create` (silent on success;
prints the error on failure) so a CI failure surfaces the real cause instead of
being swallowed. Remove once the cloud run is confirmed green.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants