Skip to content
Snippets Groups Projects
  1. Oct 07, 2019
  2. Oct 01, 2019
  3. Sep 18, 2019
  4. Sep 16, 2019
  5. Sep 13, 2019
  6. Jul 02, 2019
  7. Nov 12, 2018
    • Yorick Peterse's avatar
      Turn reference regex constants into methods · 9aa705dd
      Yorick Peterse authored
      `Mentionable::ReferenceRegexes` used to define the following two
      constants:
      
      1. DEFAULT_PATTERN
      2. EXTERNAL_PATTERN
      
      These two constants were built using some of the class methods that
      reside in this same module. In EE we redefine one of these methods by
      using `prepend` at the start of the `ReferenceRegexes` module. This
      poses a problem: we can not move the `prepend` to the end of the file,
      because the constants later on depend on it.
      
      To resolve this problem, this commit turns these constants into class
      methods that memoize their results. This allows EE to redefine the
      appropriate methods before these two class methods are used, in turn
      allowing us to move the `prepend` to the end of the file.
      
      See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8198 for more
      information.
      Unverified
      9aa705dd
  8. Nov 01, 2018
  9. Sep 06, 2018
  10. Aug 10, 2018
  11. Mar 21, 2018
  12. Jan 31, 2018
  13. Jul 24, 2017
  14. Jul 18, 2017
  15. Jul 05, 2017
  16. Jun 30, 2017
  17. Jun 01, 2017
  18. May 23, 2017
  19. Mar 10, 2017
  20. Jan 22, 2017
  21. Dec 16, 2016
  22. Oct 26, 2016
  23. Oct 19, 2016
  24. Jul 01, 2016
  25. Jun 16, 2016
  26. Jun 13, 2016
  27. Jun 03, 2016
  28. May 09, 2016
  29. May 06, 2016
  30. Apr 25, 2016
  31. Jan 19, 2016
    • Yorick Peterse's avatar
      Greatly improve external_issue_tracker performance · b4ee6f57
      Yorick Peterse authored
      This greatly improves the performance of Project#external_issue_tracker
      by moving most of the fields queried in Ruby to the database and letting
      the database handle all logic. Prior to this change the process of
      finding an external issue tracker was along the lines of the following:
      
      1. Load all project services into memory.
      2. Reduce the list to only services where "issue_tracker?" returns true
      3. Reduce the list from step 2 to service where "default?" returns false
      4. Find the first service where "activated?" returns true
      
      This has to two big problems:
      
      1. Loading all services into memory only to reduce the list down to a
         single item later on is a waste of memory (and slow timing wise).
      2. Calling Array#select followed by Array#reject followed by Array#find
         allocates extra objects when this really isn't needed.
      
      To work around this the following service fields have been moved to the
      database (instead of being hardcoded):
      
      * category
      * default
      
      This in turn means we can get the external issue tracker using the
      following query:
      
          SELECT *
          FROM services
          WHERE active IS TRUE
          AND default IS FALSE
          AND category = 'issue_tracker'
          AND project_id = XXX
          LIMIT 1
      
      This coupled with memoizing the result (just as before this commit)
      greatly reduces the time it takes for Project#external_issue_tracker to
      complete. The exact reduction depends on one's environment, but locally
      the execution time is reduced from roughly 230 ms to only 2 ms (= a
      reduction of almost 180x).
      
      Fixes gitlab-org/gitlab-ce#10771
      b4ee6f57
  32. Jan 06, 2016
  33. Dec 11, 2015
  34. Dec 10, 2015
  35. Jun 05, 2015
    • Daniel Gerhardt's avatar
      Fix external issue tracker hook/test for HTTPS URLs · 7f3eb42f
      Daniel Gerhardt authored
      If HTTPS was used for 'project_url', an error was raised because a HTTP
      connection was established to the default HTTPS port.
      
      The code has been corrected and simplified by using HTTParty.
      Additionally, the request now is made directly to the 'project_url'
      instead of the extracted root path.
      7f3eb42f
  36. Mar 27, 2015
  37. Mar 11, 2015
Loading