Skip to content

test(mcp): add McpServiceResourceIT - #36679

Merged
Vishnuujain merged 1 commit into
mainfrom
mcp-service-it
Oct 31, 2026
Merged

Vishnuujain merged 1 commit into
mainfrom
mcp-service-it

Conversation

@Vishnuujain

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes the empty McpServiceResourceIT placeholder that the Java test planner selects and then reports as missing results (context: #36553).

  • McpServiceResourceIT was a TODO with no class. It now extends BaseServiceIT like the other service ITs, so MCP services get the shared CRUD, versions, delete/restore and followers coverage.
  • Adds McpServiceService to the Java SDK and OpenMetadataClient.mcpServices(), same shape as llmServices().
  • MCP checks on top: a registry connection is stored and read back; a server apiKey is Fernet-encrypted at rest, masked to an admin and in clear to the ingestion bot; a recursive hard delete of a service with an MCP server leaves no orphan rows or search docs.

Type of change:

  • Improvement

High-level design:

N/A: small change, test plus one SDK accessor.

Tests:

Use cases covered

  • MCP service create, get, list, versions, soft delete/restore, hard delete, followers, domain filter (inherited from BaseServiceIT).
  • Registry connection persists; a DirectConnection server apiKey is encrypted in the DB, masked for admin and readable for the ingestion bot.
  • Recursive hard delete of a service with an MCP server removes the server row, its relationships and its mcp_server_search_index doc.

Unit tests

N/A: no production logic changed. McpServiceService is exercised by the IT.

Backend integration tests

  • Implemented McpServiceResourceIT in openmetadata-integration-tests/.
  • Ran locally on bfae3020333 (MySQL + Elasticsearch, parallel lane): 208 tests, 0 failures, 0 errors, 35 skipped. The skips are inherited cases MCP services opt out of (entity status, CSV import/export, patch).
  • OpenMetadataClient changed, so the planner selects the full IT suite. It runs in CI on this branch, and the block below gets filled from that run before this leaves draft.

Ingestion integration tests

N/A: no ingestion changes.

Playwright (UI) tests

N/A: no UI changes.

Manual testing performed

N/A: test and SDK only.

UI screen recording:

Not applicable: no UI change.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation> (test fix, no issue, labelled skip-pr-checks)
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: N/A, no schema change.
  • For a UI feature or feature task: N/A, no UI change.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • Self-review: I reviewed the final diff against REVIEW.md (the pr-checklist skill runs it) and fixed every 🔴 finding, or answered it on the line below.
    • Reviewed bfae3020333: no 🔴. Earlier passes' nits (duplicated request builder, skipped subtree delete, read-only secret check) are fixed in this commit.
  • Decision check: no record needed. The SDK calls the existing /v1/services/mcpServices path; no new contract, default or limit.

@Vishnuujain Vishnuujain added the skip-pr-checks Bypass PR metadata validation check label Oct 30, 2026
@github-actions github-actions Bot added the safe to test Add this label to run secure Github workflows on PRs label Oct 30, 2026
@gitar-bot

gitar-bot Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Adding MCP service SDK CRUD access introduces a new public client surface; mapping errors could misdirect service requests.

Adds McpServiceResourceIT by extending BaseServiceIT and introduces McpServiceService in the Java SDK with OpenMetadataClient.mcpServices(), plus MCP-specific checks for registry connections, apiKey encryption and masking, and recursive hard delete cleanup. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Vishnuujain
Vishnuujain marked this pull request as ready for review October 30, 2026 11:03
@Vishnuujain Vishnuujain self-assigned this Oct 30, 2026
@Vishnuujain
Vishnuujain enabled auto-merge October 30, 2026 11:06
@Vishnuujain Vishnuujain added the To release Will cherry-pick this PR into the release branch label Oct 30, 2026
@Vishnuujain
Vishnuujain added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 2d1454c Oct 31, 2026
199 checks passed
@Vishnuujain
Vishnuujain deleted the mcp-service-it branch October 31, 2026 11:31
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@github-actions

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.1 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.0 opened as #36745 (clean cherry-pick). It merges itself once the checks pass.

@gh-bot-collate

Copy link
Copy Markdown

🤖 Backport to 2.1 opened as #36746 (clean cherry-pick). It merges itself once the checks pass.

Vishnuujain added a commit that referenced this pull request Oct 31, 2026
(cherry picked from commit 2d1454c)

Co-authored-by: Vishnu Jain <121681876+Vishnuujain@users.noreply.github.com>
Vishnuujain added a commit that referenced this pull request Oct 31, 2026
(cherry picked from commit 2d1454c)

Co-authored-by: Vishnu Jain <121681876+Vishnuujain@users.noreply.github.com>
ShaileshParmar11 added a commit that referenced this pull request Nov 1, 2026
…#36772)

The backport of #36679 (#36745) copied the main version of the IT, which
sets a BaseEntityIT flag added on main by #34541. That flag does not exist
on 2.0, so openmetadata-integration-tests failed to compile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants