Page MenuHomePhabricator

Diffusion - fix commits not importing fully
ClosedPublic

Authored by btrahan on Oct 17 2014, 4:23 PM.
Tags
None
Referenced Files
F13993923: D10723.id25747.diff
Wed, Oct 23, 2:19 AM
F13970078: D10723.id25745.diff
Oct 17 2024, 5:35 AM
F13967134: D10723.id.diff
Oct 16 2024, 11:56 AM
Unknown Object (File)
Oct 12 2024, 9:38 PM
Unknown Object (File)
Sep 22 2024, 8:25 PM
Unknown Object (File)
Sep 19 2024, 1:01 PM
Unknown Object (File)
Sep 19 2024, 12:56 PM
Unknown Object (File)
Sep 19 2024, 12:49 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
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.