functions icon indicating copy to clipboard operation
functions copied to clipboard

Cascade delete routes when deleting an app.

Open robputt opened this issue 8 years ago • 4 comments

Hi,

As per my request in Picasso Blueprint - https://blueprints.launchpad.net/picasso/+spec/cascade-delete can we add a feature which deletes all routes in an app when deleting an app rather than requiring the client to delete all routes before deleting the app.

Best Regards,

robputt796

robputt avatar Feb 16 '17 09:02 robputt

This just came up while working on #523. I can make the changes there if this is the desired behavior.

jmank88 avatar Feb 16 '17 12:02 jmank88

I just noticed that this check is performed by calling Datastore.GetRoutesByApp and confirming len==0, which is O(n) in the number of routes. It can instead be O(1) if done from inside RemoveApp (better for db consistency too), or with a new method like HasRoutes() bool.

On the other hand, if this check is completely going away (not becoming optional), then that usage will just be removed.

jmank88 avatar Mar 06 '17 13:03 jmank88

For certain aspects of the UX, we do prefer things to be easy rather than simple. I suspect this could be done on client-side, however, with proper scripting - as a stop gap. Not most efficient way ever, but would assure a quick delivery. And not polute unrelated PRs.

ucirello avatar Mar 25 '17 17:03 ucirello

Hi @ucirello,

By "client side" are you suggesting this will be done as part of the Picasso API?

Best Regards,

Rob

robputt avatar Apr 10 '17 13:04 robputt