Page MenuHomePhabricator

Use repository identities, not denormalized strings, to identify authors for "Revision closed by commit X" stories
ClosedPublic

Authored by epriestley on Apr 14 2019, 5:51 PM.
Tags
None
Referenced Files
F12837170: D20418.id48719.diff
Thu, Mar 28, 4:40 PM
Unknown Object (File)
Fri, Mar 1, 5:04 AM
Unknown Object (File)
Feb 21 2024, 1:15 PM
Unknown Object (File)
Feb 15 2024, 11:16 AM
Unknown Object (File)
Feb 3 2024, 10:07 PM
Unknown Object (File)
Feb 3 2024, 10:07 PM
Unknown Object (File)
Feb 3 2024, 10:07 PM
Unknown Object (File)
Feb 2 2024, 4:40 PM
Subscribers
None

Details

Summary

Ref T12164. Ref T13276. Currently, the parsing pipeline copies the author and committer names and PHIDs into the transcaction record as metadata. They are then rendered directly from the metadata.

This makes planned changes to the parsing pipeline (to prevent races when multiple commits matching a single revision are pushed simultaneously) more difficult, and generally won't work with repository identities.

Instead, load the commit and use its identities.

Test Plan

Loaded a revision, saw the same story rendering for a "Closed by commit" story.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from Use repository identities, not denoralized strings, to identify authors for "Revision closed by commit X" stories to Use repository identities, not denormalized strings, to identify authors for "Revision closed by commit X" stories.Apr 14 2019, 6:38 PM
amckinley added inline comments.
src/applications/repository/worker/commitmessageparser/PhabricatorRepositoryCommitMessageParserWorker.php
253–264

I was wondering a while back if we'll ever want to go back and remove this metadata in a migration. It's probably not hurting anybody, but it might actually recover some meaningful space on installs with millions of commits.

This revision is now accepted and ready to land.Apr 17 2019, 6:29 PM

We could, possibly. There are some old "action" transactions we should also clean up at some point.

I suspect we may do a round of transaction data cleaning once Facts comes online, since Facts depends on doing ETL on the transaction record, and at least some issues are probably easier to fix by rewriting the transaction record than by adding hacky code to handle old transactions to Facts analyzers.

This revision was automatically updated to reflect the committed changes.