obfuscurity / descartes

Introspective dashboard for Graphite
MIT License
502 stars 65 forks source link

Dashboard not deleted properly #93

Closed obfuscurity closed 11 years ago

obfuscurity commented 11 years ago

Found at least one case of a dashboard (octo 159a711c3e3d18b62587d0069d89dbe5) where all graph_dashboard_relations were deleted but the dashboards entry remained. The user experience is ok since it still redirects us back to the dashboards list, but this is broken nonetheless.

obfuscurity commented 11 years ago

Unable to repro. Gonna check to see if there are any other straggler dashboards in prod. Might have to chalk this one off to a fluke. Perhaps come up with a rake task to search-and-destroy these in the db.

obfuscurity commented 11 years ago

Still unable to repro and it's only happened with that one dashboard. Gonna close this but here's the process for tracking down any future stragglers.

irb(main):001:0> Dashboard.all.each do |d|
irb(main):002:0> Dashboard[d.id].destroy if GraphDashboardRelation.filter(:dashboard_id => d.id).all.count == 0
irb(main):003:0> end