summaryrefslogtreecommitdiff
path: root/lib/api
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into 'refactor-snippets-finder'refactor-snippets-finderDouwe Maan2018-11-062-3/+25
|\ | | | | | | # Conflicts: # spec/models/project_spec.rb
| * Merge branch 'use_tokenauthenticatable_method_for_token_lookup' into 'master'Sean McGivern2018-11-051-3/+1
| |\ | | | | | | | | | | | | Remove PersonalAccessTokensFinder#find_by method See merge request gitlab-org/gitlab-ce!22617
| | * Remove PersonalAccessTokensFinder#find_by methoduse_tokenauthenticatable_method_for_token_lookupImre Farkas2018-11-051-3/+1
| | | | | | | | | | | | | | | | | | find_by_token is overriden by TokenAuthenticatable which can be easily missed or confused with #find_by(:token) defined by ActiveRecord. First step for safer usage is to remove #find_by.
| * | add related merge request endpointHelmut Januschka2018-11-011-0/+24
| | |
* | | Rewrite SnippetsFinder to improve performanceYorick Peterse2018-11-051-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This completely rewrites the SnippetsFinder class from the ground up in order to improve its performance. The old code was beyond salvaging. It was complex, included various Rails 5 workarounds, comments that shouldn't be necessary, and most important of all: it produced a really poorly performing database query. As a result, I opted for rewriting the finder from scratch, instead of trying to patch the existing code. Instead of trying to reuse as many existing methods as possible, I opted for defining new methods specifically meant for the SnippetsFinder. This requires some extra code here and there, but allows us to have much more control over the resulting SQL queries. It is these changes that then allow us to produce a _much_ more efficient query. To illustrate how bad the old query was, we will use my own snippets as an example. Currently I have 52 snippets, most of which are global ones. To retrieve these, you would run the following Ruby code: user = User.find_by(username: 'yorickpeterse') SnippetsFinder.new(user, author: user).execute On GitLab.com the resulting query will take between 10 and 15 seconds to run, producing the query plan found at https://explain.depesz.com/s/Y5IX. Apart from the long execution time, the total number of buffers (the sum of all shared hits) is around 185 GB, though the real number is probably (hopefully) much lower as I doubt simply summing these numbers produces the true total number of buffers used. The new query's plan can be found at https://explain.depesz.com/s/wHdN, and this query takes between 10 and 100-ish milliseconds to run. The total number of buffers used is only about 30 MB. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/52639
* | Merge branch 'ce-7927-filter-none-any-weight-issues-api' into 'master'Sean McGivern2018-10-311-4/+13
|\ \ | |/ |/| | | | | Split CE and EE params in issues API See merge request gitlab-org/gitlab-ce!22689
| * Extract EE params in issues API to separate moduleHeinrich Lee Yu2018-10-301-4/+13
| |
* | Merge remote-tracking branch 'origin/master' into dev-masterDJ Mountney2018-10-297-9/+47
|\ \ | |/
| * Merge branch ↵Douwe Maan2018-10-261-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | '42790-improve-feedback-for-internal-git-access-checks-timeouts' into 'master' Adds trace of each access check when git push times out Closes #42790 See merge request gitlab-org/gitlab-ce!22265
| | * Adds tracing messages for slow git pushesTiago Botelho2018-10-251-0/+2
| | | | | | | | | | | | | | | | | | Whenever a git push takes more than 50 seconds the user will receive a trace from each check performed along with their timings
| * | Feature/add license to project APIJ.D. Bean2018-10-262-5/+27
| | |
| * | Merge branch '52384-api-filter-assignee-none-any' into 'master'Sean McGivern2018-10-263-2/+17
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Resolve "Filter by `None`/`Any` for assignee_id in issues/mrs API" Closes #52384 See merge request gitlab-org/gitlab-ce!22598
| | * | Support lowercase none / anyHeinrich Lee Yu2018-10-261-1/+1
| | | |
| | * | Refactor api validator to separate classHeinrich Lee Yu2018-10-263-8/+15
| | | |
| | * | Apply similar change to MRs APIHeinrich Lee Yu2018-10-262-2/+6
| | | |
| | * | Issues API: Add None/Any option to assignee_idHeinrich Lee Yu2018-10-261-1/+5
| | |/
| * | Support backward compatibility when introduce new failure reasonShinya Maeda2018-10-261-2/+1
| |/
* | Merge branch 'sh-fix-wiki-security-issue-53072' into 'master'Jan Provaznik2018-10-292-2/+17
|\ \ | |/ |/| | | | | [master] Validate Wiki attachments are valid temporary files See merge request gitlab/gitlabhq!2568
| * Validate Wiki attachments are valid temporary filesStan Hu2018-10-232-2/+17
| | | | | | | | | | | | | | | | | | | | A malicious attacker could craft a request to read arbitrary files on the system. This change adds a Grape validation to ensure that the tempfile parameter delivered by the Rack multipart uploader is a Tempfile type to prevent users from being able to specify arbitrary filenames. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53072
* | Merge branch '52559-applications-api-get-delete' into 'master'Rémy Coutable2018-10-222-0/+18
|\ \ | |/ |/| | | | | | | | | Add Applications API endpoints for listing and deleting entries. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52559 See merge request https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22296
| * Use application finder for Doorkeeper ApplicationsJB Vasseur2018-10-151-6/+3
| |
| * Do not return secret from GET /applications !22296JB Vasseur2018-10-121-1/+1
| |
| * disable CodeReuse/ActiveRecordJB Vasseur2018-10-121-0/+2
| |
| * Improve call for retrieving all applications !22296JB Vasseur2018-10-121-1/+1
| |
| * Support GET /applications and DELETE /applications/:id endpoints #52559JB Vasseur2018-10-111-0/+17
| |
| * Expose id and name attributes to Applications APIJB Vasseur2018-10-111-0/+2
| |
* | Rename "scheduled" label/badge of delayed jobs to "delayed"Shinya Maeda2018-10-191-1/+1
| |
* | Merge branch 'bvl-remove-forked-project-link' into 'master'Sean McGivern2018-10-191-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Remove ForkedProjectLink model Closes #38883 See merge request gitlab-org/gitlab-ce!22226
| * | Remove the `ForkedProjectLink` modelBob Van Landuyt2018-10-191-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the `ForkedProjectLink` model that has been replaced by the `ForkNetworkMember` and `ForkNetwork` combination. All existing relations have been adjusted to use these new models. The `forked_project_link` table has been dropped. The "Forks" count on the admin dashboard has been updated to count all `ForkNetworkMember` rows and deduct the number of `ForkNetwork` rows. This is because now the "root-project" of a fork network also has a `ForkNetworkMember` row. This count could become inaccurate when the root of a fork network is deleted.
* | Make getting a user by the username case insensitiveWilliam George2018-10-184-18/+10
| |
* | Merge branch 'sh-remove-koding' into 'master'Douwe Maan2018-10-151-4/+0
|\ \ | | | | | | | | | | | | | | | | | | Remove Koding integration and documentation Closes #39697 See merge request gitlab-org/gitlab-ce!22334
| * | Remove Koding integration and documentationStan Hu2018-10-121-4/+0
| |/ | | | | | | | | | | This integration no longer works and does not appear to be supported. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/39697
* | Allow getting the merge base of multiple revisionsBob Van Landuyt2018-10-121-7/+2
|/ | | | | As we now support getting the merge base for multiple revisions in gitaly, we can provide this functionality in our API
* Remove Git circuit breakerZeger-Jan van de Weg2018-10-102-21/+2
| | | | | | | Was introduced in the time that GitLab still used NFS, which is not required anymore in most cases. By removing this, the API it calls will return empty responses. This interface has to be removed in the next major release, expected to be 12.0.
* Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhqBob Van Landuyt2018-10-051-4/+3
|\
| * Merge branch 'security-bw-confidential-titles-through-markdown-api' into ↵Bob Van Landuyt2018-10-051-4/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | 'master' [master] Confidential issue/private snippet titles can be read by unauthenticated user through GFM markdown API Closes #2706 See merge request gitlab/gitlabhq!2507
| | * post_process markdown redered by APIBrett Walker2018-09-291-4/+3
| | |
* | | Merge branch 'ce-5987-project-templates-api' into 'master'Robert Speicher2018-10-054-5/+65
|\ \ \ | | | | | | | | | | | | | | | | Add a new project-specific templates API endpoint See merge request gitlab-org/gitlab-ce!22118
| * | | Backport project template API to CENick Thomas2018-10-054-5/+65
| |/ /
* | | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-052-4/+8
|\ \ \
| * | | Make GitLab pages support access controlTuomo Ala-Vannesluoma2018-10-051-0/+6
| |/ /
| * | Merge branch 'features/unauth-access-ssh-keys' into 'master'Douwe Maan2018-10-051-4/+2
| |\ \ | | | | | | | | | | | | | | | | List public ssh keys by id or username without authentication See merge request gitlab-org/gitlab-ce!20118
| | * | List public ssh keys by id or username without authenticationRonald Claveau2018-10-031-4/+2
| | | |
* | | | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-052-2/+3
|\ \ \ \ | |/ / /
| * | | Merge branch 'fix-todo-cops' into 'master'Rémy Coutable2018-10-041-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Fix todo cops See merge request gitlab-org/gitlab-ce!21850
| | * | | Fix SpaceBeforeFirstArg copSemyon Pupkov2018-09-201-1/+1
| | | | |
| * | | | Includes commit stats in POST project commits API51803-include-commits-stats-in-projects-apiJacopo2018-10-031-1/+2
| | | | |
* | | | | Merge branch 'master-ce' into scheduled-manual-jobsShinya Maeda2018-10-042-1/+4
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '45016-add-web-ide-commits-to-usage-ping' into 'master'Douwe Maan2018-10-031-0/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds Web IDE commits to usage ping Closes #45016 See merge request gitlab-org/gitlab-ce!22007
| | * | | | Implements Web IDE commits counter in RedisTiago Botelho2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes a temporary implementation of the Web IDE commits counter using Redis while https://gitlab.com/gitlab-org/gitlab-ce/issues/52096 is being discussed further for a more generic approach to counters