functions
functions copied to clipboard
Cascade delete routes when deleting an app.
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
This just came up while working on #523. I can make the changes there if this is the desired behavior.
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.
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.
Hi @ucirello,
By "client side" are you suggesting this will be done as part of the Picasso API?
Best Regards,
Rob