An error occurred fetching the project authors.
  1. 16 Feb, 2018 1 commit
  2. 09 Feb, 2018 4 commits
  3. 08 Feb, 2018 1 commit
    • Greg Stark's avatar
      Add indexes and change SQL for expired artifacts to deal with artifacts migration efficiently · 271e7a32
      Greg Stark authored
      Artifacts are in the middle of being migrated from ci_builds to
      ci_job_artifacts. The expiration date is currently visible in both of
      these tables and the test for whether an expired artifact is present
      for a job is complex as it requires checking both the of the tables.
      
      Add two new indexes, one on ci_builds.artifacts_expire_at and one on
      ci_job_artifacts.expire_at to enable finding expired artifacts
      efficiently.
      
      And until the migration is finished, replace the SQL for finding
      expired and non-expired artifacts with a hand-crafted UNION ALL based
      query instead of using OR. This overcomes a database optimizer
      limitation that prevents it from using these indexes.
      
      When the migration is finished the next version should remove this
      query and replace it with a much simpler query on just
      ci_job_artifacts. See
      https://gitlab.com/gitlab-org/gitlab-ce/issues/42561 for followup.
      271e7a32
  4. 07 Feb, 2018 2 commits
  5. 06 Feb, 2018 2 commits
  6. 31 Jan, 2018 2 commits
  7. 26 Jan, 2018 1 commit
  8. 17 Jan, 2018 1 commit
    • Micaël Bergeron's avatar
      Refactor the uploaders · 594e6a0a
      Micaël Bergeron authored
      I've demoted the ObjectStoreUploader to a concern that is mixed in
      the concrete uploader classes that need to store files in a remote
      object store.
      
      I've been working on making the local -> remote migration working
      first, which has been trivial compared to the remote -> local one.
      
      The current implementation is heavily based on side-effects which
      makes the code brittle and hard to reason about.
      
      The current approach is to store the `store` field in the correct
      `Upload` model once a migration has been done. To retrieve the field
      I use the `has_many :uploads` relationship, with all the paths that
      a certain file may have `uploads.where(path: paths).last`. This as
      the drawback of adding a database query for every upload lookup, but
      I feel that the generalization of this behavior is worth it. We should
      be able to optimize this down the road quite easily.
      594e6a0a
  9. 15 Jan, 2018 1 commit
    • Stan Hu's avatar
      Ensure CI pipelines and builds have the correction project associations · 6da48a15
      Stan Hu authored
      This should reduce the number of SQL queries and lookups needed to look up a
      project of a build and pipeline and vice versa.
      
      Before:
      
      ```
      [1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse?
      => false
      [2] pry(main)> Project.reflect_on_association(:builds).has_inverse?
      => false
      [3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse?
      => false
      [4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse?
      => :project
      ```
      
      After:
      
      ```
      [1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse?
      => :builds
      [2] pry(main)> Project.reflect_on_association(:builds).has_inverse?
      => :project
      [3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse?
      => :pipelines
      [4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse?
      => :project
      ```
      6da48a15
  10. 14 Jan, 2018 1 commit
    • Stan Hu's avatar
      Ensure CI pipelines and builds have the correction project associations · 8ddb00ad
      Stan Hu authored
      This should reduce the number of SQL queries and lookups needed to look up a
      project of a build and pipeline and vice versa.
      
      Before:
      
      ```
      [1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse?
      => false
      [2] pry(main)> Project.reflect_on_association(:builds).has_inverse?
      => false
      [3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse?
      => false
      [4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse?
      => :project
      ```
      
      After:
      
      ```
      [1] pry(main)> Ci::Build.reflect_on_association(:project).has_inverse?
      => :builds
      [2] pry(main)> Project.reflect_on_association(:builds).has_inverse?
      => :project
      [3] pry(main)> Ci::Pipeline.reflect_on_association(:project).has_inverse?
      => :pipelines
      [4] pry(main)> Project.reflect_on_association(:pipelines).has_inverse?
      => :project
      ```
      8ddb00ad
  11. 05 Jan, 2018 4 commits
  12. 04 Jan, 2018 2 commits
  13. 22 Dec, 2017 1 commit
  14. 14 Dec, 2017 1 commit
  15. 07 Dec, 2017 2 commits
  16. 06 Dec, 2017 7 commits
  17. 05 Dec, 2017 1 commit
  18. 03 Dec, 2017 6 commits