HomePhabricator

Clean up the workflow for some post-push logging code

Description

Clean up the workflow for some post-push logging code

Summary:
Ref T13216. When a repository is clustered, we run this cleanup code (to tell the repository to update, and log some timing information) on both nodes. Currently, we do slightly too much work, which is unnecessary and can be a bit confusing to human readers.

The double update message doesn't hurt anything, but there's no reason to write it twice.

Likewise, the second timing information update query doesn't do anything: there's no PushEvent object with the right identifier, so it just updates nothing. We don't need to run it, and it's confusing that we do.

Instead, only do these writes if we're actually the final node with the repository on it.

Test Plan: Added some logging, saw double writes/updates before the change and no doubles afterwards, with no other behavioral changes.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13216

Differential Revision: https://secure.phabricator.com/D19778

Details

Provenance
epriestleyAuthored on Nov 6 2018, 9:14 PM
epriestleyPushed on Nov 8 2018, 1:46 AM
Reviewer
amckinley
Differential Revision
D19778: Clean up the workflow for some post-push logging code
Parents
rPb645af981bbe: Correct a missing parameter in "Outbound Mail" documentation
Branches
Unknown
Tags
Unknown
Tasks
T13216: 2018 Week 45-47 Bonus Content
Build Status
Buildable 21112
Build 28699: Run Core Tests