BigW Consortium Gitlab

  1. 19 Nov, 2016 1 commit
  2. 17 Nov, 2016 1 commit
  3. 09 Nov, 2016 1 commit
  4. 07 Nov, 2016 1 commit
    • Added IssueCollection · f694f94c
      Yorick Peterse authored
      This class can be used to reduce a list of issues down to a subset based
      on user permissions. This class operates in such a way that it can
      reduce issues using as few queries as possible, if any at all.
  5. 28 Oct, 2016 1 commit
  6. 19 Oct, 2016 8 commits
  7. 07 Oct, 2016 1 commit
    • Add markdown cache columns to the database, but don't use them yet · e94cd6fd
      Nick Thomas authored
      This commit adds a number of _html columns and, with the exception of Note,
      starts updating them whenever the content of their partner fields changes.
      
      Note has a collision with the note_html attr_accessor; that will be fixed later
      
      A background worker for clearing these cache columns is also introduced - use
      `rake cache:clear` to set it off. You can clear the database or Redis caches
      separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
      respectively.
  8. 20 Sep, 2016 1 commit
  9. 19 Sep, 2016 2 commits
  10. 14 Sep, 2016 1 commit
  11. 28 Aug, 2016 1 commit
  12. 22 Aug, 2016 1 commit
  13. 19 Aug, 2016 1 commit
  14. 28 Jul, 2016 1 commit
  15. 14 Jul, 2016 1 commit
  16. 12 Jul, 2016 1 commit
  17. 01 Jul, 2016 1 commit
  18. 23 Jun, 2016 2 commits
    • Fix pagination on sorts with lots of ties · d7a5a28c
      Sean McGivern authored
      Postgres and MySQL don't guarantee that pagination with `LIMIT` and
      `OFFSET` will work if the ordering isn't unique. From the Postgres docs:
      
      > When using `LIMIT`, it is important to use an `ORDER BY` clause that
      > constrains the result rows into a unique order. Otherwise you will get
      > an unpredictable subset of the query's rows
      
      Before:
      
          [1] pry(main)> issues = 1.upto(Issue.count).map { |i| Issue.sort('priority').page(i).per(1).map(&:id) }.flatten
          [2] pry(main)> issues.count
          => 81
          [3] pry(main)> issues.uniq.count
          => 42
      
      After:
      
          [1] pry(main)> issues = 1.upto(Issue.count).map { |i| Issue.sort('priority').page(i).per(1).map(&:id) }.flatten
          [2] pry(main)> issues.count
          => 81
          [3] pry(main)> issues.uniq.count
          => 81
  19. 08 Jun, 2016 2 commits
    • Fix pseudo n+1 queries with Note and Note Authors in issuables APIs · fade1a4c
      Alejandro Rodríguez authored
      This was not a clear cut n+1 query, given that if you're directly subscribed to all issues
      that the API is returning you never really need to check for the notes. However, if you're
      subscribed to _all_ of them, then for each issuable you need to go once to `notes`, and
      once to `users` (for the authors). By preemtively loading notes and authors, at worst you have
      1 extra query, and at best you saved 2n extra queries. We also took advantage of this preloading
      of notes when counting user notes.
    • Remove `projects` inclusion in `notes_with_associations` to skip some unnecessary queries · ad83c308
      Alejandro Rodríguez authored
      `notes_with_associations` are used for `participant` declarations, but `Participable`
      only really cares about the target entity project, and not the participants
      projects.
      
      `notes_with_associations` are also used in `Commit::has_been_reverted?` which
      employs the reference extractor of the commit, so no references to the notes
      projects are made there (`Mentionable::all_references` cares only about the
      `author` and other `attr_mentionable`). A paralel situation occurs on
      `Issue::referenced_merge_requests`.
  20. 06 Jun, 2016 2 commits
  21. 03 Jun, 2016 2 commits
  22. 02 Jun, 2016 4 commits
  23. 01 Jun, 2016 2 commits
    • Refactor Participable · 580d2501
      Yorick Peterse authored
      There are several changes to this module:
      
      1. The use of an explicit stack in Participable#participants
      2. Proc behaviour has been changed
      3. Batch permissions checking
      
      == Explicit Stack
      
      Participable#participants no longer uses recursion to process "self" and
      all child objects, instead it uses an Array and processes objects in
      breadth-first order. This allows us to for example create a single
      Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using
      a ReferenceExtractor removes the need for running potentially many SQL
      queries every time a Proc is called on a new object.
      
      == Proc Behaviour Changed
      
      Previously a Proc in Participable was expected to return an Array of
      User instances. This has been changed and instead it's now expected that
      a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return
      value of the Proc is ignored.
      
      == Permissions Checking
      
      The method Participable#participants uses
      Ability.users_that_can_read_project to check if the returned users have
      access to the project of "self" _without_ running multiple SQL queries
      for every user.
    • Incorportate feedback · 91a7b933
      Z.J. van de Weg authored
  24. 31 May, 2016 1 commit