Deleting a device profile on Chirpstack 4 deletes the devices that use it

Hello,

Context:

  • Working on a ChirpStack v4.5.1
  • Configuration has been migrated from a ChirpStack v3 with the official migration tool
  • We have had no issues in months of operation

Issue:

  • A device profile used by several devices was misconfigured. A developer took the decision to delete it to create it from scratch. After deleting the misconfigured device profile, all devices that used it were removed from the database.

We have been able to replicate on the same environment this behavior with a test device profile and test devices.

My question here is if this behavior is a bug or is there a setting that our team has done wrong. We would expect to either be denied when requesting an action that will delete devices from ChirpStack as a secondary effect or at least be notified of the consequences of deleting a device profile in usage before this action can be taken.

Thank you

This is by design:

One could definitely argue whether this is the best design, though. One might be inclined to not allow non-empty applications or device profiles to be deleted.

Thanks for the answer. I should have checked the git for this before asking. We would argue that this might not be the best design. Having several devices deleted without warning might not be optimal.

Thank you again. I am marking this as solved.

Maybe we could update the delete popup? Iā€™m happy to review a pull-request for this.

2 Likes

@brocaar

Yes, we can update the delete popup with the proper message.

1 Like

I suggest only allowing to delete a device profile if no device uses that device profile.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.