Page MenuHomePhabricator

Extract PHIDs from transactions later, fixing Paste extraction/attachment
ClosedPublic

Authored by epriestley on Nov 16 2015, 6:22 PM.
Tags
None
Referenced Files
F18852832: D14494.id.diff
Fri, Oct 31, 12:24 PM
F18850106: D14494.diff
Thu, Oct 30, 2:32 PM
F18771122: D14494.id35065.diff
Wed, Oct 8, 5:47 PM
F18762149: D14494.diff
Oct 6 2025, 5:45 PM
F18705622: D14494.id.diff
Sep 28 2025, 12:16 PM
F18638660: D14494.id35078.diff
Sep 17 2025, 11:18 AM
F18628593: D14494.diff
Sep 16 2025, 6:40 AM
F18523971: D14494.diff
Sep 6 2025, 11:30 AM
Subscribers
None

Details

Summary

Fixes T9787. Currently, file PHID extraction logic happens very early, before we normalize/merge/etc the transactions.

In D14390, I changed how the CONTENT transaction works: before, callers would pass in a file PHID. Afterward, they just pass in the content.

Passing in the content is generaly easier and feels more correct, but inadvertenly broke PHID extraction because converting the content into a file PHID now happened after we extracted the PHID. So we'd extract the entire text of the paste as a "file PHID", which wouldn't work.

Instead, extract file PHIDs later. This impacts a couple of other applications (Conpherence, Pholio) which receive an object or have an unusual file-oriented transaction.

Test Plan
  • Made a new paste, verified the raw file attached to it properly.
  • Made and updated a mock, verified all the files attached properly.
  • Updated a Conpherence room image, verified the files attached properly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Extract PHIDs from transactions later, fixing Paste extraction/attachment.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Nov 17 2015, 5:17 AM
This revision was automatically updated to reflect the committed changes.