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)
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)
Oct 23 2024, 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
Branch
almanac10
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20058
Build 27206: Run Core Tests
Build 27205: arc lint + arc unit

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.