aminghadersohi commented on code in PR #38534:
URL: https://github.com/apache/superset/pull/38534#discussion_r2907813458


##########
superset/core/mcp/core_mcp_injection.py:
##########
@@ -252,22 +252,33 @@ def initialize_core_mcp_dependencies() -> None:
     Also imports MCP service app to register all host tools BEFORE extension 
loading.
     """
     try:
-        # Replace the abstract decorators with concrete implementations
-
         import superset_core.mcp.decorators
+    except ImportError:
+        logger.info(
+            "superset-core MCP module not available, skipping MCP 
initialization"
+        )
+        return

Review Comment:
   Good call — removed. c8989d2



##########
superset/initialization/__init__.py:
##########
@@ -544,12 +544,17 @@ def init_core_dependencies(self) -> None:
         from superset.core.api.core_api_injection import (
             initialize_core_api_dependencies,
         )
-        from superset.core.mcp.core_mcp_injection import (
-            initialize_core_mcp_dependencies,
-        )
 
         initialize_core_api_dependencies()
-        initialize_core_mcp_dependencies()
+
+        try:
+            from superset.core.mcp.core_mcp_injection import (
+                initialize_core_mcp_dependencies,
+            )
+
+            initialize_core_mcp_dependencies()
+        except ImportError:
+            logger.info("MCP dependencies not available, skipping MCP 
initialization")

Review Comment:
   Agreed, removed. c8989d2



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to