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
F14073421: D19325.diff
Thu, Nov 21, 12:32 AM
Unknown Object (File)
Sun, Nov 17, 3:05 PM
Unknown Object (File)
Sat, Nov 9, 3:09 PM
Unknown Object (File)
Mon, Nov 4, 2:55 AM
Unknown Object (File)
Wed, Oct 23, 2:54 AM
Unknown Object (File)
Oct 21 2024, 5:04 AM
Unknown Object (File)
Oct 17 2024, 7:35 PM
Unknown Object (File)
Oct 3 2024, 1:35 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.