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-01-08Record and show last used date of SSH KeysVincent Wong
Addresses: Issue #13810 1. Adds a last_used_at attribute to the Key table/model 2. Update a key's last_used_at whenever it gets used 3. Display how long ago an ssh key was last used
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-20Merge branch 'project-authorizations-diff' into 'master' Nick Thomas
Smarter refreshing of authorized projects This MR reworks the way `User#refresh_authorized_projects`, resulting in a much more efficient process leading to fewer dead tuples. Related issue: https://gitlab.com/gitlab-org/gitlab-ce/issues/25257 See merge request !7956
2016-12-19Add a ReactiveCaching concern for use in the KubernetesServiceNick Thomas
2016-12-19Smarter refreshing of authorized projectsYorick Peterse
Prior to this commit the refreshing of authorized projects was done in two steps: 1. Remove existing authorizations 2. Insert a new list of all authorizations This can lead to a high amount of dead tuples as every time all rows are being replaced. For example, if a user with 100 authorizations is given access to a new project this would lead to: * 100 rows being removed * 101 new rows being inserted This commit changes the way this system works so it only removes/inserts what is necessary. Using the above example this would lead to only 1 new row being inserted, with the initial 100 being left untouched. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/25257
2016-12-06Merge branch 'zj-guest-reads-public-builds' into 'master' Sean McGivern
Guests can read builds if those are public See merge request !6842
2016-12-05Merge branch 'fix/rename-mwbs-to-merge-when-pipeline-succeeds' into 'master' Kamil Trzciński
Rename MWBS service to Merge When Pipeline Succeeds ## What does this MR do? This MR renames Merge When Build Succeeds feature to Merge When Pipeline Succeeds, because we recently changed the behavior, see https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6675. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] All builds are passing ## What are the relevant issue numbers? Closes #23354 See merge request !7135
2016-12-04Update effected testsZ.J. van de Weg
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-12-01Only include EmailHelpers in mailer specs and specs using themRobert Speicher
2016-11-30Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon
* master: (110 commits) Rewrite an HTTP link to use HTTPS Edit /spec/features/profiles/preferences_spec.rb to match changes in 084d90ac Add blue back to sub nav active Remove JSX/React eslint plugins. Fix a transient spec failure Adds hoverstates for collapsed Issue/Merge Request sidebar Moved groups above projects Add StackProf to the Gemfile, along with a utility to get a profile for a spec Update Sidekiq-cron to fix compatibility issues with Sidekiq 4.2.1 Add a CHANGELOG entry Alert user when logged in user email is not the same as the invitation Expose timestamp in build entity used by serializer Rename `MergeRequest#pipeline` to `head_pipeline` Remove unnecessary database indexes CE-specific changes gitlab-org/gitlab-ee#1137 Fixing typo & Clarifying Key name fix started_at check fix blob controller spec failure - updated not to use file-path- fix blob controller spec failure Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security' ... Conflicts: app/controllers/projects/merge_requests_controller.rb lib/api/merge_requests.rb spec/requests/api/merge_requests_spec.rb
2016-11-25Refresh project authorizations using a Redis leaseYorick Peterse
When I proposed using serializable transactions I was hoping we would be able to refresh data of individual users concurrently. Unfortunately upon closer inspection it was revealed this was not the case. This could result in a lot of queries failing due to serialization errors, overloading the database in the process (given enough workers trying to update the target table). To work around this we're now using a Redis lease that is cancelled upon completion. This ensures we can update the data of different users concurrently without overloading the database. The code will try to obtain the lease until it succeeds, waiting at least 1 second between retries. This is necessary as we may otherwise end up _not_ updating the data which is not an option.
2016-11-25Merge branch 'master' into fix/rename-mwbs-to-merge-when-pipeline-succeedsGrzegorz Bizon
* master: (312 commits) Fix bad selection on dropdown menu for tags filter Fixed issue boards scrolling with a lot of lists & issues You can only assign default_branch when editing a project ... Don't convert data which already is the target type Stop supporting Google and Azure as backup strategies renames some of the specs and adds changelog entry Fixed dragging issue moving wrong issue after multiple drags of issue Fixed issue boards issue sorting when dragging issue into list Rephrase some system notes to be compatible with new system note style Add missing JIRA file that redirects to the new location Fix documentation to create the `pg_trm` extension before creating the DB Document that we always use `do...end` for `before` in RSpec Backport Note#commands_changes from EE Log mv_namespace parameters Add default_branch attr to Project API payload in docs. Fix title case to sentence case properly escape username validation error message flash Remove header ids from University docs Add missing documentation. Added test that checks the correct select box is there for the LFS ... ... Conflicts: app/services/system_note_service.rb spec/features/merge_requests/merge_when_pipeline_succeeds_spec.rb spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb spec/services/system_note_service_spec.rb
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-21Rename MWBS service to Merge When Pipeline SucceedsGrzegorz Bizon
2016-11-18Merge branch 'feature/precalculate-authorized-projects' into 'master' Douwe Maan
Precalculate authorized projects in database ## What does this MR do? It caches user's authorized projects in database instead of using multiple unions, which should simplify and speed-up things since this operation (getting authorized projects) is used a lot. ## Are there points in the code the reviewer needs to double check? Did we miss a scenario where we need to refresh the list of projects? ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~ - [ ] ~~API support added~~ - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if it does - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? #23150 See merge request !6839
2016-11-18Precalculate user's authorized projects in databaseAhmad Sherif
Closes #23150
2016-11-17Added test events specs and logic. Also fixed some SQL and refactored the ↵James Lopez
pipeline worker spec.
2016-11-15Merge branch '21076-deleted-merged-branches' into 'master' Douwe Maan
Add button to delete all merged branches ## What does this MR do? It adds a button to the branches page that the user can use to delete all the branches that are already merged. This can be used to clean up all the branches that were forgotten to delete while merging MRs. **Note** ~~This MR is WIP until MR !6408 is merged.~~ ## Are there points in the code the reviewer needs to double check? The UX of the actual "Delete merged branches" button. ## Why was this MR needed? Fixes #21076 ## Screenshots ![Branches page without "Delete all merged" button](/uploads/3a2936a83c3547a0fce92a74af880a2d/Screen_Shot_2016-10-17_at_20.06.30.png) Before: ![Screen_Shot_2016-10-17_at_20.07.11](/uploads/55efcebf4e0a45dbfc70ba4a11ca152c/Screen_Shot_2016-10-17_at_20.07.11.png) After: ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [x] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [x] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #21076 See merge request !6449
2016-11-12Does not raise error when Note not found when processing NewNoteWorkerOswaldo Ferreira
- Also remove unnecessary param
2016-11-09Add button to delete all merged branchesToon Claes
It adds a button to the branches page that the user can use to delete all the branches that are already merged. This can be used to clean up all the branches that were forgotten to delete while merging MRs. Fixes #21076.
2016-11-08Merge remote-tracking branch 'upstream/master' into pipeline-notificationsLin Jen-Shin
* upstream/master: (70 commits) Fix routing spec for group controller Add small improvements to constrainers and specs Faster search Fix broken commits search Changed helper method to check for none on params Moved if statements around in view API: Return 400 when creating a systemhook fails Update non-exist group spinach test to match routing Bump omniauth-gitlab to 1.0.2 to fix incompatibility with omniauth-oauth2 Replace trigger with the new ID of the docs project Refactor method name 17492 Update link color for more accessible contrast Fixed todos empty state when filtering Refactor namespace regex implements reset incoming email token on issues modal and account page, reactivates all tests and writes more tests for it Use separate email-friendly token for incoming email and let incoming email token be reset Use the Gitlab Workhorse HTTP header in the admin dashboard Refactor project routing Fix 404 when visit /projects page Rewritten spinach git_blame tests to rspec feature tests Add tests for project#index routing ...
2016-11-07Merge branch 'process-commits-using-sidekiq' into 'master' Robert Speicher
Processing Commits Using Sidekiq This moves the code of `GitPushService#process_commit_messages` into a separate Sidekiq worker. This allows processing of commits to happen in parallel, speeding up the process. See the individual commit (messages) for more information. Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/15463 See merge request !6802
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-11-04Remove unused 'require'Jacob Vosmaer
2016-11-04Refine Git garbage collectionJacob Vosmaer
2016-11-02Merge remote-tracking branch 'upstream/master' into pipeline-notificationsLin Jen-Shin
* upstream/master: (216 commits) Remove invalid changelog entries require rails/generators for generators Adds variable. Fixes changelog Fix haml_lint Fixes after review Update changelog Remove tooltips from project header Makes table pagination responsive 23545 Fix distorted project and group avatars Fix spinach tests Update links in side nav and header Allow to search for user by secondary email address in the admin interface Rename :name search parameter to :search_query at /admin/users Initialize Sidekiq with the list of queues used by GitLab Fix project features default values Add a link to the Issue Boards API in main README Add validation errors to Merge Request form Fix Markdown styling inside reference links Fix relative links in Markdown wiki when displayed in "Project" tab Adds label description to issue board title ...
2016-10-28Remove unreferenced LFS objects from DB and fsFrank Groeneveld
2016-10-25Don't schedule ProjectCacheWorker unless neededYorick Peterse
This changes ProjectCacheWorker.perform_async so it only schedules a job when no lease for the given project is present. This ensures we don't end up scheduling hundreds of jobs when they won't be executed anyway.
2016-10-24Merge remote-tracking branch 'upstream/master' into pipeline-notificationsLin Jen-Shin
* upstream/master: (33 commits) removes extra line for empty milestone description code formatting corrected Fix status code expectation Stop clearing the database cache on rake cache:clear Fix error in generating labels Fix bug where e-mails were not being sent out via Sidekiq Document link syntax introduced by !5586 Fix documents and comments on Build API `scope`. #23146 #19131 adds entry in CHANGELOG removes extra line for empty issue description Re-organize queues to use for Sidekiq Fix wrong endpoint in api/users documentation, fix same typo in spec describe blocks Update CHANGELOG Fix object data to be sent to fetch analytics data Fixed compare ellipsis messing with layout Change "Group#web_url" to return "/groups/twitter" rather than "/twitter". Fix broken label uniqueness label migration Fix project member access levels fix font weight of project feature settings Add hover to trash icon in notes ...
2016-10-21Re-organize queues to use for SidekiqYorick Peterse
Dumping too many jobs in the same queue (e.g. the "default" queue) is a dangerous setup. Jobs that take a long time to process can effectively block any other work from being performed given there are enough of these jobs. Furthermore it becomes harder to monitor the jobs as a single queue could contain jobs for different workers. In such a setup the only reliable way of getting counts per job is to iterate over all jobs in a queue, which is a rather time consuming process. By using separate queues for various workers we have better control over throughput, we can add weight to queues, and we can monitor queues better. Some workers still use the same queue whenever their work is related. For example, the various CI pipeline workers use the same "pipeline" queue. This commit includes a Rails migration that moves Sidekiq jobs from the old queues to the new ones. This migration also takes care of doing the inverse if ever needed. This does require downtime as otherwise new jobs could be scheduled in the old queues after this migration completes. This commit also includes an RSpec test that blacklists the use of the "default" queue and ensures cron workers use the "cronjob" queue. Fixes gitlab-org/gitlab-ce#23370
2016-10-21Merge remote-tracking branch 'upstream/master' into pipeline-notificationsLin Jen-Shin
* upstream/master: (43 commits) Disable warming of the asset cache in Spinach tests under CI Trim project_path whitespace on form submit added skipped definition updated some links in definitions Don't use Hash#slice since it's not supported in Ruby 2.1 Create protected branches bundle [ci skip] Add a comment explaining validate_board_limit callback Fix: Backup restore doesn't clear cache Fix GitLab project import when a user has access only to their default namespace. Test GitLab project import for a user with only their default namespace. We want to release this in 8.13.0 Add CHANGELOG.md entry Return truncation for notification descriptions, fix minor bugs with rendering Use guard clause instead of if-else statement Tests for markdown HipChat notifications Clean up Banzai HTML for HipChat Ensure absolute URLs for single lines from Banzai for HipChat Absolute URLs for Banzai HTML for HipChat Also render commit titles in HipChat notifications Full Banzai rendering for HipChat notifications ...
2016-10-21Send only to users have :read_build access, feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342#note_17193335
2016-10-20Restrict ProjectCacheWorker jobs to one per 15 minYorick Peterse
This ensures ProjectCacheWorker jobs for a given project are performed at most once per 15 minutes. This should reduce disk load a bit in cases where there are multiple pushes happening (which should schedule multiple ProjectCacheWorker jobs).
2016-10-20Merge remote-tracking branch 'upstream/master' into pipeline-notificationsLin Jen-Shin
* upstream/master: (221 commits) Differentiate the expire from leave event Use LabelsFinder on Fogbuz importer Use LabelsFinder on Google Code importer Change the order of tested methods in project_members_controller_spec Remove show_menu_above attribute from issuable dropdowns. Spaces before `}`! Avoid touch label links that does not belongs to project when moving it Remove order by label type on LabelsFinder Rename Labels::CreateService to Labels::FindOrCreateService Add self.project_foreign_key on both Issue and MergeRequest Only show label type for projects that belong to a group Disable subscribing to group-level labels Remove unused method Project#all_labels Update specs to cope with new label types and priorities Fix max number of permitted priorities per project label Fix GitHub importer spec Update CHANGELOG Add support to group labels to SlashCommands::InterpretService Use join instead of subquery on Label.unprioritized scope Warn user deleting a group label affect all projects within the group ...
2016-10-18Use bcc for pipeline emails because:Lin Jen-Shin
We use bcc here because we don't want to generate this emails for a thousand times. This could be potentially expensive in a loop, and recipients would contain all project watchers so it could be a lot.
2016-10-18Merge branch 'looser-time-in-specs' into 'master' Douwe Maan
Add a be_like_time matcher and use it in specs ## What does this MR do? Introduces a be_like_time matcher and refactors existing code to use it ## Are there points in the code the reviewer needs to double check? A few sites use be_within(2.seconds) or 5.minutes - I didn't change those ## Why was this MR needed? A custom matcher helps to document that we need to compare times loosely, and keeps the fudge factor from being declared in multiple places. ## Screenshots (if relevant) ## Does this MR meet the acceptance criteria? - [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [ ] Added for this feature/bug - [ ] All builds are passing - [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html) - [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if it does - rebase it please) - [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Related to !6935 See merge request !6936
2016-10-18Merge branch 'pipeline-emails' into pipeline-notificationsLin Jen-Shin
* pipeline-emails: (58 commits) Update endpoint to username validator change border color to variable Add todo for deprecated user routes and more information about deprecation to changelog Provide better error message to the user Apply better hierarchy to markdown headers and issue/mr titles Swapped button text manipulation outcomes for the toggle query Fixed find file keyboard navigation Update CHANGELOG for 8.12.7 Added download-button class and applied button margin Enable activerecord_sane_schema_dumper for test Updated logo from @luke Fix broken specs on MySQL after https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6896 Fix Test Env (proper error handling when gitlab-shell is not clonned) Fix randomly crashing spinach test for merge request [Great spinach fix] Replace gsub with delete Remove carriage returns from commit description as summary is on a newline and will always include carriage returns Convert due_date_select.js filetype to es6. Stop directly parsing due_date with Date.parse, prefer parsing implicitly. Improve spec for pipeline metrics worker Add Pipeline metrics worker ...
2016-10-17Avoid race condition when expiring artifactsGrzegorz Bizon
It may happen that job meant to remove expired artifacts will be executed asynchronously when, in the meantime, project associated with given build gets removed by another asynchronous job. In that case we should not remove artifacts because such build will be removed anyway, when project removal is complete.
2016-10-17Add a be_like_time matcher and use it in specsNick Thomas
The amount of precision times have in databases is variable, so we need tolerances when comparing in specs. It's better to have the tolerance defined in one place than several.
2016-10-17Fix broken specs on MySQL after ↵Kamil Trzcinski
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6896
2016-10-17Rename for a more consistent pipeline worker name, feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342/diffs#note_17039533
2016-10-17Fix test failure due to bad rebase, feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342/diffs#note_17043090
2016-10-17Improve spec for pipeline metrics workerKamil Trzcinski
2016-10-17That's no longer a service [ci skip]Lin Jen-Shin
2016-10-17Change service to be a worker, feedback:Lin Jen-Shin
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6342#note_16118195
2016-10-17Update the other sites for reset_delivered_emails! as wellLin Jen-Shin
2016-10-14Merge branch 'feature/process-pipeline-hooks-asynchronously' into 'master' Kamil Trzciński
Execute pipeline hooks asynchronously ## What does this MR do? This MR makes it possible to execute pipeline hooks asynchronously, what should help to improve performance of CI pipeline processing. ## What are the relevant issue numbers? Closes #23056 See merge request !6824
2016-10-14Add build finished worker that creates a workflowGrzegorz Bizon
2016-10-13Extract project#update_merge_requests and SystemHooks to its own worker from ↵Paco Guzman
GitPushService