Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Move sync tag only when changed #1605

Merged
merged 2 commits into from
Dec 17, 2018
Merged

Commits on Dec 17, 2018

  1. Move the sync tag only when it's changed

    Upstream git hosts (e.g., GitHub) can treat each tag push as a fresh
    event for the purpose of their own notifications; and since fluxd
    pushes the sync tag, every sync, unconditionally, this means there are
    many many events.
    
    To avoid most of these spurious events, we can push the tag only when
    it looks like it's changed. That is, when the HEAD of the branch
    points at a different revision to the sync tag. This was already the
    condition used to guard _logging_ the sync event.
    
    You might question whether it's safe to push the tag conditionally --
    could it result in an invalid state?
    
     - in a correct configuration, the sync loop in a single fluxd will be
       the only process moving the tag -- so the view in that process is
       the only one that matters;
    
     - in an _incorrect_ configuration (e.g., more than one fluxd using
       the same sync tag), we might fail to push the tag if some other
       process has already shifted it to the revision we're looking at. In
       that case, we wouldn't want to move it anyway. (And if someone has
       shifted the tag to a different revision, well we would have pushed
       it before ..)
    squaremo committed Dec 17, 2018
    Configuration menu
    Copy the full SHA
    f372165 View commit details
    Browse the repository at this point in the history
  2. Reindent test file

    squaremo committed Dec 17, 2018
    Configuration menu
    Copy the full SHA
    3c903fa View commit details
    Browse the repository at this point in the history