eschutho opened a new pull request, #43842:
URL: https://github.com/apache/superset/pull/43842
### SUMMARY
`init_core_dependencies()` calls `initialize_core_mcp_dependencies()` in
**every** process that
builds the Flask app — including Celery workers, which never serve MCP.
Registering the MCP host
tools imports the MCP service app, which carries a real per-process memory
cost. On high-concurrency
prefork worker pools this import can push workers over their memory limit
and OOM them at boot.
This adds a `CORE_MCP_HOST_TOOLS_ENABLED` config flag (default `True`, so
**no behavior change**) and
gates the `initialize_core_mcp_dependencies()` call on it. Deployments can
set it to `False` for
processes that never serve MCP (e.g. Celery workers) to avoid importing the
MCP stack where it is
unused.
### CHANGES
- `superset/config.py`: new `CORE_MCP_HOST_TOOLS_ENABLED = True` flag with
docstring.
- `superset/initialization/__init__.py`: gate
`initialize_core_mcp_dependencies()` on
`self.config.get("CORE_MCP_HOST_TOOLS_ENABLED", True)`.
### TESTING INSTRUCTIONS
- Default (flag `True`): the web app and standalone MCP service register
host tools exactly as before.
- Set `CORE_MCP_HOST_TOOLS_ENABLED = False` in a worker's config: the worker
boots without importing
the MCP host-tool stack; web / MCP processes are unaffected.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]