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
F15389429: D14490.id.diff
Sat, Mar 15, 5:14 AM
F15388742: D14490.diff
Sat, Mar 15, 4:20 AM
F15378934: D14490.diff
Thu, Mar 13, 5:42 PM
Unknown Object (File)
Feb 14 2025, 3:52 AM
Unknown Object (File)
Feb 11 2025, 12:28 AM
Unknown Object (File)
Feb 8 2025, 11:48 PM
Unknown Object (File)
Feb 8 2025, 11:48 PM
Unknown Object (File)
Feb 8 2025, 11:48 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.