mikebridge commented on code in PR #44264:
URL: https://github.com/apache/superset/pull/44264#discussion_r4031519722
##########
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:
Addressed in a0e3eac1d7d9657ad20854909ed1b901cb6bdca0 with your suggested
wording and matching translation entry. The real-row validation test checks the
corrected message, restores the dataset, and verifies that the live-dataset
refusal still blocks deletion. The wording assertion failed before the change;
all 3 delete-command tests pass afterward. Also removed the unsupported
import-cycle comment and hoisted json_error_response alongside the existing
error_handling import. Two body-less endpoint tests and the existing unstacked
envelope test pass on isolated SQLite; pre-commit and independent
final-snapshot review completed.
--
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]