1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications
epriestley 18938b5310 Migrate Differential comments to ApplicationTransactions
Summary:
Ref T2222. This is the big one.

This migrates each `DifferentialComment` to one or more ApplicationTransactions (action, cc, reviewers, update, comment, inlines), and makes `DifferentialComment` a double-reader for ApplicationTransactions.

The migration is pretty straightforward:

  - If a comment took an action not otherwise covered, it gets an "action" transaction. This is something like "epriestley abandoned this revision.".
  - If a comment updated the diff, it gets an "updated diff" transaction. Very old transactions of this type may not have a diff ID (probably only at Facebook).
  - If a comment added or removed reviewers, it gets a "changed reviewers" transaction.
  - If a comment added CCs, it gets a "subscribers" transaction.
  - If a comment added comment text, it gets a "comment" transaction.
  - For each inline attached to a comment, we generate an "inline" transaction.

Most comments generate a small number of transactions, but a few generate a significant number.

At HEAD, the code is basically already doing this, so comments in the last day or two already obey these rules, roughly, and will all generate only one transaction (except inlines).

Because we've already preallocated PHIDs in the comment text table, we only need to write to the transaction table.

NOTE: This significantly degrades Differential, making inline comments pretty much useless (they each get their own transaction, and don't show line numbers or files). The data is all fine, but the UI is garbage now. This needs to be fixed before we can deploy this to users, but it's easily separable since it's all just display code.

Specifically, they look like this:

{F112270}

Test Plan:
I've migrated locally and put things through their paces, but it's hard to catch sketchy stuff locally because most of my test data is nonsense and bad migrations wouldn't necessarily look out of place.
IMPORTANT: I'm planning to push this to a branch and then shift production over to the branch, and run it for a day or two before bringing it to master.

I generally feel good about this change: it's not that big since we were able to separate a lot of pieces out of it, and it's pretty straightforward. That said, it's still one of the most scary/dangerous changes we've ever made.

Reviewers: btrahan

CC: chad, aran

Maniphest Tasks: T2222

Differential Revision: https://secure.phabricator.com/D8210
2014-02-12 14:34:48 -08:00
..
arcanist/conduit Move Conduit methods inside applications 2012-12-21 12:21:59 -08:00
audit Perform search indexing in the worker queue and respect bin/search index --background 2014-01-14 13:22:56 -08:00
auth Miniturize the nav buttons 2014-01-31 09:10:32 -08:00
base Remove quick create buttons from application launcher 2014-01-29 17:23:50 -08:00
cache Complete modularization of the GC daemon 2014-01-15 10:02:31 -08:00
calendar Assign PHIDs to calendar events 2014-02-06 10:10:43 -08:00
chatlog Provide convenience method addTextCrumb() to PhabricatorCrumbsView 2013-12-18 17:47:34 -08:00
conduit Add diffusion.querycommits and deprecate diffusion.getcommits 2014-01-27 17:14:21 -08:00
config Mailgun receive support 2014-01-21 10:36:33 -08:00
conpherence Rename "status" to "event" in most URIs / classes / etc 2014-02-06 10:10:07 -08:00
countdown [Countdown] fix undefined variable errors 2014-02-05 05:33:31 -08:00
daemon Do not perform write in PhabricatorDaemonLogQuery by default 2014-01-21 14:04:12 -08:00
dashboard Add edit/view plumbing for dashboards and panels 2014-02-03 10:52:15 -08:00
differential Migrate Differential comments to ApplicationTransactions 2014-02-12 14:34:48 -08:00
diffusion Diffusion - fix browse file bug 2014-02-11 10:38:27 -08:00
diviner Miniturize the nav buttons 2014-01-31 09:10:32 -08:00
doorkeeper Move PhabricatorTagView to PHUITagView 2014-01-14 14:09:52 -08:00
draft/storage Add draft support to ApplicationTransactions 2012-12-21 05:57:14 -08:00
drydock Simplify PHUIObjectBoxViews handling of Save and Error states 2014-01-10 09:17:37 -08:00
fact Extend all "ManagementWorkflow" classes from a base class 2013-12-27 13:15:40 -08:00
feed Translate Differential Feed/Comment/Asana stories 2014-02-09 10:07:29 -08:00
files Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
flag Work around a bug in PHP 5.3-ish with abstract methods in interfaces 2013-10-25 15:58:17 -07:00
harbormaster Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
help/controller Make Differential views capability-sensitive 2013-09-26 18:45:04 -07:00
herald Support "only the first time" in Maniphest 2014-02-11 07:45:26 -08:00
home Fix jump nav for new search stuff 2014-02-03 14:30:16 -08:00
legalpad Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
lipsum Extend all "ManagementWorkflow" classes from a base class 2013-12-27 13:15:40 -08:00
macro Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
mailinglists Simplify PHUIObjectBoxViews handling of Save and Error states 2014-01-10 09:17:37 -08:00
maniphest Rebuild custom field indexes when rebuilding standard/fulltext search indexes 2014-02-10 14:32:45 -08:00
meta Remove quick create buttons from application launcher 2014-01-29 17:23:50 -08:00
metamta Allow unsubscription from projects 2014-02-11 07:45:56 -08:00
notification Add dates to notifications page 2014-01-22 20:09:32 -08:00
nuance Simplify PHUIObjectBoxViews handling of Save and Error states 2014-01-10 09:17:37 -08:00
oauthserver Initialize used variable 2013-07-09 21:55:27 -07:00
owners Simplify PHUIObjectBoxViews handling of Save and Error states 2014-01-10 09:17:37 -08:00
passphrase Detect and prompt for passwords on SSH private keys, then strip them 2014-01-30 11:43:06 -08:00
paste Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
people Rebuild custom field indexes when rebuilding standard/fulltext search indexes 2014-02-10 14:32:45 -08:00
phame Simplify PHUIObjectBoxViews handling of Save and Error states 2014-01-10 09:17:37 -08:00
phid Make Drydock Lease and Resource PHIDs use newer PHID infrastructure 2013-12-26 12:29:58 -08:00
phlux Simplify PHUIObjectBoxViews handling of Save and Error states 2014-01-10 09:17:37 -08:00
pholio Pholio - robustify submission errors to retain image edits 2014-02-11 11:38:10 -08:00
phortune Provide convenience method addTextCrumb() to PhabricatorCrumbsView 2013-12-18 17:47:34 -08:00
phpast Replace some hsprintf() by phutil_tag() 2013-11-11 09:23:23 -08:00
phragment Simplify PHUIObjectBoxViews handling of Save and Error states 2014-01-10 09:17:37 -08:00
phrequent Lock policy queries to their applications 2013-10-21 17:20:27 -07:00
phriction Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
policy Make the "you can't edit away your edit capability" policy check generic 2014-02-10 14:31:16 -08:00
ponder Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
project Fix project editing issue with moving wikis 2014-02-11 11:30:38 -08:00
releeph Migrate Differential comments to ApplicationTransactions 2014-02-12 14:34:48 -08:00
remarkup/conduit Support processing Remarkup in bulk with remarkup.processbulk Conduit method 2013-11-02 16:30:11 -07:00
repository When creating foreign stubs during SVN import, mark them imported 2014-02-03 12:21:03 -08:00
search Fix alternate filtering conditions in object selector dialog 2014-02-11 07:45:33 -08:00
settings Miniturize the nav buttons 2014-01-31 09:10:32 -08:00
slowvote Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
subscriptions Make Projects a PhabricatorSubscribableInterface, but with restricted defaults 2014-02-10 14:29:17 -08:00
system Replace some hsprintf() by phutil_tag() 2013-11-11 09:23:23 -08:00
tokens Wrap the feed text rendering stuff with htmlspecialchars_decode 2014-02-03 17:05:30 -08:00
transactions PHUITimelineView 2014-02-12 09:02:05 -08:00
typeahead Migrate project profiles onto projects, and remove ProjectProfile object 2014-02-10 14:32:14 -08:00
uiexample PHUITimelineView 2014-02-12 09:02:05 -08:00
xhprof Make most file reads policy-aware 2013-09-30 09:38:13 -07:00