aminghadersohi commented on code in PR #44264:
URL: https://github.com/apache/superset/pull/44264#discussion_r4034920840
##########
superset/commands/database/exceptions.py:
##########
@@ -170,10 +170,12 @@ class DatabaseDeleteSoftDeletedDatasetsExistFailedError(
# are hidden (soft-deleted) rows even though their dataset list looks
empty.
message = _(
"Cannot delete a database whose only remaining datasets are "
- "soft-deleted. Restore them (POST /api/v1/dataset/<uuid>/restore) "
- "and delete them permanently once a purge capability ships, or "
- "remove the underlying rows out-of-band, before deleting the "
- "database."
+ "soft-deleted. Purge each one first — GET "
+ "/api/v1/dataset/<uuid>/purge-impact for its impact token, then "
+ "POST /api/v1/dataset/<uuid>/purge with "
+ '{"confirmed_impact_token": <token>} — or restore them '
+ "(POST /api/v1/dataset/<uuid>/restore) if they should live on, "
+ "before deleting the database."
Review Comment:
Verified at `10b8555`: wording applied, and the new assertion discriminates
— reverting the message and separately no-op'ing `SoftDeleteMixin.restore()`
each fail `test_delete_database_blocked_by_soft_deleted_dataset`. Dropping the
deferred import is also right: `error_handling` only pulls `views.base` under
`TYPE_CHECKING`. Closing from my side.
--
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]