Open jeremystretch opened 3 months ago
We should be able to work around this by deferring constraint checks until the end of the transaction.
This approach may not be tenable, as it would require altering all existing unique constraints in NetBox to be deferrable. In addition to the complexity of such an undertaking, the use of deferrable constraints might also result in reduced performance for certain queries.
Plugin Version
v0.2.0
NetBox Version
v4.1-beta1
Python Version
3.10
Steps to Reproduce
IntegrityError
is raised, complaining that the name of the interface being created is not unique to the device (which is expected).Expected Behavior
The merge should be successful, as the offending object has been deleted.
Observed Behavior
The same exception continues to be raised, because the branch's history is being replayed in chronological order:
We should be able to work around this by deferring constraint checks until the end of the transaction.