Page MenuHomePhabricator

Diffusion - fix commits not importing fully
ClosedPublic

Authored by btrahan on Oct 17 2014, 4:23 PM.
Tags
None
Referenced Files
F14321351: D10723.id25746.diff
Wed, Dec 18, 11:42 AM
Unknown Object (File)
Thu, Dec 12, 11:20 PM
Unknown Object (File)
Mon, Dec 9, 12:50 PM
Unknown Object (File)
Sun, Dec 8, 6:04 PM
Unknown Object (File)
Thu, Dec 5, 9:31 AM
Unknown Object (File)
Mon, Dec 2, 4:29 PM
Unknown Object (File)
Wed, Nov 27, 4:05 PM
Unknown Object (File)
Wed, Nov 27, 1:51 PM

Details

Summary

Fixes T6336. Turns out that the function to update the import status updates that database and doesn't update the object. If the object doesn't get the pertinent update AND there's a herald rule that runs, then the object is later re-saved without ever getting the update flag.

Test Plan

logic in the ole sandbox and going to push it to prod and run re-parse on impacted commits

Diff Detail

Repository
rP Phabricator
Branch
T6336
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2860
Build 2864: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

btrahan retitled this revision from to Diffusion - fix commits not importing fully.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
btrahan added a subscriber: chad.
src/applications/audit/editor/PhabricatorAuditEditor.php
304–310

I could also just make this one save?

epriestley edited edge metadata.
This revision is now accepted and ready to land.Oct 17 2014, 4:24 PM

writeImportStatusFlag() is slightly safer than just doing a save() because it's race-resistant (it does an atomic write instead of a read-update-write). But maybe writeImportStatusFlag() could set the flag on the Commit.

btrahan edited edge metadata.
  • update object import status as part of writing flag
    • checked existing callsites and this is safe
  • bonus bug fix - if a herald editor, then default the "Added by $name" to have $name as 'herald'.
This revision was automatically updated to reflect the committed changes.