summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix omniauth-google-oauth2 dependencies in Gemfile.lock32653-fix-gemfile-lockRémy Coutable2017-05-301-4/+3
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch '30117-update-looks-job-log' into 'master'Phil Hughes2017-05-3010-483/+480
|\ | | | | | | | | | | | | Update looks job log Closes #30117 See merge request !11663
| * Update looks job logFilipa Lacerda2017-05-3010-483/+480
|/
* Merge branch '31349-pipeline-url-techdeb' into 'master'Phil Hughes2017-05-304-58/+67
|\ | | | | | | | | Use vue file for pipelines tables components See merge request !11760
| * Use vue file for pipelines tables components31349-pipeline-url-techdebFilipa Lacerda2017-05-294-58/+67
| |
* | Merge branch 'fix-authorized-members-destroy' into 'master'Rémy Coutable2017-05-301-1/+1
|\ \ | | | | | | | | | | | | Fix spec for Members::AuthorizedDestroyService See merge request !11778
| * | Fix spec for Members::AuthorizedDestroyServicefix-authorized-members-destroyYorick Peterse2017-05-301-1/+1
| | | | | | | | | | | | | | | This spec was still assuming that creating a project would not result in the owner having access to the project.
* | | Merge branch '2472-assignee-dropdown-does-not-display-selected-assignee-ce' ↵Phil Hughes2017-05-307-7/+123
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Assignee dropdown does not display selected assignee Closes #2472 See merge request !11744
| * | | Fix rubocop2472-assignee-dropdown-does-not-display-selected-assignee-ceClement Ho2017-05-261-3/+1
| | | |
| * | | Backport MR from EEClement Ho2017-05-269-8/+140
| | | |
* | | | Merge branch '31849-pipeline-show-view-realtime' into 'master'Phil Hughes2017-05-3010-106/+144
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creates a mediator for pipeline details vue in order to mount several vue apps with the same data Closes #31849 See merge request !11732
| * | | | Use function to define data instead of an object31849-pipeline-show-view-realtimeFilipa Lacerda2017-05-262-4/+6
| | | | |
| * | | | Creates a mediator for pipeline details vue in order to mount several vue ↵Filipa Lacerda2017-05-2610-106/+142
| | | | | | | | | | | | | | | | | | | | apps with the same data
* | | | | Merge branch '31616-add-uptime-of-gitlab-instance-in-admin-area' into 'master'Rémy Coutable2017-05-304-0/+13
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 31616-add-uptime-of-gitlab-instance-in-admin-area Closes #31616 See merge request !11590
| * | | | | 31616-add-uptime-of-gitlab-instance-in-admin-areajboltz882017-05-294-0/+13
| | | | | |
* | | | | | Merge branch '32954-loading-icon' into 'master'Phil Hughes2017-05-302-0/+8
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Displays loading icon in async buttons inline Closes #32954 See merge request !11735
| * | | | | Displays loading icon in async buttons inline32954-loading-iconFilipa Lacerda2017-05-262-0/+8
| | | | | |
* | | | | | Merge branch '32790-pipeline_schedules-pages-throwing-error-500' into 'master'Kamil Trzciński2017-05-295-8/+41
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve "pipeline_schedules pages throwing error 500" Closes #32790 See merge request !11706
| * | | | | | Use if pipeline_schedule.refShinya Maeda2017-05-291-1/+1
| | | | | | |
| * | | | | | Use nil? for ref evaluationShinya Maeda2017-05-291-1/+1
| | | | | | |
| * | | | | | Add a test for deletion of importing_or_inactive?Shinya Maeda2017-05-291-0/+8
| | | | | | |
| * | | | | | NULL to nilShinya Maeda2017-05-291-2/+2
| | | | | | |
| * | | | | | Validate parameters when active is falseShinya Maeda2017-05-291-7/+3
| | | | | | |
| * | | | | | Add changelogShinya Maeda2017-05-291-0/+4
| | | | | | |
| * | | | | | FixedShinya Maeda2017-05-291-1/+2
| | | | | | |
| * | | | | | Reproduced2Shinya Maeda2017-05-291-0/+24
| | | | | | |
| * | | | | | Revert "Reproduced"Shinya Maeda2017-05-292-26/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3e0d8b4ca7d7bd0f1ce014b6caaff1b1e32b1f8f.
| * | | | | | ReproducedShinya Maeda2017-05-292-1/+26
| | |_|_|_|/ | |/| | | |
* | | | | | 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.