ARBS-23 opened a new issue, #44309:
URL: https://github.com/apache/superset/issues/44309
### Bug description
Bulk **Export → Delete → Import** of Datasets, Charts, or Dashboards from a
UI-produced ZIP fails to restore the deleted assets.
- **Datasets**: Import fails with `GENERIC_COMMAND_ERROR` (issue 1010) / UI
message `Import dataset failed for an unknown reason`. Rows are not restored.
- **Charts**: Import fails because each `charts/*.yaml` reports
`{'dataset_uuid': ['Missing data for required field.']}`. Charts are not
restored.
- **Dashboards**: Import fails with the same `dataset_uuid` validation error
on nested `charts/*.yaml` files. Dashboards are not restored.
This breaks the expected backup/restore workflow: a ZIP produced by the
list-view Export action should be able to restore the same assets after they
were deleted.
### How to reproduce the bug
1. Log in as a user who can export/delete/import Datasets, Charts, and
Dashboards.
2. Open **Datasets** → bulk-select multiple datasets (e.g. all on page 1) →
**Export** → save the ZIP.
3. With the same selection, **Delete** and confirm.
4. Click **Import dataset**, upload the ZIP from step 2, click **Import**.
5. Repeat steps 2–4 for **Charts** (toolbar **Import chart**; same bulk
export → delete → import).
6. Repeat steps 2–4 for **Dashboards** (exclude any system/default dashboard
if present).
### Screenshots/recordings
**Datasets import error**

**Charts import error**

**Dashboards import error**

### Expected behavior
The exported ZIP restores the deleted Datasets / Charts / Dashboards.
Restored assets appear in the lists and open normally.
### Actual behavior
**Datasets**
- UI: `Import dataset failed for an unknown reason`
- API: `GENERIC_COMMAND_ERROR` (issue 1010)
- Datasets are not restored
**Charts**
- UI: `An error occurred while importing chart: Error importing chart:`
- Per-file validation on `charts/*.yaml`:
```json
{"dataset_uuid": ["Missing data for required field."]}
```
- Charts are not restored
**Dashboards**
- UI: `An error occurred while importing dashboard: Error importing
dashboard:`
- Nested `charts/*.yaml` files report the same `dataset_uuid` missing-field
error
- Dashboards are not restored
### Superset version
6.1.0 (also observed on a deployment based on `apache/superset:6.1.0-py311`)
### Python version
3.11
### Node version
18 or greater
### Browser
Chrome
### Additional context
- OS: Windows 11
- Role: user with edit/export/import permission
- ZIP format from the list-view Export actions (not legacy JSON)
- Sample export ZIPs created **before** delete (from the original reporter):
-
[dataset_export_20260814T152014.zip](https://github.com/thaind-kaopiz/fstl-381-attachments/raw/main/exports/dataset_export_20260814T152014.zip)
-
[chart_export_20260814T135245.zip](https://github.com/thaind-kaopiz/fstl-381-attachments/raw/main/exports/chart_export_20260814T135245.zip)
-
[dashboard_export_20260814T135502.zip](https://github.com/thaind-kaopiz/fstl-381-attachments/raw/main/exports/dashboard_export_20260814T135502.zip)
- Chart/dashboard import schema requires `dataset_uuid` on chart YAML
(`ImportV1ChartSchema`). Export writes `dataset_uuid` from `model.table` in
`ExportChartsCommand._file_content`. If the exported chart YAML lacks that
field (or related datasets are missing/unimportable from the bundle),
validation fails with the message above.
- Dataset import failing with the generic `DatasetImportError` /
`GENERIC_COMMAND_ERROR` may be a separate failure in the dataset import path
(possibly soft-delete twin / overwrite / schema validation). Worth checking
whether `SOFT_DELETE` restore-via-import is involved when re-importing UUIDs
after Delete.
- Related historical `dataset_uuid: Missing data for required field` reports
(different contexts; please treat as related, not duplicates of this
restore-after-delete flow):
- https://github.com/apache/superset/issues/22298
- https://github.com/apache/superset/issues/31443
- Soft-delete / restore-via-import work (may affect Delete → Import):
https://github.com/apache/superset/pull/40130,
https://github.com/apache/superset/pull/40129
- Internal tracker (optional): gigaphoton/fabscape-superset#234
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [x] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
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]