Could we look at making it a requirement for there to be no nodes in an application before it is deleted? Or at least make it much more apparent that you are deleting an application vs a Node. I just deleted an application with 30+ nodes. I know I should have had a backup but we just moved the server and had not got it set up.
I believe this is already there
Could we look at making it a requirement for there to be no nodes in an application before it is deleted?
I’m afraid that if we do this, that somebody else will request a feature to automatically delete all devices when deleting an application because he has 1k devices which is a pain to remove one by one…
brocaar, I think this is a bad argument.
Mass deletion should never be ‘easy’. That’s a very poor model. An accidental deletion can’t be undone without either restoring from backup or manually touching every devices.
Further, when you do delete, Chirp is actually fully deleting those records from postgres. Not marking for deletion, or marking inactive, GONE. Ie, not-recoverable.
When someone deletes an application, it needs to be more ‘aggressive’ in the verification. Ie, type “DELETE APPLICATION AND ALL DEVICES” typed out before you can hit OK. This is a massively destructive operation and it’s far far far too easy right now.
As far as deleting devices, this could be handled much more gracefully. Allow the deletion of an application (really though, mark it inactive…) and then go into devices and have an option to delete unattached devices or assign unattached devices to an application.
Just putting the required typing in is a duct tape fix for both scenarios. The separate delete applications and delete/handle orphaned devices solves both scenarios and improves on them greatly.
Just deleted Application with 10 devices instead of deleting just http Integration.
And it was my second time for two years.
Vote for typing “DELETE”.
Sorry Meh, I hope that it will not be too much of a challenge for you to get them added. I strongly encourage there to be more checks to prohibit this from happening to other people.
Next time it can be 100+ devices…
Maybe a tangible warning? When you move to delete an application outright the warning message states that “This application contains X devices. Are you sure you want to…” And then maybe a nested warning, if you click ‘Ok’ there’s another one “X Devices. Are you ABSOLUTELY sure?”
IMHO, by the time you have 100+ devices you would sure have backups and I can suggest you to get used to API. Having database backup is just basic, no need to explain that.
But I find it quite handy to also have device registration keys backed up in simple text/json format. That way if anything happens you can quickly find registration for any device and also using simple scripts you can register whatever number of devices automatically.
And guess what - API does not ask you for ANY confirmation, it just does what you tell it to do, so you can delete all your devices in one simple step.
If you did not want to do that? Well, mistakes happen, be carefull next time.
An API and a web app are very diferent.
This kind of thinking is why we have moved our system to AWS IoT LoraWan. As a developer, we should be doing our best to code for dumb, and frankly telling me that I was dumb for not having a backup is lazy and immature at best. One should never tell their customer that too bad should have had a backup, or pay attention next time. ANY DESTRUCTIVE OPERATION SHOULD BE MORE THAN A CLICK!
Why not just do what amazon and every other company has moved to and make the user type in “DELETE” or the name of the service they want to delete?
I’ve seen too much time wasted doing that (and did myself) while the “foolproofing” features were never even used. Then there might be not enough time to solve actual problems. Thats why I’m showing you the other side of coin, not to make you fool, so please don’t talk about maturity.
Point is that person responsible for this stuff should understand their responsibility. Beacuseif not, then we could start discussing what is and what is not destructive operation and I could tell you that deleting a single device is desstructive, because you loose your keys. Or a gateway, thats even worse.
P.S.: I find it very positive that you think Chirpstack is mature enough to be used by regular Joes. This shows that Chirpstack has come a long way in just a few years, which is great!
If somebody would create a pull-request for this