rusackas opened a new pull request, #38107: URL: https://github.com/apache/superset/pull/38107
### SUMMARY When creating a new database connection, the "Allow file uploads to database" checkbox was missing from the Advanced options. This checkbox correctly appears when editing an existing connection. **Root Cause:** 1. When selecting a database type, `engine_information` (containing `supports_file_upload`) is set from the `/api/v1/database/available/` response 2. After successfully creating the database, the POST response updates state via the `Fetched` action 3. The POST response doesn't include `engine_information` (it's not in `add_columns`) 4. The `Fetched` reducer was overwriting the entire state, losing the `engine_information` that was previously set 5. `ExtraOptions` checks `db?.engine_information?.supports_file_upload` to determine whether to render the checkbox **Fix:** Preserve `engine_information` from the existing state when the `Fetched` action payload doesn't include it. This follows the same pattern already used for `engine`, `parameters`, and `ssh_tunnel` fields in the reducer. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF **Before (CREATE mode):** Checkbox missing **After (CREATE mode):** Checkbox visible (same as EDIT mode) *(Screenshots from the original issue show the problem)* ### TESTING INSTRUCTIONS 1. Navigate to Settings → Database Connections 2. Click "+ Database" to create a new connection 3. Select any database type (e.g., PostgreSQL, MySQL) 4. Fill in the connection details 5. Click "Connect" 6. **Verify:** In the Advanced options that appear after connecting, the "Allow file uploads to database" checkbox should now be visible 7. Compare with editing an existing database - the checkbox should appear in both cases ### ADDITIONAL INFORMATION - [x] Has associated issue: Fixes #30504 - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.ai/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]
