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)
Fri, Mar 22, 11:58 AM
Unknown Object (File)
Sat, Mar 16, 8:06 AM
Unknown Object (File)
Sat, Mar 16, 8:06 AM
Unknown Object (File)
Thu, Mar 14, 6:34 PM
Unknown Object (File)
Thu, Mar 14, 6:32 PM
Unknown Object (File)
Thu, Mar 14, 5:58 PM
Unknown Object (File)
Thu, Mar 14, 4:41 PM
Unknown Object (File)
Mon, Mar 11, 6:22 PM
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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.