An error occurred fetching the project authors.
  1. 18 Oct, 2016 3 commits
  2. 17 Oct, 2016 3 commits
  3. 14 Oct, 2016 2 commits
  4. 12 Oct, 2016 2 commits
  5. 10 Oct, 2016 1 commit
    • Yorick Peterse's avatar
      Precalculate trending projects · 237c8f66
      Yorick Peterse authored
      This commit introduces a Sidekiq worker that precalculates the list of
      trending projects on a daily basis. The resulting set is stored in a
      database table that is then queried by Project.trending.
      
      This setup means that Unicorn workers no longer _may_ have to calculate
      the list of trending projects. Furthermore it supports filtering without
      any complex caching mechanisms.
      
      The data in the "trending_projects" table is inserted in the same order
      as the project ranking. This means that getting the projects in the
      correct order is simply a matter of:
      
          SELECT projects.*
          FROM projects
          INNER JOIN trending_projects ON trending_projects.project_id = projects.id
          ORDER BY trending_projects.id ASC;
      
      Such a query will only take a few milliseconds at most (as measured on
      GitLab.com), opposed to a few seconds for the query used for calculating
      the project ranks.
      
      The migration in this commit does not require downtime and takes care of
      populating an initial list of trending projects.
      237c8f66
  6. 07 Oct, 2016 1 commit
    • Nick Thomas's avatar
      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.
      e94cd6fd
  7. 27 Sep, 2016 1 commit
  8. 26 Sep, 2016 1 commit
  9. 23 Sep, 2016 2 commits
  10. 22 Sep, 2016 2 commits
  11. 21 Sep, 2016 3 commits
    • Douwe Maan's avatar
      Merge branch 'repository-size-restrictions' into 'master' · a2c1856e
      Douwe Maan authored
      Enforce repository size limit across all projects and groups, includes LFS objects in that limit.
      
      Limit can be set globally, and overridden per group, and/or project.
      
      Backend functionality is there and comprehensive tests are included, but there is still some frontend work to be done and documentation to be added. I'm submitting early for review as we are close to the release.
      
      @DouweM @dbalexandre I'd appreciate it if you both could start with the review while I finish the documentation and the missing frontend parts.
      
      /cc @JobV @regisF 
      
      Fixes #559
      
      Replaces gitlab-org/gitlab-ce!6020
      
      ## Screenshots (see gitlab-org/gitlab-ce!6020 for more)
      
      ![Screen_Shot_2016-09-18_at_9.55.38_PM](/uploads/66eeaced1f27c7e2115feaa4775a6e99/Screen_Shot_2016-09-18_at_9.55.38_PM.png)
      
      ![Screen_Shot_2016-09-18_at_9.57.12_PM](/uploads/d811d6c184044df527bd2f81cff651ce/Screen_Shot_2016-09-18_at_9.57.12_PM.png)
      
      ![Screen_Shot_2016-09-18_at_9.58.03_PM](/uploads/a2c5b2695454dda639537304a1bcd99b/Screen_Shot_2016-09-18_at_9.58.03_PM.png)
      
      ![Screen_Shot_2016-09-19_at_1.44.19_PM](/uploads/4cc6cca7536787bde49c0b086086cbcb/Screen_Shot_2016-09-19_at_1.44.19_PM.png)
      
      See merge request !740
      a2c1856e
    • Stan Hu's avatar
      Merge branch '21170-cycle-analytics' into 'master' · 8ad412e0
      Stan Hu authored
      Cycle Analytics: first iteration
      
      ## What does this MR do?
      
      - Implement the first iteration of the "Cycle Analytics" feature.
      
      ## What are the relevant issue numbers?
      
      - Closes #21170 
      
      ## Screenshots
      
      ![cycle_analytics_screencast.gif](/uploads/d23c3c912caa6935fd47b53ca3a56b97/cycle_analytics.gif)
      
      ## Backend Tasks
      
      - [x]  Implementation
          - [x]  Phases
              - [x]  Issue (Tracker)
              - [x]  Plan (Board)
              - [x]  Code (IDE)
              - [x]  Test (CI)
              - [x]  Review (MR)
              - [x]  Staging (CD)
              - [x]  Production (Total)
          - [x]  Make heuristics more modular
          - [x]  Scope to project
          - [x]  Date range (30 days, 90 days)
          - [x]  Access restriction
      - [x]  Test
          - [x]  Find a better way to test these phases
          - [x]  Phases
              - [x]  Issue (Tracker)
              - [x]  Plan (Board)
              - [x]  Code (IDE)
              - [x]  Test (CI)
              - [x]  Review (MR)
              - [x]  Staging (CD)
              - [x]  Production (Total)
          - [x]  Test for "end case happens before start case"
          - [x]  Consolidate helper
      - [x]  Miniboss review
      - [x]  Performance testing with mock data
      - [x]  Improve performance
          - [x]  Pre-calculate "merge requests closing issues
          - [x]  Pre-calculate everything else
      - [x]  Test performance against 10k issues
      - [x]  Test all pre-calculation code
          - [x]  Ci::Pipeline -> build start/finish
          - [x]  Ci::Pipeline#merge_requests
          - [x]  Issue -> record default metrics after save
          - [x]  MergeRequest -> record default metrics after save
          - [x]  Deployment -> Update "first_deployed_to_production_at" for MR metrics
          - [x]  Git Push -> Update "first commit mention" for issue metrics
          - [x]  Merge request create/update/refresh -> Update "merge requests closing issues"
      - [x]  Remove `MergeRequestsClosingIssues` when necessary
      - [x]  Changes to unblock Fatih
          - [x]  Add summary data
          - [x]  `stats` should be array
          - [x]  Let `stats` be `null` if all `stats` are null
      - [x]  Indexes for "merge requests closing issues"
      - [x]  Test summary data
      - [x]  Scope everything to project
          - [x]  Find out why tests were passing
      - [x]  Filter should include issues/MRs which have made it to production within the range
      - [x]  Don't create duplicate `MergeRequestsClosingIssues`
      - [x]  Fix tests
      - [x]  MySQL median
      - [x]  Assign to Douwe for review
      - [x]  Fix conflicts
      - [x]  Implement suggestions from Yorick's review
          - [x]  Test on PG
          - [x]  Test on MySQL
      - [x]  Refactor
          - [x]  Cleanup
              - [x]  What happens if we have no data at all?
              - [x]  Extract common queries to methods / scopes
          - [x]  Remove unused queries
          - [x]  Downtime for foreign key migrations
          - [x]  Find a way around "if issue.metrics.present?" all over the place
          - [x]  Find a way around "if merge_request.metrics.present?" all over the place
          - [x]  Test migrations on a fresh database
              - [x]  MySQL
              - [x]  Pg
      - [x]  Access issues
          - While the project is public and the visibility is set to "Everyone with access", you cannot visit the cycle analytics page when signed out.
      - [x]  CHANGELOG
      - [x]  Implement suggestions from Douwe's review
          - [x]  First set of comments
          - [x]  Second set of comments
          - [x]  Third set of comments
          - [x]  Fourth set of comments
      - [x]  Make sure build is green
      - [ ]  Make issue for "polish"
      - [ ]  EE MR
      
      
      See merge request !5986
      8ad412e0
    • Yorick Peterse's avatar
      Update db/schema.rb per most recent migrations · 4d63a156
      Yorick Peterse authored
      It seems this wasn't updated properly when migrations were added in a
      previous commit.
      4d63a156
  12. 20 Sep, 2016 3 commits
  13. 19 Sep, 2016 1 commit
  14. 16 Sep, 2016 1 commit
  15. 15 Sep, 2016 2 commits
    • Patricio Cano's avatar
      Added group-specific setting for LFS. · fd621429
      Patricio Cano authored
      Groups can enable/disable LFS, but this setting can be overridden at the project level. Admin only
      fd621429
    • Timothy Andrew's avatar
      Improve performance of the cycle analytics page. · ba25e2f1
      Timothy Andrew authored
      1. These changes bring down page load time for 100 issues from more than
         a minute to about 1.5 seconds.
      
      2. This entire commit is composed of these types of performance
         enhancements:
      
           - Cache relevant data in `IssueMetrics` wherever possible.
           - Cache relevant data in `MergeRequestMetrics` wherever possible.
           - Preload metrics
      
      3. Given these improvements, we now only need to make 4 SQL calls:
      
          - Load all issues
          - Load all merge requests
          - Load all metrics for the issues
          - Load all metrics for the merge requests
      
      4. A list of all the data points that are now being pre-calculated:
      
          a. The first time an issue is mentioned in a commit
      
            - In `GitPushService`, find all issues mentioned by the given commit
              using `ReferenceExtractor`. Set the `first_mentioned_in_commit_at`
              flag for each of them.
      
            - There seems to be a (pre-existing) bug here - files (and
              therefore commits) created using the Web CI don't have
              cross-references created, and issues are not closed even when
              the commit title is "Fixes #xx".
      
          b. The first time a merge request is deployed to production
      
            When a `Deployment` is created, find all merge requests that
            were merged in before the deployment, and set the
            `first_deployed_to_production_at` flag for each of them.
      
          c. The start / end time for a merge request pipeline
      
            Hook into the `Pipeline` state machine. When the `status` moves to
            `running`, find the merge requests whose tip commit matches the
            pipeline, and record the `latest_build_started_at` time for each
            of them. When the `status` moves to `success`, record the
            `latest_build_finished_at` time.
      
          d. The merge requests that close an issue
      
            - This was a big cause of the performance problems we were having
              with Cycle Analytics. We need to use `ReferenceExtractor` to make
              this calculation, which is slow when we have to run it on a large
              number of merge requests.
      
            - When a merge request is created, updated, or refreshed, find the
              issues it closes, and create an instance of
              `MergeRequestsClosingIssues`, which acts as a join model between
              merge requests and issues.
      
            - If a `MergeRequestsClosingIssues` instance links a merge request
              and an issue, that issue closes that merge request.
      
      5. The `Queries` module was changed into a class, so we can cache the
         results of `issues` and `merge_requests_closing_issues` across
         various cycle analytics stages.
      
      6. The code added in this commit is untested. Tests will be added in the
         next commit.
      ba25e2f1
  16. 13 Sep, 2016 2 commits
    • Yorick Peterse's avatar
      Move pushes_since_gc to Redis · 4e87c023
      Yorick Peterse authored
      This moves tracking of the pushes since the last Git GC from PostgreSQL
      to Redis. This reduces the number of writes on the "projects" table.
      This in turn reduces the vacuuming overhead.
      
      The lease used for incrementing the counter has been removed. This lease
      was mostly put in place to prevent high database load but this isn't
      needed anymore due to the counter now being stored in Redis.
      
      Fixes gitlab-org/gitlab-ce#22125
      4e87c023
    • Kamil Trzcinski's avatar
      Update db/schema.rb · 11337217
      Kamil Trzcinski authored
      11337217
  17. 09 Sep, 2016 1 commit
  18. 08 Sep, 2016 1 commit
  19. 05 Sep, 2016 3 commits
  20. 02 Sep, 2016 1 commit
  21. 01 Sep, 2016 2 commits
  22. 31 Aug, 2016 2 commits