Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-16Only create commit GPG signature when necessaryDouwe Maan
2017-07-28Merge branch 'dm-large-push-performance' into 'master'Robert Speicher
Load and process at most 100 commits when pushing into default branch Closes #35531 See merge request !13132
2017-07-28Load and process at most 100 commits when pushing into default branchDouwe Maan
2017-07-27generate gpg signature on pushAlexis Reigel
2017-06-21Enable Style/DotPosition Rubocop :cop:Grzegorz Bizon
2017-06-13Update tests and applicationKamil Trzcinski
2017-06-13Allow to access pipelines even if they are disabled, but only present jobs ↵Kamil Trzcinski
and commit statuses without giving ability to access them
2017-05-31Introduce source to pipeline entityKamil Trzcinski
2017-05-09Merge branch 'deltas-only' into 'master' Sean McGivern
Don't use DiffCollection for deltas See merge request !11201
2017-05-09Don't use DiffCollection for deltasJacob Vosmaer
2017-05-04Use regex to skip unnecessary reference processing in ProcessCommitWorkerJames Edwards-Jones
2017-04-03Moved Project#protected_branch? to ProtectedBranch, similar for tagsJames Edwards-Jones
2017-03-07Moved call of SystemHooksService from UpdateMergeRequestsWorker to ↵gpongelli
GitPushServic…
2016-12-26Merge branch 'feature/more-storage-statistics' into 'master' Sean McGivern
Add more storage statistics See merge request !7754
2016-12-23Schedule at most 100 commitsYorick Peterse
When processing push payloads we now schedule at most the 100 most recent commits, instead of all commits that were in a payload. This prevents one from overloading the system by pushing thousands if not millions of commits in a single go. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/25827
2016-12-21Add more storage statisticsMarkus Koller
This adds counters for build artifacts and LFS objects, and moves the preexisting repository_size and commit_count from the projects table into a new project_statistics table. The counters are displayed in the administration area for projects and groups, and also available through the API for admins (on */all) and normal users (on */owned) The statistics are updated through ProjectCacheWorker, which can now do more granular updates with the new :statistics argument.
2016-12-01Pass commit data to ProcessCommitWorkerYorick Peterse
By passing commit data to this worker we remove the need for querying the Git repository for every job. This in turn reduces the time spent processing each job. The migration included migrates jobs from the old format to the new format. For this to work properly it requires downtime as otherwise workers may start producing errors until they're using a newer version of the worker code.
2016-11-21Refactor cache refreshing/expiringYorick Peterse
This refactors repository caching so it's possible to selectively refresh certain caches, instead of just expiring and refreshing everything. To allow this the various methods that were cached (e.g. "tag_count" and "readme") use a similar pattern that makes expiring and refreshing their data much easier. In this new setup caches are refreshed as follows: 1. After a commit (but before running ProjectCacheWorker) we expire some basic caches such as the commit count and repository size. 2. ProjectCacheWorker will recalculate the commit count, repository size, then refresh a specific set of caches based on the list of files changed in a push payload. This requires a bunch of changes to the various methods that may be cached. For one, data should not be cached if a branch used or the entire repository does not exist. To prevent all these methods from handling this manually this is taken care of in Repository#cache_method_output. Some methods still manually check for the existence of a repository but this result is also cached. With selective flushing implemented ProjectCacheWorker no longer uses an exclusive lease for all of its work. Instead this worker only uses a lease to limit the number of times the repository size is updated as this is a fairly expensive operation.
2016-11-11Add service that runs after branch removed hooksGrzegorz Bizon
2016-11-11Do not call environments service in repository modelGrzegorz Bizon
2016-11-09Stop environments for branch after branch removalGrzegorz Bizon
2016-11-07Process commits in a separate workerYorick Peterse
This moves the code used for processing commits from GitPushService to its own Sidekiq worker: ProcessCommitWorker. Using a Sidekiq worker allows us to process multiple commits in parallel. This in turn will lead to issues being closed faster and cross references being created faster. Furthermore by isolating this code into a separate class it's easier to test and maintain the code. The new worker also ensures it can efficiently check which issues can be closed, without having to run numerous SQL queries for every issue.
2016-10-13Extract project#update_merge_requests and SystemHooks to its own worker from ↵Paco Guzman
GitPushService
2016-09-20Implement review comments from @yorickpeterseTimothy Andrew
1. Change multiple updates to a single `update_all` 2. Use cascading deletes 3. Extract an average function for the database median. 4. Move database median to `lib/gitlab/database` 5. Use `delete_all` instead of `destroy_all` 6. Minor refactoring
2016-09-20Merge remote-tracking branch 'origin/master' into 21170-cycle-analyticsTimothy Andrew
2016-09-19Test all cycle analytics pre-calculation code.Timothy Andrew
All the code that pre-calculates metrics for use in the cycle analytics page. - Ci::Pipeline -> build start/finish - Ci::Pipeline#merge_requests - Issue -> record default metrics after save - MergeRequest -> record default metrics after save - Deployment -> Update "first_deployed_to_production_at" for MR metrics - Git Push -> Update "first commit mention" for issue metrics - Merge request create/update/refresh -> Update "merge requests closing issues"
2016-09-18Only create a protected branch upon a push to a new branch if a rule for ↵Stan Hu
that branch doesn't exist A customer ran into an issue where a Sidekiq task retried over and over, leading to duplicate master branches in their protected branch list. Closes #22177
2016-09-15Improve performance of the cycle analytics page.Timothy Andrew
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.
2016-08-16Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into ↵Kamil Trzcinski
pipeline-hooks-without-slack
2016-08-16Fix failing tests relating to backporting ee!581.Timothy Andrew
1. `GitPushService` was still using `{merge,push}_access_level_attributes` instead of `{merge,push}_access_levels_attributes`. 2. The branches API creates access levels regardless of the state of the `developers_can_{push,merge}` parameters. This is in line with the UI, where Master access is the default for a new protected branch. 3. Use `after(:build)` to create access levels in the `protected_branches` factory, so that `factories_spec` passes. It only builds records, so we need to create access levels on `build` as well.
2016-08-12Simplify the name for data builder, feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13671791
2016-08-11Merge remote-tracking branch 'origin/master' into pipeline-hooks-without-slackKamil Trzcinski
# Conflicts: # app/models/ci/pipeline.rb # app/services/ci/create_pipeline_service.rb # spec/models/project_services/hipchat_service_spec.rb
2016-08-11Pre-create all builds for Pipeline when a trigger is receivedKamil Trzcinski
This change simplifies a Pipeline processing by introducing a special new status: created. This status is used for all builds that are created for a pipeline. We are then processing next stages and queueing some of the builds (created -> pending) or skipping them (created -> skipped). This makes it possible to simplify and solve a few ordering problems with how previously builds were scheduled. This also allows us to visualise a full pipeline (with created builds). This also removes an after_touch used for updating a pipeline state parameters. Right now in various places we explicitly call a reload_status! on pipeline to force it to be updated and saved.
2016-08-04Move those builders to their own namespace, feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5620#note_13540099
2016-07-29Use `Gitlab::Access` to protected branch access levels.Timothy Andrew
1. It makes sense to reuse these constants since we had them duplicated in the previous enum implementation. This also simplifies our `check_access` implementation, because we can use `project.team.max_member_access` directly. 2. Use `accepts_nested_attributes_for` to create push/merge access levels. This was a bit fiddly to set up, but this simplifies our code by quite a large amount. We can even get rid of `ProtectedBranches::BaseService`. 3. Move API handling back into the API (previously in `ProtectedBranches::BaseService#translate_api_params`. 4. The protected branch services now return a `ProtectedBranch` rather than `true/false`. 5. Run `load_protected_branches` on-demand in the `create` action, to prevent it being called unneccessarily. 6. "Masters" is pre-selected as the default option for "Allowed to Push" and "Allowed to Merge". 7. These changes were based on a review from @rymai in !5081.
2016-07-29Fix default branch protection.Timothy Andrew
1. So it works with the new data model for protected branch access levels.
2016-07-18Revert "Revert "Merge branch '18193-developers-can-merge' into 'master' ""Rémy Coutable
This reverts commit 530f5158e297f3cde27f3566cfe13bad74ba3b50. See !4892. Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-07-13Revert "Merge branch '18193-developers-can-merge' into 'master' "Robert Speicher
This reverts commit 9ca633eb4c62231e4ddff5466c723cf8e2bdb25d, reversing changes made to fb229bbf7970ba908962b837b270adf56f14098f.
2016-07-13Added "developers can merge" setting to protected branchesMathias Vestergaard
- Cherry-picked from `mvestergaard:branch-protection-dev-merge` - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4220
2016-05-26Remove main_language and testsJosh Frye
2016-05-04Expire repository exists? and has_visible_content? caches after a push if ↵Stan Hu
necessary Closes #17012
2016-04-29Support supressing text file diffs on the default branch with .gitattributesMatt Oakes
This is a combination of 3 commits. - Update the bare repositories info/attributes if the default branch is updated - Check the diff attributes of a file before showing a diff - Update CHANGELOG
2016-04-19Using single builder for push and tag eventsGabriel Mazetto
2016-04-19Added System Hooks for push and tag_pushGabriel Mazetto
Code is based on Project Webhooks, removing deprecations and without commits listing.
2016-04-06Only update main language if it is not already setDrew Blessing
2016-04-05Update language only on HEAD of the repositoryKamil Trzcinski
2016-04-05Update language after doing all other operationsKamil Trzcinski
2016-03-19Merge branch 'master' into feature/issue-moveGrzegorz Bizon
* master: (121 commits) Dedupe labels in labels selector in Dashboard pages Refactor colors and lists Add a safeguard in MergeRequest#compute_diverged_commits_count Fix an issue when the target branch of a MR had been deleted Add avatar to issue and MR pages header Cleanup somce css colors Re-group scss variables Refactor `Todo#target` Fixes issue with filter label missing on labels & milestones Rename `Todo#to_reference` to `Todo#target_reference` Fixed failing tests Updated controller with before_action Fixed other issues based on feedback Fixes issue on dashboard issues Full labels data in JSON Fixed issue with labels dropdown getting wrong labels Update CHANGELOG Use `Note#for_project_snippet?` to skip notes on project snippet Use `Commit#short_id` instead of `Commit.truncate_sha` Reuse `for_commit?` on conditional validations Update schema info comment on todo related files ... Conflicts: app/models/issue.rb db/schema.rb spec/models/issue_spec.rb
2016-03-17Cache project avatars stored in GitYorick Peterse
The avatar logic has been moved from Project to Repository as this makes caching easier. The logic itself in turn has been changed so that the logo file names are cached in Redis. This cache is flushed upon pushing a commit but _only_ if: 1. The commit was pushed to the default branch 2. The commit actually changes any of the logo files If no branch or commit is given the cache is flushed anyway, this ensures that calling Repository#expire_cache without any arguments still flushes the avatar cache (e.g. this is used when removing a project). Fixes gitlab-org/gitlab-ce#14363
2016-03-17Update methods that use issue close serviceGrzegorz Bizon
`Issues::CloseService#execute` signature has changed, because of using keyword parameter for commmit.