BigW Consortium Gitlab

  1. 21 Nov, 2016 7 commits
    • Refactor cache refreshing/expiring · ffb9b3ef
      Yorick Peterse authored
      This refactors repository caching so it's possible to selectively
      refresh certain caches, instead of just expiring and refreshing
      everything.
      
      To allow this the various methods that were cached (e.g. "tag_count" and
      "readme") use a similar pattern that makes expiring and refreshing
      their data much easier.
      
      In this new setup caches are refreshed as follows:
      
      1. After a commit (but before running ProjectCacheWorker) we expire some
         basic caches such as the commit count and repository size.
      
      2. ProjectCacheWorker will recalculate the commit count, repository
         size, then refresh a specific set of caches based on the list of
         files changed in a push payload.
      
      This requires a bunch of changes to the various methods that may be
      cached. For one, data should not be cached if a branch used or the
      entire repository does not exist. To prevent all these methods from
      handling this manually this is taken care of in
      Repository#cache_method_output. Some methods still manually check for
      the existence of a repository but this result is also cached.
      
      With selective flushing implemented ProjectCacheWorker no longer uses an
      exclusive lease for all of its work. Instead this worker only uses a
      lease to limit the number of times the repository size is updated as
      this is a fairly expensive operation.
    • Use File.exist? to check if a repository exists · 6f393877
      Yorick Peterse authored
      Initializing Rugged objects is way too expensive just to check if a
      repository exists. Even though we cache this data once in a while we
      have to refresh this. On GitLab.com we have seen Repository#exists?
      taking up to _1 minute_ to complete in the absolute worst case, though
      usually it sits around a second or so.
      
      Using File.exist? to instead check if $GIT_DIR/refs exists is a much
      faster way of checking if a repository was initialized properly.
    • Unify detecting of special repository files · df5548e1
      Yorick Peterse authored
      This moves the logic of detecting special repository files (e.g. a
      README or a Koding configuration file) to a single class:
      Gitlab::FileDetector. Moving this logic into a single place allows this
      to be re-used more easily.
      
      This commit also changes Repository#gitlab_ci_yaml so that its cached
      similar to other data (e.g. the Koding configuration file).
    • Merge branch 'issue_5541' into 'master' · b98193c5
      Sean McGivern authored
      Allow to block JIRA events for commits and merge requests
      
      implements #5541 
      
      See merge request !7469
    • Merge branch 'remove-unnecessary-self-from-user-model' into 'master' · 53714ddf
      Rémy Coutable authored
      Remove unnecessary self from user model
      
      self keyword nod needed. Code is more clean and understandable. https://github.com/bbatsov/ruby-style-guide#no-self-unless-required
      
      See merge request !7551
    • Merge branch 'use-build-in-broadcast-message-spec' into 'master' · 782a42ca
      Rémy Coutable authored
      Use build instead create in BroadcastMessage model spec
      
      See merge request !7592
    • Merge branch '24627-fix-bad-mr-error-message' into 'master' · 900999f8
      Rémy Coutable authored
      Fixes regression causing an error message to appear when user first enters the Merge Request form.
      
      Closes #24627
      
      See merge request !7599
  2. 19 Nov, 2016 19 commits
  3. 18 Nov, 2016 14 commits