Homec4science

Consolidate "Subscribers" Herald field value logic

Authored by epriestley <git@epriestley.com> on Jun 8 2015, 19:18.

Description

Consolidate "Subscribers" Herald field value logic

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8455

Differential Revision: https://secure.phabricator.com/D13177

Details

Committed
epriestley <git@epriestley.com>Jun 8 2015, 19:18
Pushed
aubortJan 31 2017, 17:16
Parents
rPH2e0f18995059: Fix an issue with extended policy checks and `@mentions`
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH623aaf488dc3: Consolidate "Subscribers" Herald field value logic (authored by epriestley <git@epriestley.com>).Jun 8 2015, 19:18