Page MenuHomePhabricator

Permanently destroy Almanac properties with the destruction engine
ClosedPublic

Authored by joshuaspence on Nov 15 2015, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 2:20 AM
Unknown Object (File)
Fri, Dec 13, 6:21 PM
Unknown Object (File)
Fri, Dec 13, 6:21 PM
Unknown Object (File)
Sun, Dec 8, 7:22 AM
Unknown Object (File)
Tue, Dec 3, 4:06 PM
Unknown Object (File)
Mon, Dec 2, 8:16 AM
Unknown Object (File)
Mon, Dec 2, 8:16 AM
Unknown Object (File)
Mon, Dec 2, 8:15 AM
Subscribers

Details

Summary

As suggested in D14461.

Test Plan

Used ./bin/remove destroy on an Almanac service with properties attached, saw entries removed from the phabricator_almanac.almanac_property table.

Diff Detail

Repository
rP Phabricator
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 8864
Build 10365: Run Core Tests
Build 10364: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Permanently destroy Almanac properties with the destruction engine.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 15 2015, 8:48 PM

I think that we should eventually modularize this behavior because it is becoming rather unwieldy. Offhand, I think that we could do this with some PhabricatorDestructor subclass:

abstract class PhabricatorDestructor extends Phobject {
  abstract public function appliesToObject($object);
  abstract public function destruct($object_phid);
}
This revision was automatically updated to reflect the committed changes.

Yeah, agreed. Anywhere we're using instanceof is usually pretty suspicious.