summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Move includes call to scopedm-discussions-n-plus-1Douwe Maan2017-05-312-2/+2
|
* Do not try to preload Commits when using Note.includes(:noteable)Douwe Maan2017-05-312-0/+15
|
* Resolve N+1 query issue with discussionsDouwe Maan2017-05-293-2/+12
|
* Merge branch ↵Robert Speicher2017-05-2915-11/+151
|\ | | | | | | | | | | | | | | | | '32677-migrations-using-update_column_in_batches-must-have-a-spec' into 'master' New Migration/UpdateColumnInBatches cop Closes #32677 See merge request !11611
| * Disable Migration/UpdateColumnInBatches for old migrations32677-migrations-using-update_column_in_batches-must-have-a-specRémy Coutable2017-05-2911-9/+10
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * New Migration/UpdateColumnInBatches copRémy Coutable2017-05-294-2/+141
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch '30917-wiki-is-not-searchable-with-guest-permissions' into 'master'Douwe Maan2017-05-296-46/+83
|\ \ | | | | | | | | | | | | | | | | | | Resolve "Wiki is not searchable with Guest permissions" Closes #30917 See merge request !11613
| * | Create a separate helper to check if we show particular tab on a search page30917-wiki-is-not-searchable-with-guest-permissionsValery Sizov2017-05-293-21/+32
| | |
| * | Explicitly test that guest is able to search through the wikiValery Sizov2017-05-294-4/+10
| | |
| * | update changelogValery Sizov2017-05-221-0/+4
| | |
| * | Fix: Wiki is not searchable with Guest permissionsValery Sizov2017-05-223-36/+52
| | |
* | | Merge branch 'sh-fix-submodules-trailing-spaces' into 'master'Robert Speicher2017-05-293-0/+10
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Strip trailing whitespaces in submodule URLs Closes #33018 See merge request !11753
| * | | Strip trailing whitespaces in submodule URLssh-fix-submodules-trailing-spacesStan Hu2017-05-293-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users attempting to access repositories that had `.gitmodules` entries with trailing whitespaces would encounter an Error 500. This was due to a change in bf876ec7 that quietly removed the whitespace stripping. Closes #33018
* | | | Merge branch '23036-replace-all-spinach-tests-with-rspec-feature-tests' into ↵Rémy Coutable2017-05-293-13/+17
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Replace 'starred_projects.feature' spinach test with an rspec analog See merge request !11752
| * | | | Replace 'starred_projects.feature' spinach test with an rspec analog23036-replace-all-spinach-tests-with-rspec-feature-testsblackst0ne2017-05-283-13/+17
| | | | |
* | | | | Merge branch ↵Rémy Coutable2017-05-295-23/+48
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'feature/gb/qa/switch-to-headless-chrome-via-selenium-webdriver' into 'master' Use headless Google Chrome browser in GitLab QA Closes gitlab-qa#45 and gitlab-qa#48 See merge request !11680
| * | | | | Dockerize headless chrome browser for GitLab QAfeature/gb/qa/switch-to-headless-chrome-via-selenium-webdriverGrzegorz Bizon2017-05-252-5/+20
| | | | | |
| * | | | | Use headless chrome instead of webkit via QtWebkitGrzegorz Bizon2017-05-254-19/+29
| | | | | |
* | | | | | Merge branch 'rework-authorizations-performance' into 'master'Douwe Maan2017-05-2963-472/+1198
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework project authorizations and nested groups for better performance See merge request !10885
| * | | | | | Added CHANGELOG entry for nested groups changesrework-authorizations-performance-mysqlrework-authorizations-performanceYorick Peterse2017-05-171-0/+6
| | | | | | |
| * | | | | | Document nested groups not working on MySQLYorick Peterse2017-05-171-0/+9
| | | | | | |
| * | | | | | Index project_group_links.group_idYorick Peterse2017-05-172-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This column is used when refreshing authorizations and without the index leads to a sequence scan being performed on this table.
| * | | | | | Convert nested groups to regular ones for MySQLYorick Peterse2017-05-172-0/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This migration will take all nested groups and convert them into regular groups, ensuring that members of any parent groups still have access to the child group. This migration relies on code external to it as copying all of this over involves hundreds of lines of code depending on all sorts of methods, making this practically impossible to do right.
| * | | | | | Hide nested group UI/API support for MySQLYorick Peterse2017-05-1712-17/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hides/disables some UI elements and API parameters related to nested groups when MySQL is used, since nested groups are not supported for MySQL.
| * | | | | | Use CTEs for nested groups and authorizationsYorick Peterse2017-05-1751-464/+949
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the usage of Common Table Expressions (CTEs) to efficiently retrieve nested group hierarchies, without having to rely on the "routes" table (which is an _incredibly_ inefficient way of getting the data). This requires a patch to ActiveRecord (found in the added initializer) to work properly as ActiveRecord doesn't support WITH statements properly out of the box. Unfortunately MySQL provides no efficient way of getting nested groups. For example, the old routes setup could easily take 5-10 seconds depending on the amount of "routes" in a database. Providing vastly different logic for both MySQL and PostgreSQL will negatively impact the development process. Because of this the various nested groups related methods return empty relations when used in combination with MySQL. For project authorizations the logic is split up into two classes: * Gitlab::ProjectAuthorizations::WithNestedGroups * Gitlab::ProjectAuthorizations::WithoutNestedGroups Both classes get the fresh project authorizations (= as they should be in the "project_authorizations" table), including nested groups if PostgreSQL is used. The logic of these two classes is quite different apart from their public interface. This complicates development a bit, but unfortunately there is no way around this. This commit also introduces Gitlab::GroupHierarchy. This class can be used to get the ancestors and descendants of a base relation, or both by using a UNION. This in turn is used by methods such as: * Namespace#ancestors * Namespace#descendants * User#all_expanded_groups Again this class relies on CTEs and thus only works on PostgreSQL. The Namespace methods will return an empty relation when MySQL is used, while User#all_expanded_groups will return only the groups a user is a direct member of. Performance wise the impact is quite large. For example, on GitLab.com Namespace#descendants used to take around 580 ms to retrieve data for a particular user. Using CTEs we are able to reduce this down to roughly 1 millisecond, returning the exact same data. == On The Fly Refreshing Refreshing of authorizations on the fly (= when users.authorized_projects_populated was not set) is removed with this commit. This simplifies the code, and ensures any queries used for authorizations are not mutated because they are executed in a Rails scope (e.g. Project.visible_to_user). This commit includes a migration to schedule refreshing authorizations for all users, ensuring all of them have their authorizations in place. Said migration schedules users in batches of 5000, with 5 minutes between every batch to smear the load around a bit. == Spec Changes This commit also introduces some changes to various specs. For example, some specs for ProjectTeam assumed that creating a personal project would _not_ lead to the owner having access, which is incorrect. Because we also no longer refresh authorizations on the fly for new users some code had to be added to the "empty_project" factory. This chunk of code ensures that the owner's permissions are refreshed after creating the project, something that is normally done in Projects::CreateService.
* | | | | | | Merge branch '27439-memory-usage-info' into 'master'Filipa Lacerda2017-05-295-14/+104
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add performance deltas between app deployments on Merge Request widget Closes #27439 See merge request !11730
| * | | | | | | Add performance deltas between app deployments on Merge Request widgetKushal Pandya2017-05-295-14/+104
|/ / / / / / /
* | | | | | | Merge branch 'dz-codeclimate-yml' into 'master'Douwe Maan2017-05-291-0/+38
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add codeclimate.yml See merge request !11757
| * | | | | | | Add codeclimate.ymldz-codeclimate-ymlDmitriy Zaporozhets2017-05-291-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* | | | | | | | Merge branch '32977-user-autocomplete-per_page-does-not-work' into 'master'Douwe Maan2017-05-292-1/+15
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "User autocomplete per_page does not work" Closes #32977 See merge request !11742
| * | | | | | | | Add per page to user autocomplete32977-user-autocomplete-per_page-does-not-workClement Ho2017-05-262-1/+15
| | | | | | | | |
* | | | | | | | | Merge branch 'fix/cohorts-tab-nav' into 'master'Sean McGivern2017-05-291-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing cohorts to tab nav See merge request !11766
| * | | | | | | | | Add missing cohorts to tab navJames Lopez2017-05-291-1/+1
| | |_|_|_|_|/ / / | |/| | | | | | |
* | | | | | | | | Merge branch 'fix-up-notes-technical-debt' into 'master'Fatih Acet2017-05-292-109/+115
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | Fix up some notes.js tech debt See merge request !11283
| * | | | | | | | Fix up some notes tech debtfix-up-notes-technical-debtEric Eastwood2017-05-262-109/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix up tech debt comments from @jschatz1 - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10837#note_28757436 - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10837#note_28757905 - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10837#note_28757952 - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10837#note_28758013
* | | | | | | | | Merge branch '32918-enable-ee-trigger' into 'master'Marin Jankovski2017-05-291-1/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass EE variable to trigger if defined Closes #32918 See merge request !11710
| * | | | | | | | | Pass EE variable if needed32918-enable-ee-triggerBalasankar C2017-05-251-1/+2
| | | | | | | | | |
* | | | | | | | | | Merge branch 'fix_duplicated_assignees_on_milestone_page' into 'master'Sean McGivern2017-05-292-1/+14
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: Milestone - Participants list is showing duplicate assignees Closes #32690 See merge request !11758
| * | | | | | | | | | Fix: Milestone - Participants list is showing duplicate assigneesfix_duplicated_assignees_on_milestone_pageValery Sizov2017-05-292-1/+14
| | |_|_|_|_|_|/ / / | |/| | | | | | | |
* | | | | | | | | | Merge branch 'sh-fix-issue-33011' into 'master'Grzegorz Bizon2017-05-291-10/+16
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix failing spec in spec/requests/api/pipelines_spec.rb Closes #33001 See merge request !11756
| * | | | | | | | | Improve pipelines API specs related to special parametersGrzegorz Bizon2017-05-291-9/+15
| | | | | | | | | |
| * | | | | | | | | Simplify pipeline spec by using order instead of sort_bysh-fix-issue-33011Stan Hu2017-05-281-1/+1
| | | | | | | | | |
| * | | | | | | | | Fix failing spec in spec/requests/api/pipelines_spec.rbStan Hu2017-05-281-5/+5
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spec was trying to sort pipelines by user ID, but the same user ID was being used for each pipeline in the spec. Closes #33001
* | | | | | | | | Merge branch 'gitaly-init-default' into 'master'Douwe Maan2017-05-291-0/+2
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Duplicate gitaly init variables in 'default' file Closes #31858 See merge request !11738
| * | | | | | | | Duplicate gitaly init variables in 'default' fileJacob Vosmaer2017-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed because these variables depend (directly or indirectly) on the 'app_root' variable which can be changed in the default file. If app_root has a non-standard value, the value of e.g. gitaly_dir generated in the init script becomes invalid.
* | | | | | | | | Merge branch 'patch-23' into 'master'Kamil Trzciński2017-05-271-3/+3
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace "build" with "job" Closes #32994 See merge request !11746
| * | | | | | | | | Replace "build" with "job"Fabio Busatto2017-05-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Close #32994
* | | | | | | | | | Merge branch 'add-relevant-ee-spec' into 'master'Stan Hu2017-05-271-0/+25
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing project import job example from gitlab-ee See merge request !7106
| * | | | | | | | | Update spec to match latest EE changesStan Hu2017-05-261-2/+7
| | | | | | | | | |
| * | | | | | | | | Add missing project import job example from gitlab-eeAlejandro Rodríguez2017-05-261-0/+20
| | | | | | | | | |