EnxDev opened a new pull request, #40916: URL: https://github.com/apache/superset/pull/40916
## Summary This PR reduces the extension system to the minimum infrastructure required by the Chatbot SIP. The goal is to preserve: * the `superset.chatbot` contribution point * extension view registration and rendering * chatbot mounting and resolution * read-only chatbot settings * the existing static deployment model (extensions loaded from disk via `LOCAL_EXTENSIONS` / `EXTENSIONS_PATH`) while removing extension-management functionality that is not required by the current SIP and deferring those concerns to future extension-platform SIPs. Runtime extension management (install/uninstall), per-extension lifecycle management (enable/disable), and extension dependency management are not being redesigned or replaced here. These capabilities are intentionally deferred to future extension-platform SIPs focused on lifecycle, dependency resolution, and runtime extension administration. The goal of this PR is to establish the minimum stable extension foundation required for chatbot integrations while avoiding introducing partially implemented lifecycle or dependency-management systems. ### Removed #### Dynamic install/uninstall Removed the extension-management APIs and UI used to install or uninstall extensions at runtime: * `POST /api/v1/extensions` * `DELETE /api/v1/extensions` * `ExtensionsList` admin page * `ExtensionsView` backend SPA shell * `/extensions/list/` route * "Extensions" manage-menu entry #### Per-extension enable/disable lifecycle Removed runtime enable/disable support: * `extension_enabled` table (replaced by a migration that drops the table) * `ExtensionEnabled` model * `ExtensionEnabledDAO` * `enabled` map from extension settings * `enabledMap` parameter from `getActiveChatbot` * `ExtensionsLoader.deactivateExtension()` * extension disposal tracking used exclusively by runtime enable/disable flows #### Settings write path Extension settings are now read-only. Removed: * `PUT /api/v1/extensions/settings` * `UpdateExtensionSettingsCommand` * `ExtensionSettingsPutSchema` * extension settings exceptions * `ExtensionSettingsDAO.upsert_active_chatbot_id` * frontend `setExtensionSettings()` and `saveExtensionSettings()` #### Unused dependency fields Removed unused dependency metadata that was never consumed by the runtime: * backend `manifest.dependencies` * frontend `Extension.dependencies` * frontend `Extension.extensionDependencies` #### Duplicate models Removed duplicate `ExtensionSettings` and `ExtensionEnabled` model definitions from `superset/models/core.py`. ### Kept The chatbot-extension foundation remains intact: * view registry * `superset.chatbot` contribution point * `ChatbotMount` * `ExtensionsStartup` * `ExtensionsLoader` startup flow * static extension loading via `init_extensions()` * in-memory extension importer * `GET /api/v1/extensions/settings` (read-only) ### Behavioral change Since the settings write path has been removed, `active_chatbot_id` can no longer be configured through the UI. When no chatbot is explicitly selected, `getActiveChatbot()` falls back to the first registered chatbot. This matches the Chatbot SIP's default-resolution behavior and supports the common case where a deployment has a single installed chatbot extension. ### Testing * Backend extension API tests updated to reflect the removal of install/uninstall and settings-write functionality. * Frontend tests updated to remove enable/disable and extension-management coverage. * Added migration coverage for removal of the `extension_enabled` table. * Verified chatbot registration, resolution, startup loading, and rendering behavior remain unchanged. ### Additional Information * Removes existing extension-management functionality. * Includes a database migration that drops `extension_enabled`. * Migration supports rollback via downgrade. * No changes to the static extension deployment model. * No changes to chatbot contribution-point behavior. * No feature flags required. ### Follow-up work The following areas are intentionally deferred to future extension-platform SIPs: * Runtime extension installation and uninstallation * Per-extension enable/disable lifecycle management * Extension dependency resolution and validation * Extension startup ordering and lifecycle orchestration * Advanced extension administration and management workflows These concerns are outside the scope of the Chatbot SIP and will be addressed separately as the extension platform evolves. -- 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]
