dosubot[bot] commented on issue #33605:
URL: https://github.com/apache/superset/issues/33605#issuecomment-2916451448

   <!-- Answer -->
   I did not find any existing issues or discussions specifically about 
dashboards sometimes not being deletable in Superset 4.0.1. The dashboard 
deletion process is handled in the backend by the `delete` function in 
`superset/dashboards/api.py`, which uses the `DeleteDashboardCommand`. This 
function can fail and prevent deletion if certain exceptions are raised, such 
as `DashboardNotFoundError`, `DashboardForbiddenError`, or 
`DashboardDeleteFailedError`—these would typically be logged as errors in your 
Superset logs if encountered during a delete attempt. Reviewing your logs for 
these specific errors may help pinpoint the cause of the failure in your case. 
You can see the relevant code and exception handling 
[here](https://github.com/apache/superset/blob/master/superset/dashboards/api.py).
   
   There was also a migration script added to implement "on delete cascade" for 
embedded dashboards, which could affect dashboard deletion if there are related 
embedded dashboard records. If your dashboards are linked to embedded 
dashboards, this relationship might be preventing deletion in some cases. You 
can review the migration logic 
[here](https://github.com/apache/superset/blob/master/superset/migrations/versions/2023-08-09_15-39_4448fa6deeb1__dd_on_delete_cascade_for_embedded_dashboards.py.py).
   
   If you are not seeing any errors in your logs, or if the dashboard is not 
linked to any embedded dashboards, it may help to provide any error messages or 
stack traces you find for further troubleshooting.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention my name [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/b3a467e3-770e-4a47-9a0f-0df33b933709?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/b3a467e3-770e-4a47-9a0f-0df33b933709?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/b3a467e3-770e-4a47-9a0f-0df33b933709?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/b3a467e3-770e-4a47-9a0f-0df33b933709?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b3a467e3-770e-4a47-9a0f-0df33b933709?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/b3a467e3-770e-4a47-9a0f-0df33b933709?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b3a467e3-770e-4a47-9a0f-0df33b933709?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/33605)


-- 
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]

Reply via email to