absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.46k stars 671 forks source link

MG-2007 - Rollback Policies if Entity Creation Fails #2255

Closed rodneyosodo closed 3 months ago

rodneyosodo commented 4 months ago

What type of PR is this?

This is a bug fix because it fixes the following issue: #2003 and #2007

What does this do?

Ensures we roll back policies if entity creation fails. We first create policy, then create entity and finally if we have an error we rollback the policies

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

Yes, I have included tests for my changes. Refined SDK tests will be done by @1998-felix on https://github.com/absmach/magistrala/issues/888

Did you document any new/modified feature?

No documentation needed

Notes