Skip to content
Snippets Groups Projects
  1. Aug 01, 2018
    • Zeger-Jan van de Weg's avatar
      Add repository languages for projects · 79a5d768
      Zeger-Jan van de Weg authored
      Our friends at GitHub show the programming languages for a long time,
      and inspired by that this commit means to create about the same
      functionality.
      
      Language detection is done through Linguist, as before, where the
      difference is that we cache the result in the database. Also, Gitaly can
      incrementaly scan a repository. This is done through a shell out, which
      creates overhead of about 3s each run. For now this won't be improved.
      
      Scans are triggered by pushed to the default branch, usually `master`.
      However, one exception to this rule the charts page. If we're requesting
      this expensive data anyway, we just cache it in the database.
      
      Edge cases where there is no repository, or its empty are caught in the
      Repository model. This makes use of Redis caching, which is probably
      already loaded.
      
      The added model is called RepositoryLanguage, which will make it harder
      if/when GitLab supports multiple repositories per project. However, for
      now I think this shouldn't be a concern. Also, Language could be
      confused with the i18n languages and felt like the current name was
      suiteable too.
      
      Design of the Project#Show page is done with help from @dimitrieh. This
      change is not visible to the end user unless detections are done.
      Unverified
      79a5d768
  2. Jul 25, 2018
  3. Jun 26, 2018
  4. May 31, 2018
  5. May 04, 2018
  6. May 02, 2018
  7. Apr 09, 2018
  8. Apr 06, 2018
  9. Mar 06, 2018
  10. Mar 03, 2018
  11. Feb 07, 2018
  12. Feb 06, 2018
  13. Feb 05, 2018
  14. Feb 02, 2018
  15. Jan 08, 2018
  16. Jan 03, 2018
  17. Dec 08, 2017
  18. Dec 04, 2017
    • Bob Van Landuyt's avatar
      Cache the forks in a namespace in the RequestStore · 20f78421
      Bob Van Landuyt authored
      On the `show` of a project that is part of a fork network. We check if
      the user already created a fork of this project in their personal
      namespace.
      
      We do this in several places, so caching the result of this query in
      the request store prevents us from repeating it.
      20f78421
  19. Nov 27, 2017
  20. Nov 24, 2017
  21. Nov 06, 2017
  22. Oct 10, 2017
  23. Oct 07, 2017
  24. Sep 15, 2017
    • Yorick Peterse's avatar
      Fix setting share_with_group_lock · ac702af8
      Yorick Peterse authored
      Prior to this commit running
      Namespace#force_share_with_group_lock_on_descendants would result in
      updating _all_ namespaces in the namespaces table, not just the
      descendants. This is the result of ActiveRecord::Relation#update_all not
      taking into account the CTE. To work around this we use the CTE query as
      a sub-query instead of directly calling #update_all.
      
      To prevent this from happening the relations returned by
      Gitlab::GroupHierarchy are now marked as read-only, resulting in an
      error being raised when methods such as #update_all are used.
      
      Fortunately on GitLab.com our statement timeouts appear to have
      prevented this query from actually doing any damage other than causing
      a very large amount of dead tuples.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37916
      Verified
      ac702af8
  25. Sep 06, 2017
  26. Aug 31, 2017
  27. Aug 14, 2017
  28. Aug 01, 2017
  29. Jul 17, 2017
  30. Jul 06, 2017
    • Yorick Peterse's avatar
      Added Cop to blacklist the use of `dependent:` · 8fbbf41e
      Yorick Peterse authored
      This is allowed for existing instances so we don't end up 76 offenses
      right away, but for new code one should _only_ use this if they _have_
      to remove non database data. Even then it's usually better to do this in
      a service class as this gives you more control over how to remove the
      data (e.g. in bulk).
      Verified
      8fbbf41e
  31. Jun 29, 2017
  32. Jun 28, 2017
  33. Jun 21, 2017
Loading