Repository navigation
[2.0] Fixes 37687: Disabling the MCP Server app stops MCP without a restart - #37727
Merged
Merged
Conversation
gh-bot-collate
Bot
requested review from
yan-3005
and removed request for
a team
November 13, 2026 06:49
Author
|
🤖 This backport will not merge itself: |
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated backport of #37704 to
2.0.20b4252f08262ace9ae142a6ef7d4192c435a39aResolution notes
Backport notes: PR #37704 → 2.0
Fixes #37687: disabling the MCP Server app (or flipping
mcpConfiguration.enabledoff) now stopsMCP routes without a server restart, instead of only soft-deleting the app while the routes kept
answering.
Conflicts and how they were resolved
openmetadata-mcp/.../McpServer.javaConflict was only in the import block. Main's version of this file has diverged a lot (dynamic
tool/list-filter registry,
McpStatelessServerTransport,McpSyncListFilter, etc.) that 2.0 doesnot have. Of the two imports the source PR actually added (
jakarta.servlet.DispatcherType,java.util.EnumSet), both are used by the newregisterAvailabilityFiltermethod, so both werekept;
McpStatelessServerTransportwas main-only pre-existing code unrelated to this PR, so it wasleft out. The rest of the PR's changes (the
registerAvailabilityFiltercall and method, and theSAML callback availability check) applied cleanly — 2.0's narrower
addToolsToServer(notry/catch skip-on-bad-schema logic) was left untouched since that's an unrelated main-only
addition.
openmetadata-mcp/.../usage/McpUsageRecorder.java2.0 still has a 3-arg backwards-compatible
record(...)overload that was already removed frommain before this PR (unrelated prior cleanup). Cherry-pick conflicted because the PR's new Javadoc
for
resolveMcpApp()landed right where that overload sits on 2.0. Resolution keeps both: thepre-existing 3-arg overload (untouched, since dropping it is out of scope for this backport) and
the PR's new
resolveMcpApp()implementation (reads the app viaEntity.findEntityByNameOrNull(Entity.APPLICATION, McpAppConstants.MCP_APP_NAME, Include.ALL)instead of
ApplicationContext), plus its explanatory Javadoc.Other files
Everything else in the PR (
McpAvailabilityFilter.java, theOAuthWellKnownFilter.javadiscoverypath gating,
McpUsageResource.java'sresolveMcpApp(), the ADR doc, and the updated unit tests)applied cleanly with
git cherry-pickand needed no manual changes. Checked each new/changedsymbol against 2.0 (
Entity.findEntityByNameOrNull,SecurityConfigurationManager.getCurrentMcpConfig,MCPConfiguration,McpAppConstants.MCP_APP_NAME, thesystem/mcp/configandmcp/usage/summaryREST paths) — all exist on 2.0.
One extra change beyond the conflict:
McpTestBase.javaThe new integration test
McpAvailabilityIT.javacalls aputResponse(path, body, token)helperthat exists on main's
McpTestBase.javabut not on 2.0's (added there by some other, not-yet-backportedmain commit, unrelated to this PR). Without it the new test does not compile. Added the same
putResponsehelper (identical to main's) to 2.0'sMcpTestBase.java, next to the existingdeleteResponse/postResponsehelpers, as the minimal enabler for the ported test — no otherbehavior in that file was touched.
Please double-check
McpServer.javaimport resolution: confirmMcpStatelessServerTransportreally isn't neededon 2.0 (it was unused in the file both before and after this change).
McpUsageRecorder.javaresolution: confirm 2.0 is meant to keep the 3-argrecord(...)overload (it predates this PR and is unrelated to it, so it was preserved as-is).
putResponseinMcpTestBase.java— straight port of main's existing helper, no logicchanges.
Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #37704 is asked to look.
resolver run