Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up output, implement timeout, do not update the whole index when deploying a branch #127

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Commits on Apr 9, 2019

  1. git: do not update the whole index when deploying a branch

    Update doMirrorUpdate to be able to pass a branch name to it. Pass an
    empty branch when we want to deploy the whole thing, and pass only a
    specific branch when `-branch=...` has been specified. `git fetch` does
    not lock the whole index and only pulls down the branch which avoids the
    whole plethora of issues when more than one instance of g10k is running.
    For example, we could run into issues like this when `git remote update
    --prune` is running more than once:
    
    error: Ref refs/heads/test is at 1d793f181f3a460916ce1ab5dc33e007622a9a61 but expected c28d866fdfed5be79f5ea453e04ce887627a8efa
    ! c28d866..1d793f1  test -> test (unable to update local ref)
    
    Also, avoiding updating the whole index means that the performance
    significantly improves. In my testing the whole time it takes to deploy
    a branch has been reduced by about 10 seconds.
    Giedrius Statkevičius committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    adf9e78 View commit details
    Browse the repository at this point in the history
  2. helper: do not clutter output

    Update executeCommand() to leave output intact by separating two
    different concerns: the error and the output itself. Still always set
    the returnCode to 1 if any error has occurred.
    Giedrius Statkevičius committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    c12ec68 View commit details
    Browse the repository at this point in the history
  3. helper: implement timeout

    `timeout` is passed now down to executeCommand() but nothing is done
    with it. Properly make a context and pass it to exec.CommandContext().
    Also, while at it add proper debug printing so that output messages
    *and* the error would appear in the console if `-debug=true` is
    specified.
    Giedrius Statkevičius committed Apr 9, 2019
    Configuration menu
    Copy the full SHA
    4def56b View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2019

  1. helper: fix nil ptr deref

    Giedrius Statkevičius committed Apr 10, 2019
    Configuration menu
    Copy the full SHA
    64c508f View commit details
    Browse the repository at this point in the history
  2. git: remove pointless --verbose

    Giedrius Statkevičius committed Apr 10, 2019
    Configuration menu
    Copy the full SHA
    40b5b46 View commit details
    Browse the repository at this point in the history
  3. git: do initial remote update

    Giedrius Statkevičius committed Apr 10, 2019
    Configuration menu
    Copy the full SHA
    45a5fe0 View commit details
    Browse the repository at this point in the history
  4. git: fetch the branch into the correct one

    Giedrius Statkevičius committed Apr 10, 2019
    Configuration menu
    Copy the full SHA
    ff34716 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2019

  1. git: force fetch

    Otherwise we might run into an error like this:
    
    From https://git.foo.bar/lol.git
     ! [rejected]        dimstoperms -> dimstoperms  (non-fast-forward)
    Giedrius Statkevičius committed Apr 11, 2019
    Configuration menu
    Copy the full SHA
    d74d4af View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2019

  1. Configuration menu
    Copy the full SHA
    a87495c View commit details
    Browse the repository at this point in the history
  2. fix doMirrorOrUpdate call

    xorpaul authored Jul 3, 2019
    Configuration menu
    Copy the full SHA
    12f7c56 View commit details
    Browse the repository at this point in the history