summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Incorporate Gitaly's WikiService.WikiGetAllPages RPCgitaly-wiki-get-all-pagesAlejandro Rodríguez2017-11-131-0/+44
|
* Add spec examples for Gitlab::Gitaly::WikiServiceAlejandro Rodríguez2017-11-131-0/+44
|
* Always return full avatar URL for private/internal groups/projects when ↵Douwe Maan2017-11-096-124/+58
| | | | asset host is set
* Merge branch 'fix-todos-last-page' into 'master'Rémy Coutable2017-11-091-2/+2
|\ | | | | | | | | Fix access to the final page of todos See merge request gitlab-org/gitlab-ce!15293
| * Fix access to the final page of todosSean McGivern2017-11-091-2/+2
| | | | | | | | | | | | | | | | | | The todos page limit is 20, and both that and a user's pending todo count are integers. Using integer division means that the result's floor will be taken, defeating the point of the later call to `#ceil`. So we need to convert one side of the division to a float first, otherwise the last page won't be treated as available.
* | Merge branch '39895-cant-set-mattermost-username-channel-from-api' into 'master'Rémy Coutable2017-11-091-0/+21
|\ \ | | | | | | | | | | | | | | | | | | Fix acceptance of username for Mattermost service update Closes #39895 See merge request gitlab-org/gitlab-ce!15275
| * | Fix acceptance of username for Mattermost service update via APIMark Fletcher2017-11-081-0/+21
| | |
* | | Merge branch '39958-updatemergerequestsworker-are-failing-on-metric-tagging' ↵Sean McGivern2017-11-091-16/+24
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | into 'master' Revert "add metrics tagging to the sidekiq middleware" Closes #39958 See merge request gitlab-org/gitlab-ce!15285
| * | Revert "add metrics tagging to the sidekiq middleware"39958-updatemergerequestsworker-are-failing-on-metric-taggingmicael.bergeron2017-11-081-16/+24
| |/ | | | | | | | | | | This reverts commit d5859bb9d59b3750ac6e9b8c4c17d69c4c3ed077. This reverts commit 2b7e03cf699f9d266af585a1a9399c3e219fe063. This reverts commit 7799a9bc442738935104d3b047c257e5c5884d95.
* | Merge branch 'github-rake-task-rate-limiting' into 'master'Douwe Maan2017-11-091-0/+27
|\ \ | | | | | | | | | | | | Add GitHub enterprise support to the GitHub Rake task and better handle rate limiting being disabled See merge request gitlab-org/gitlab-ce!15284
| * | Support importing GH projects without rate limitsgithub-rake-task-rate-limitingYorick Peterse2017-11-081-0/+27
| |/ | | | | | | | | | | | | GitHub Enterprise disables rate limiting for the API, resulting in HTTP 404 errors when requesting rate limiting details. This changes Gitlab::GithubImport::Client so it can deal with rate limiting being disabled.
* | Merge branch '36099-api-responses-missing-x-content-type-options-header' ↵Douwe Maan2017-11-082-0/+11
| | | | | | | | | | | | | | | | | | | | | | into '10-1-stable' Include X-Content-Type-Options (XCTO) header into API responses See merge request gitlab/gitlabhq!2211 (cherry picked from commit 6c818e77f2abeef2dd7b17a269611b018701fa79) e087e075 Include X-Content-Type-Options (XCTO) header into API responses
* | Merge branch 'ssrf-protections-round-2' into 'security-10-1'Douwe Maan2017-11-081-0/+16
|/ | | | | | | | | Replace SSRF resolver with Addrinfo.getaddrinfo to include alternative localhost versions See merge request gitlab/gitlabhq!2219 (cherry picked from commit 4a1e73783d5480aa514db7b53e10c075f95580b5) 1bffa0c3 Replace SSRF resolver with Addrinfo.getaddrinfo to include alternative localhost versions
* Merge branch 'fix-issues-api-list-performance' into 'master'Stan Hu2017-11-081-4/+8
|\ | | | | | | | | | | | | Fail when issuable_meta_data is called on an unlimited collection Closes #39845 See merge request gitlab-org/gitlab-ce!15249
| * Fail when issuable_meta_data is called on an unlimited collectionfix-issues-api-list-performanceSean McGivern2017-11-071-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This method can be called with an array, or a relation: 1. Arrays always have a limited amount of values, so that's fine. 2. If the relation does not have a limit value applied, then we will load every single object in that collection, and prevent N+1 queries for the metadata for that. But that's wrong, because we should never call this without an explicit limit set. So we raise in that case, and this commit will see which specs fail. The only failing specs here were the issues API specs, and the specs for IssuableMetadata itself, and both have been addressed.
* | Merge branch 'github-enterprise-support-importer' into 'master'Douwe Maan2017-11-081-11/+90
|\ \ | | | | | | | | | | | | | | | | | | Github enterprise support importer Closes #39931 See merge request gitlab-org/gitlab-ce!15281
| * | Restore Enterprise support in the GH importerYorick Peterse2017-11-081-11/+90
| | | | | | | | | | | | | | | This was removed by accident as the old GitHub importer handled this deep down the codebase, making it easy to miss.
* | | Merge branch 'remove-ineffective-service-specs' into 'master'Filipa Lacerda2017-11-082-113/+0
|\ \ \ | |/ / |/| | | | | | | | Remove ineffective Vue service specs See merge request gitlab-org/gitlab-ce!15277
| * | Remove ineffective Vue service specsremove-ineffective-service-specsEric Eastwood2017-11-082-113/+0
| | |
* | | Fix Error 500 when pushing LFS objects with a write deploy keyStan Hu2017-11-082-23/+52
| | |
* | | Resolve "Merge request widget - CI information has different margins"Filipa Lacerda2017-11-081-82/+89
| | |
* | | Merge branch 'github-importer-refactor' into 'master'Douwe Maan2017-11-0878-207/+5644
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Rewrite the GitHub importer to perform work in parallel and greatly improve performance Closes #33135, #38621, and #39361 See merge request gitlab-org/gitlab-ce!14731
| * | | Replace old GH importer with the parallel importergithub-importer-refactorYorick Peterse2017-11-075-88/+14
| | | |
| * | | Rewrite the GitHub importer from scratchYorick Peterse2017-11-0772-119/+5556
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this MR there were two GitHub related importers: * Github::Import: the main importer used for GitHub projects * Gitlab::GithubImport: importer that's somewhat confusingly used for importing Gitea projects (apparently they have a compatible API) This MR renames the Gitea importer to Gitlab::LegacyGithubImport and introduces a new GitHub importer in the Gitlab::GithubImport namespace. This new GitHub importer uses Sidekiq for importing multiple resources in parallel, though it also has the ability to import data sequentially should this be necessary. The new code is spread across the following directories: * lib/gitlab/github_import: this directory contains most of the importer code such as the classes used for importing resources. * app/workers/gitlab/github_import: this directory contains the Sidekiq workers, most of which simply use the code from the directory above. * app/workers/concerns/gitlab/github_import: this directory provides a few modules that are included in every GitHub importer worker. == Stages The import work is divided into separate stages, with each stage importing a specific set of data. Stages will schedule the work that needs to be performed, followed by scheduling a job for the "AdvanceStageWorker" worker. This worker will periodically check if all work is completed and schedule the next stage if this is the case. If work is not yet completed this worker will reschedule itself. Using this approach we don't have to block threads by calling `sleep()`, as doing so for large projects could block the thread from doing any work for many hours. == Retrying Work Workers will reschedule themselves whenever necessary. For example, hitting the GitHub API's rate limit will result in jobs rescheduling themselves. These jobs are not processed until the rate limit has been reset. == User Lookups Part of the importing process involves looking up user details in the GitHub API so we can map them to GitLab users. The old importer used an in-memory cache, but this obviously doesn't work when the work is spread across different threads. The new importer uses a Redis cache and makes sure we only perform API/database calls if absolutely necessary. Frequently used keys are refreshed, and lookup misses are also cached; removing the need for performing API/database calls if we know we don't have the data we're looking for. == Performance & Models The new importer in various places uses raw INSERT statements (as generated by `Gitlab::Database.bulk_insert`) instead of using Rails models. This allows us to bypass any validations and callbacks, drastically reducing the number of SQL queries and Gitaly RPC calls necessary to import projects. To ensure the code produces valid data the corresponding tests check if the produced rows are valid according to the model validation rules.
| * | | Cache feature names in RequestStoreYorick Peterse2017-11-071-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GitHub importer (and probably other parts of our code) ends up calling Feature.persisted? many times (via Gitaly). By storing this data in RequestStore we can save ourselves _a lot_ of database queries. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/39361
| * | | Add returning IDs to Gitlab::Database.bulk_insertYorick Peterse2017-11-071-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the keyword argument "return_ids" to Gitlab::Database.bulk_insert. When set to `true` (and PostgreSQL is used) this method will return an Array of the IDs of the inserted rows, otherwise it will return an empty Array.
| * | | Refactor User.find_by_any_emailYorick Peterse2017-11-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | By using SQL::Union we can return a proper ActiveRecord::Relation, making it possible to select the columns we're interested in (instead of all of them).
* | | | Merge branch 'feature-change-signout-route' into 'master'Douwe Maan2017-11-082-9/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change Sign Out route from a DELETE to a GET Closes #39708 See merge request gitlab-org/gitlab-ce!15231
| * | | | Updates tests to reflect sign_out route changeJoe Marty2017-11-072-9/+4
| | | | | | | | | | | | | | | | | | | | - Also remove sign_out DELETE route from read-only whitelist routes
* | | | | Merge branch 'fl-cleanup-test' into 'master'Tim Zallmann2017-11-081-23/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Cleanup tests See merge request gitlab-org/gitlab-ce!15261
| * | | | | Update mr_widget_options_spec.jsfl-cleanup-testFilipa Lacerda2017-11-071-1/+0
| | | | | |
| * | | | | Cleanup testsFilipa Lacerda2017-11-071-22/+0
| | | | | |
* | | | | | Merge branch 'tc-delete-merged-protected-tags-fix' into 'master'Douwe Maan2017-11-081-0/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When deleting merged branches, ignore protected tags Closes #39732 See merge request gitlab-org/gitlab-ce!15252
| * | | | | | When deleting merged branches, ignore protected tagstc-delete-merged-protected-tags-fixToon Claes2017-11-071-0/+8
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In gitlab-org/gitlab-ce!13251 wildcard Protected Branches were handled properly when deleting all merged branches. But this fix wasn't that good. It also checked branch names against Protected Tags. That's not correct. This change will **only** check if there is a Protected Branch matching the merged branch, and ignores Protected Tags. Closes gitlab-org/gitlab-ce#39732.
* | | | | | Merge branch 'bvl-free-paths' into 'master'Douwe Maan2017-11-086-74/+150
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Free some reserved group routes See merge request gitlab-org/gitlab-ce!15052
| * | | | | | Remove EE-specific group pathsbvl-free-pathsBob Van Landuyt2017-11-071-12/+3
| | | | | | |
| * | | | | | Check redirecting with a querystringBob Van Landuyt2017-11-071-0/+10
| | | | | | |
| * | | | | | Update failure message when finding new routes in `PathRegex`Bob Van Landuyt2017-11-071-9/+4
| | | | | | |
| * | | | | | Free up some group reserved wordsBob Van Landuyt2017-11-074-28/+61
| | | | | | |
| * | | | | | Free up `avatar`, `group_members` and `milestones` as pathsBob Van Landuyt2017-11-073-55/+71
| | | | | | |
| * | | | | | Free up `labels` as a group nameBob Van Landuyt2017-11-071-0/+18
| | | | | | |
| * | | | | | Add helper methods to redirect legacy pathsBob Van Landuyt2017-11-071-0/+13
| | | | | | |
* | | | | | | Merge branch 'pawel/fix_backend_transaction_protected_labels_method' into ↵Stan Hu2017-11-081-0/+6
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'master' Make BackgroundTransaction#labels public See merge request gitlab-org/gitlab-ce!15257
| * | | | | | Make BackgroundTransaction#labels publicPawel Chojnacki2017-11-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | as are all other Transaction implementations
* | | | | | | Merge branch '37824-many-branches-lock-server' into 'master'Annabel Dunstone Gray2017-11-072-4/+131
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Project with many branches can lock server running "git branch --contains XXX" Closes #37824 See merge request gitlab-org/gitlab-ce!14812
| * | | | | | Addresses front & backend commentsMayra Cabrera2017-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Improves CSS files by reusing existing code - Changes logic in views to avoid future problems in translations
| * | | | | | Modifies commit branches sectionMayra Cabrera2017-11-061-3/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Display the default branch (if the limit is not exceeded) - Requires '...' to be clicked before showing the rest of the branches and/or tags - Fixes haml lints
| * | | | | | Add styles for branch & tags boxesMayra Cabrera2017-11-021-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Create a partial for limit exceeded message - Modifies specs to adjust new scenarios
| * | | | | | implemented using an ivar, and added specsBrett Walker2017-10-132-4/+66
| | | | | | |
* | | | | | | Merge branch 'add-ingress-to-cluster-applications' into 'master'Kamil Trzciński2017-11-075-17/+225
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | Add Ingress to cluster applications section See merge request gitlab-org/gitlab-ce!15185