Page MenuHomePhabricator

Use Interface transactions, not Device transactions, to destroy Interfaces
ClosedPublic

Authored by epriestley on Apr 10 2018, 1:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 2:52 AM
Unknown Object (File)
Thu, Apr 18, 5:49 AM
Unknown Object (File)
Thu, Apr 18, 5:24 AM
Unknown Object (File)
Thu, Apr 18, 4:31 AM
Unknown Object (File)
Sat, Apr 6, 6:47 PM
Unknown Object (File)
Sat, Apr 6, 5:49 AM
Unknown Object (File)
Sun, Mar 31, 2:38 AM
Unknown Object (File)
Sat, Mar 30, 4:41 PM
Subscribers
None

Details

Summary

Depends on D19324. Ref T13120. Ref T12414.

This moves "Destroy Interface" to use Interface transactions instead of Device transactions, so we can ultimately get rid of the complex and difficult-to-modernize AlmanacDeviceTransaction::TYPE_INTERFACE.

This transaction is a bit weird since it makes the interface delete itself, but this should work OK for now. At some point in the future I'd probably want to change this into more of a "disable" action, but I don't think we face any immediate peril by retaining this behavior for now.

Test Plan
  • Destroyed interfaces on devices using the web UI, saw them vanish.
  • Ran daemons, nothing fataled/exploded even though the transaction is weird and destroys the object it affects.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley added a child revision: Restricted Differential Revision.Apr 10 2018, 1:38 PM
epriestley added a child revision: Restricted Differential Revision.
  • Only raise an error about deletion of in-use interfaces if there's actually a deleting transaction.
This revision is now accepted and ready to land.Apr 10 2018, 6:42 PM
This revision was automatically updated to reflect the committed changes.