Page MenuHomePhabricator

Clean up the workflow for some post-push logging code
ClosedPublic

Authored by epriestley on Nov 6 2018, 9:24 PM.
Tags
None
Referenced Files
F15452399: D19778.id47264.diff
Sat, Mar 29, 4:30 AM
F15439196: D19778.id47244.diff
Wed, Mar 26, 6:18 AM
F15431038: D19778.id.diff
Mon, Mar 24, 10:12 AM
F15426677: D19778.diff
Sun, Mar 23, 10:26 AM
F15384498: D19778.diff
Fri, Mar 14, 8:04 PM
F15383243: D19778.id.diff
Fri, Mar 14, 3:55 PM
F15367147: D19778.diff
Tue, Mar 11, 4:20 PM
Unknown Object (File)
Feb 19 2025, 5:57 PM
Subscribers
Restricted Owners Package

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable