1. 08 Aug, 2017 1 commit
  2. 07 Aug, 2017 1 commit
  3. 02 Aug, 2017 1 commit
  4. 01 Aug, 2017 5 commits
  5. 28 Jul, 2017 1 commit
    • Yorick Peterse's avatar
      Merge issuable "reopened" state into "opened" · 5048bfd58cf0
      Yorick Peterse authored
      Having two states that essentially mean the same thing is very much like
      having a boolean "true" and boolean "mostly-true": it's rather silly.
      This commit merges the "reopened" state into the "opened" state while
      taking care of system notes still showing messages along the lines of
      "Alice reopened this issue".
      A big benefit from having only two states (opened and closed) is that
      indexing and querying becomes simpler and more performant. For example,
      to get all the opened queries we no longer have to query both states:
          SELECT *
          FROM issues
          WHERE project_id = 2
          AND state IN ('opened', 'reopened');
      Instead we can query a single state directly, which can be much faster:
          SELECT *
          FROM issues
          WHERE project_id = 2
          AND state = 'opened';
      Further, only having two states makes indexing easier as we will only
      ever filter (and thus scan an index) using a single value. Partial
      indexes could help but aren't supported on MySQL, complicating the
      development process and not being helpful for MySQL.
  6. 25 Jul, 2017 1 commit
  7. 24 Jul, 2017 1 commit
  8. 19 Jul, 2017 2 commits
    • Lin Jen-Shin's avatar
      Eliminate N+1 queries on checking different protected refs · f759d31155b0
      Lin Jen-Shin authored
      I realized where the N+1 queries were actually coming from
      project.protected_branches, but how come we cannot preload this,
      or cache this at all?
      Then I found that this is somehow a Rails limitation. What we're
      doing before, eventually come to:
      But why it's not cached? (project.protected_branches.loaded? is always
      false) It's because matching is a class method, which is called on
      the proxy. In this case, Rails cannot cache the result. I don't know
      if this is possible to implement or not, because clearly this would
      require some tricks to implement class methods on associations.
      So instead, we could just pass project.protected_branches to
      ProtectedRef.matching, then it would work regularly.
      With this change, there's no more N+1 queries.
    • Jarka Kadlecova's avatar
  9. 14 Jul, 2017 1 commit
  10. 07 Jul, 2017 6 commits
  11. 06 Jul, 2017 1 commit
    • Yorick Peterse's avatar
      Added Cop to blacklist the use of `dependent:` · ccb23d8870a8
      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).
  12. 05 Jul, 2017 1 commit
  13. 04 Jul, 2017 1 commit
  14. 03 Jul, 2017 1 commit
  15. 30 Jun, 2017 1 commit
  16. 29 Jun, 2017 3 commits
  17. 28 Jun, 2017 2 commits
  18. 27 Jun, 2017 2 commits
  19. 21 Jun, 2017 2 commits
  20. 20 Jun, 2017 5 commits
  21. 16 Jun, 2017 1 commit