Page MenuHomePhabricator

Consolidate "Subscribers" Herald field value logic
ClosedPublic

Authored by epriestley on Jun 6 2015, 11:24 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 6:05 PM
Unknown Object (File)
Thu, Apr 11, 9:14 AM
Unknown Object (File)
Thu, Apr 11, 8:14 AM
Unknown Object (File)
Thu, Mar 28, 5:20 PM
Unknown Object (File)
Mon, Mar 25, 4:25 AM
Unknown Object (File)
Mon, Mar 25, 4:25 AM
Unknown Object (File)
Mar 15 2024, 7:58 AM
Unknown Object (File)
Feb 3 2024, 4:48 AM
Subscribers

Details

Summary

Ref T8455. The Herald code in general isn't nearly as modular as it should be, and the subscriber code particularly has some legacy cruft. This is making it fragile and causing the issue described in T8455.

Currently, each Herald adapter has essentially identical code which it uses to determine which users are subscribed to an object. Instead, share code between object types.

I removed "explicitCCs":

  • The value was always identical to doing the query in the common/standard way.
  • They were only used to print a diagnostic message on transcripts, which I think is no longer relevant.
    • I believe it predates transactions, so when it was added you couldn't figure out the old object state by looking at the transaction history. Now, CC changes are recorded there, so there's no need to restate the CC state on the transcript.
    • Even if we do want to restore this (or something similar), we can do it directly from Herald now.
Test Plan
  • Created rules that use the "CCs" field in Herald, Pholio, Maniphest and Differential.
  • Updated objects in each application.
  • Observed valid field reads in the tranascript.
  • Grepped for FIELD_CC.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Consolidate "Subscribers" Herald field value logic.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
  • Remove slightly more code.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Jun 8 2015, 4:10 PM
This revision was automatically updated to reflect the committed changes.