This is an automated email from the ASF dual-hosted git repository.
FreeOnePlus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-mcp-server.git
The following commit(s) were added to refs/heads/master by this push:
new 9e7c1a7 fix: classify Doris permission probe failures (#195)
9e7c1a7 is described below
commit 9e7c1a79415718a44aa38038180a18a368f1e3bb
Author: Yijia Su <[email protected]>
AuthorDate: Sat Aug 1 13:18:28 2026 +0800
fix: classify Doris permission probe failures (#195)
---
CHANGELOG.md | 3 +++
doris_mcp_server/tools/capability_detector.py | 6 +++++-
test/tools/test_capability_detector.py | 19 ++++++++++++++++---
3 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fbfe3bd..b718fbb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,9 @@ under **Unreleased** until a new version is selected and
published.
- Documented the strict `/mcp` versus `/mcp/legacy` endpoint boundary in the
protocol, Host, quick-start, deployment, troubleshooting, migration, and
release guides without restoring pre-1.0 tool names or weakening security.
+- Classified Doris runtime probe errors whose messages explicitly report
+ denied access or missing privileges as permission failures, including Doris
+ error 1105 responses, instead of exposing a generic probe failure.
- Added the Apache SkyWalking Eyes release gate, its bounded repository
configuration, and the missing ASF license headers required for source
release verification.
diff --git a/doris_mcp_server/tools/capability_detector.py
b/doris_mcp_server/tools/capability_detector.py
index e4523e6..15bd85d 100644
--- a/doris_mcp_server/tools/capability_detector.py
+++ b/doris_mcp_server/tools/capability_detector.py
@@ -1348,7 +1348,11 @@ def _classify_probe_error(
(value for value in getattr(error, "args", ()) if isinstance(value,
int)),
None,
)
- if error_code in {1044, 1045, 1142, 1227}:
+ message = str(error).casefold()
+ if error_code in {1044, 1045, 1142, 1227} or any(
+ marker in message
+ for marker in ("access denied", "permission denied", "privilege")
+ ):
return (
CapabilityProbeStatus.UNKNOWN,
"PROBE_PERMISSION_DENIED",
diff --git a/test/tools/test_capability_detector.py
b/test/tools/test_capability_detector.py
index ef2e8e8..6c7fe7d 100644
--- a/test/tools/test_capability_detector.py
+++ b/test/tools/test_capability_detector.py
@@ -488,12 +488,25 @@ async def
test_pipeline_probes_isolate_an_unsupported_source_connection() -> Non
assert len({id(connection) for connection in manager.domain_connections})
== 7
[email protected](
+ ("error_code", "message"),
+ (
+ (1142, "permission denied"),
+ (
+ 1105,
+ "errCode = 2, detailMessage = Permission denied: user lacks
privilege",
+ ),
+ ),
+)
@pytest.mark.asyncio
-async def test_detector_marks_permission_failure_unknown_not_unsupported() ->
None:
+async def test_detector_marks_permission_failure_unknown_not_unsupported(
+ error_code: int,
+ message: str,
+) -> None:
connection = _ProbeConnection()
connection.failures["SHOW BACKENDS"] = RuntimeError(
- 1142,
- "permission denied",
+ error_code,
+ message,
)
detector = DorisCapabilityDetector( # type: ignore[arg-type]
_ProbeConnectionManager(connection)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]