- 10 Oct, 2016 1 commit
-
-
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.
-
- 07 Oct, 2016 3 commits
-
-
Paco Guzman authored
ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup We use Sidekiq::Client.push_bulk to avoid Redis round trips
-
Grzegorz Bizon authored
-
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.
-
- 06 Oct, 2016 1 commit
-
-
Grzegorz Bizon authored
-
- 04 Oct, 2016 4 commits
-
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
Grzegorz Bizon authored
-
- 03 Oct, 2016 1 commit
-
-
Kamil Trzcinski authored
Conflicts: app/models/ci/pipeline.rb app/models/commit_status.rb
-
- 07 Sep, 2016 3 commits
-
-
Olaf Tomalka authored
-
Olaf Tomalka authored
Old deployments of Gitlab might have a big number of old events to be deleted. Such numbers cause the worker to timeout. I've limited the amount of rows that should be destroyed at once to 10000, and increased how often pruning shall take place to 4 times a day.
-
Olaf Tomalka authored
Since contribution calendar shows only 12 months of activity, events older than that time are not visible anywhere and can be safely pruned saving big amount of database storage. Fixes #21164
-
- 24 Aug, 2016 1 commit
-
-
Douglas Barbosa Alexandre authored
-
- 19 Aug, 2016 1 commit
-
-
Sean McGivern authored
`after_sha` maps to the source branch, as it's the head of our compare, so these were just the wrong way around.
-
- 18 Aug, 2016 1 commit
-
-
Sean McGivern authored
-
- 17 Aug, 2016 1 commit
-
-
Yorick Peterse authored
GitLab Performance Monitoring is now able to track custom events not directly related to application performance. These events include the number of tags pushed, repositories created, builds registered, etc. The use of these events is to get a better overview of how a GitLab instance is used and how that may affect performance. For example, a large number of Git pushes may have a negative impact on the underlying storage engine. Events are stored in the "events" measurement and are not prefixed with "rails_" or "sidekiq_", this makes it easier to query events with the same name triggered from different parts of the application. All events being stored in the same measurement also makes it easier to downsample data. Currently the following events are tracked: * Creating repositories * Removing repositories * Changing the default branch of a repository * Pushing a new tag * Removing an existing tag * Pushing a commit (along with the branch being pushed to) * Pushing a new branch * Removing an existing branch * Importing a repository (along with the URL we're importing) * Forking a repository (along with the source/target path) * CI builds registered (and when no build could be found) * CI builds being updated * Rails and Sidekiq exceptions Fixes gitlab-org/gitlab-ce#13720
-
- 11 Aug, 2016 1 commit
-
-
Stan Hu authored
There is a race condition in DestroyGroupService now that projects are deleted asynchronously: 1. User attempts to delete group 2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project 3. DestroyGroupService destroys the Group, leaving all its projects without a namespace 4. Projects::DestroyService runs later but the can?(current_user, :remove_project) is `false` because the user no longer has permission to destroy projects with no namespace. 5. This leaves the project in pending_delete state with no namespace/group. Projects without a namespace or group also adds another problem: it's not possible to destroy the container registry tags, since container_registry_path_with_namespace is the wrong value. The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService. Closes #17893
-
- 09 Aug, 2016 1 commit
-
-
Adam Niedzielski authored
-
- 07 Aug, 2016 1 commit
-
-
Adam Niedzielski authored
-
- 05 Aug, 2016 1 commit
-
-
Jacob Vosmaer authored
The change to base64-encoding the third argument to PostReceive in gitlab-shell made our Sidekiq ArgumentsLogger a little less useful. This change adds a log statement for the decoded data. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/20381
-
- 04 Aug, 2016 4 commits
-
-
Adam Niedzielski authored
-
James Lopez authored
-
Adam Niedzielski authored
-
Stan Hu authored
When destroying a namespace, the `skip_repo` parameter is supposed to prevent the repository directory from being destroyed and allow the namespace after_destroy hook to run. If the namespace fails to be deleted for some reason, we could be left with repositories that are deleted with existing projects.
-
- 03 Aug, 2016 4 commits
-
-
Ahmad Sherif authored
-
Paco Guzman authored
So we have raw_diffs too
-
Paco Guzman authored
This object will manage Gitlab::Git::Compare instances
-
Paco Guzman authored
Instead calling diff_collection.count use diff_collection.size which is cache on the diff_collection
-
- 26 Jul, 2016 2 commits
-
-
Alejandro Rodríguez authored
-
Ahmad Sherif authored
-
- 21 Jul, 2016 2 commits
-
-
Douglas Barbosa Alexandre authored
Replace invocation of `find` with Ruby code that matches old cached files in a better, and safe way to avoid data-integrity issues.
-
Sean McGivern authored
-
- 18 Jul, 2016 1 commit
-
-
James Lopez authored
-
- 13 Jul, 2016 1 commit
-
-
Stan Hu authored
Possible workaround for #15392
-
- 12 Jul, 2016 1 commit
-
-
Stan Hu authored
Due to a stale NFS cache, it's possible that a branch lookup fails while `git gc` is running and causes missing branches in merge requests. Possible workaround for #15392
-
- 06 Jul, 2016 1 commit
-
-
Douwe Maan authored
-
- 30 Jun, 2016 1 commit
-
-
Alejandro Rodríguez authored
-
- 16 Jun, 2016 2 commits
-
-
James Lopez authored
This reverts commit 13e37a3e.
-
James Lopez authored
-