msyavuz opened a new pull request, #42240: URL: https://github.com/apache/superset/pull/42240
### SUMMARY Uploading an invalid file under "Import database from file" left the modal stuck: the progress spinner span forever and the trash icon did nothing. Only closing and reopening the modal cleared it. The `Upload` had no `fileList` prop, so it was uncontrolled — antd rendered its own internal list while React's `fileList` state was updated separately and never displayed. Since `customRequest` is a no-op that never calls `onSuccess`/`onError`, antd's entry stayed at `status: 'uploading'` forever (the spinner), and `removeFile`'s `setFileList` updated state nobody rendered (the dead trash icon). One cause, both symptoms. Passing `fileList` makes it controlled: `onDbImport` already sets `status: 'done'`, so the spinner settles and the remove icon clears the entry. Two notes for reviewers: - `removeFile`'s `return false` looks like the bug but is load-bearing — returning `true` makes antd fire `onChange` → `onDbImport` with the removed file, starting a bogus re-import. - Also drops a stale `.ant-upload-list-item-card-actions` rule: an antd v4 selector that matches nothing in v6, so it was dead code hiding an icon that should work. ### TESTING INSTRUCTIONS 1. Settings > Database Connections > + Database 2. Under "Import database from file", upload a .zip that is not a valid Superset export 3. Error banner appears; the spinner stops and the trash icon removes the entry, letting you retry without closing the modal Added a regression test that fails on master with `Received: ant-upload-list-item ant-upload-list-item-uploading` — the stuck spinner itself. ### ADDITIONAL INFORMATION - [ ] Has associated issue: No — reported internally - [ ] Required feature flags: None - [x] Changes UI — the upload entry in the DB import modal now resets - [ ] Includes DB Migration: No - [ ] Introduces new feature or API: No - [ ] Removes existing feature or API: No -- 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]
