Page MenuHomePhabricator

Diffusion - fix commits not importing fully
ClosedPublic

Authored by btrahan on Oct 17 2014, 4:23 PM.
Tags
None
Referenced Files
F13795052: D10723.id25745.diff
Sat, Sep 14, 7:20 AM
F13795051: D10723.id25746.diff
Sat, Sep 14, 7:20 AM
F13794274: D10723.diff
Sat, Sep 14, 2:25 AM
F13794273: D10723.id25747.diff
Sat, Sep 14, 2:24 AM
F13794272: D10723.id25746.diff
Sat, Sep 14, 2:24 AM
F13794271: D10723.id.diff
Sat, Sep 14, 2:24 AM
F13794269: D10723.id25745.diff
Sat, Sep 14, 2:23 AM
Unknown Object (File)
Sat, Sep 7, 7:22 AM

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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
309–313

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.