Read about our upcoming Code of Conduct on this issue

  1. 17 Sep, 2018 1 commit
    • Yorick Peterse's avatar
      Added FromUnion to easily select from a UNION · 84f6b869d148
      Yorick Peterse authored
      This commit adds the module `FromUnion`, which provides the class method
      `from_union`. This simplifies the process of selecting data from the
      result of a UNION, and reduces the likelihood of making mistakes. As a
      result, instead of this:
      
          union = Gitlab::SQL::Union.new([foo, bar])
      
          Foo.from("(#{union.to_sql}) #{Foo.table_name}")
      
      We can now write this instead:
      
          Foo.from_union([foo, bar])
      
      This commit also includes some changes to make this new setup work
      properly. For example, a bug in Rails 4
      (https://github.com/rails/rails/issues/24193) would break the use of
      `from("sub-query-here").includes(:relation)` in certain cases. There was
      also a CI query which appeared to repeat a lot of conditions from an
      outer query on an inner query, which isn't necessary.
      
      Finally, we include a RuboCop cop to ensure developers use this new
      module, instead of using Gitlab::SQL::Union directly.
      
      Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/51307
      84f6b869d148
  2. 14 Sep, 2018 1 commit
    • Yorick Peterse's avatar
      Cleaned up CI runner administration code · 855d6937a521
      Yorick Peterse authored
      In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19625 some
      changes were introduced that do not meet our abstraction reuse rules.
      This commit cleans up some of these changes so the requirements are met.
      
      Most notably, sorting of the runners in Admin::RunnersFinder has been
      delegated to Ci::Runner.order_by, similar to how we order data in
      models that include the Sortable module. If we need more sort orders in
      the future we can include Sortable and have Ci::Runner.order_by call
      `super` to delegate to Sortable.order_by.
      855d6937a521
  3. 13 Sep, 2018 1 commit
  4. 20 Aug, 2018 2 commits
  5. 03 Aug, 2018 1 commit
  6. 04 Jul, 2018 1 commit
  7. 26 Jun, 2018 1 commit
  8. 05 Jun, 2018 1 commit
  9. 31 May, 2018 7 commits
  10. 16 May, 2018 1 commit
  11. 15 May, 2018 1 commit
  12. 10 May, 2018 2 commits
  13. 09 May, 2018 1 commit
  14. 08 May, 2018 1 commit
  15. 03 May, 2018 2 commits
  16. 02 May, 2018 2 commits
  17. 30 Apr, 2018 3 commits
  18. 27 Apr, 2018 1 commit
  19. 23 Apr, 2018 10 commits