Page MenuHomePhabricator

Diffusion - fix commits not importing fully
ClosedPublic

Authored by btrahan on Oct 17 2014, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Sep 14, 7:20 AM
Unknown Object (File)
Sat, Sep 14, 7:20 AM
Unknown Object (File)
Sat, Sep 14, 2:25 AM
Unknown Object (File)
Sat, Sep 14, 2:24 AM
Unknown Object (File)
Sat, Sep 14, 2:24 AM
Unknown Object (File)
Sat, Sep 14, 2:24 AM
Unknown Object (File)
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
Branch
T6336
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2861
Build 2865: [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
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.