EnxDev opened a new pull request, #40968: URL: https://github.com/apache/superset/pull/40968
### SUMMARY Removes the extension admin-settings layer entirely and simplifies chatbot resolution to **last-loaded wins**. After the earlier scope-reduction (Extensions admin page + settings *write* path removed), the only remaining use of `GET /api/v1/extensions/settings` was reading `active_chatbot_id` — a pin **nothing in the product could set** (it had become DB-edit-only). Keeping a read endpoint for an unsettable value was a half-removed remnant. This PR drops the whole layer and resolves the active chatbot purely from the view registry: **the most-recently-registered (last-loaded) chatbot wins** the singleton `superset.chatbot` slot. **Frontend** - `getActiveChatbot()` takes no arguments and returns the **last-registered** chatbot (was: first-registered + optional admin pin). - `ChatbotMount` resolves from the view registry alone — no settings fetch, no loading gate, no settings-store subscription. - Removed the settings store from `core/extensions` (`ExtensionSettings` type, `SETTINGS_ENDPOINT`, load/subscribe/snapshot). Kept the `extensions` namespace. **Backend** - Removed the `GET /settings` route + `can_get_settings` permission. - Deleted the settings command package, `ExtensionSettingsDAO`/`get_extension_settings`, and the `ExtensionSettings` model (+ its registration import). - New migration `e2f3a4b5c6d7` drops the `extension_settings` table (reversible). Net: **−383/+62**, ~320 lines deleted. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF _N/A — no visible UI change. The chatbot bubble renders as before; only the selection policy and the (already UI-less) settings plumbing change._ ### TESTING INSTRUCTIONS **Backend** ```bash pytest tests/unit_tests/extensions/ # 41 passing (3 settings tests removed) ``` - `GET /api/v1/extensions/settings` now returns **404/405** (route removed). - Migration: `superset db upgrade` drops `extension_settings`; `superset db downgrade` recreates it (reversible). **Frontend** (`ENABLE_EXTENSIONS` on, a chatbot extension on disk) - Chatbot bubble still renders via `ChatbotMount`. - With two chatbot extensions registered, the **last to register** owns the bubble. - `npm run test -- src/core/chatbot src/components/ChatbotMount` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Required feature flags: `ENABLE_EXTENSIONS` - [x] Changes UI _(chatbot selection policy; no admin pin)_ - [x] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [x] Migration is atomic, supports rollback & is backwards-compatible - [x] Confirm DB migration upgrade and downgrade tested - [x] Runtime estimates and downtime expectations provided _(single `DROP TABLE extension_settings`; near-instant, no downtime)_ - [ ] Introduces new feature or API - [x] Removes existing feature or API _(extension settings endpoint + admin chatbot pin)_ **Behavior change:** there is no admin chatbot pin anymore — when multiple chatbot extensions load, the last to register takes the singleton bubble. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
