feat(extensions): improve extension loading for backend modules

- Add load_extension_backend() to install in-memory modules and import entry points
- Entry points are module names that self-register on import
- Add volume mounts in docker-compose-light.yml for extensions development:
  - superset-core for local Pydantic models
  - extensions directory for .supx bundles
- Add EXTENSIONS_PATH config support
- Simplify init_extensions() to delegate to get_extensions()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Beto Dealmeida
2026-02-02 17:23:53 -05:00
parent 9c0337d092
commit 91d018c52d
4 changed files with 45 additions and 24 deletions

View File

@@ -105,7 +105,15 @@ class CeleryConfig:
CELERY_CONFIG = CeleryConfig
FEATURE_FLAGS = {"ALERT_REPORTS": True}
# Extensions configuration
# For local development, point to the extensions directory
# Note: If running in Docker, this path needs to be accessible from inside the container
EXTENSIONS_PATH = os.getenv("EXTENSIONS_PATH", "/app/extensions")
FEATURE_FLAGS = {
"ALERT_REPORTS": True,
"ENABLE_EXTENSIONS": True,
}
ALERT_REPORTS_NOTIFICATION_DRY_RUN = True
WEBDRIVER_BASEURL = f"http://superset_app{os.environ.get('SUPERSET_APP_ROOT', '/')}/" # When using docker compose baseurl should be http://superset_nginx{ENV{BASEPATH}}/ # noqa: E501
# The base URL for the email report hyperlinks.