summaryrefslogtreecommitdiff
path: root/lib/gitlab
Commit message (Collapse)AuthorAgeFilesLines
* Remove code related to object hierarchy in MySQLremove-nested-groups-checksHeinrich Lee Yu2019-07-254-177/+121
| | | | | These are not required because MySQL is not supported anymore
* Enable Rubocop Performance/ReverseEachsh-rubocop-reverse-eachStan Hu2019-07-241-1/+1
| | | | | | | `Array.reverse_each` is faster than `Array.reverse.each` because: * reverse.each creates a new array then loops each element * reverse_each loops in reverse order (no intermediate array created)
* Add RateLimiter to RawControllerMayra Cabrera2019-07-241-4/+36
| | | | | | | | | | * Limits raw requests to 300 per minute and per raw path. * Add a new attribute to ApplicationSettings so user can change this value on their instance. * Uses Gitlab::ActionRateLimiter to limit the raw requests. * Add a new method into ActionRateLimiter to log the event into auth.log Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/48717
* Merge branch 'optimise-import-performance' into 'master'Stan Hu2019-07-244-4/+4
|\ | | | | | | | | | | | | Optimise import performance Closes #64924 See merge request gitlab-org/gitlab-ce!31045
| * Optimise import performanceoptimise-import-performanceKamil Trzciński2019-07-244-4/+4
| | | | | | | | | | | | | | | | | | - Fix `O(n)` complexity of `append_or_update_attribute`, we append objects to an array and re-save project - Remove the usage of `keys.include?` as it performs `O(n)` search, instead use `.has_key?` - Remove the usage of `.keys.first` as it performs a copy of all keys, instead use `.first.first`
* | [ADD] outbound requests whitelistReuben Pereira2019-07-242-6/+37
| | | | | | | | Signed-off-by: Istvan szalai <istvan.szalai@savoirfairelinux.com>
* | Enable tablesample count strategy by defaultAndreas Brandl2019-07-244-19/+5
| | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/58792
* | Merge branch 'sh-add-rugged-to-peek' into 'master'Sean McGivern2019-07-247-9/+36
|\ \ | | | | | | | | | | | | Add Rugged calls to performance bar See merge request gitlab-org/gitlab-ce!30983
| * | Add Rugged calls to performance barStan Hu2019-07-237-9/+36
| | | | | | | | | | | | | | | | | | This will help diagnose the source of excessive I/O from Rugged calls. To implement this, we need to obtain the full list of arguments sent to each request method.
* | | LFS export records repository_type dataLuke Duncalfe2019-07-243-8/+102
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | A project can have the same `LfsObject` linked with up to three `LfsObjectsProject` records. Each of these records would be for a different repository, recorded in the `repository_type` property. The different repositories at time of writing are "project", "wiki", and "design". See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894 This change exports the list of `repository_type`s as a JSON mapping of oid => repository_types, which are imported to recreate the correct `LfsObjectsProject` records. https://gitlab.com/gitlab-org/gitlab-ee/issues/11090
* | Merge branch '65019-job-templates-dind-tls-fix' into 'master'Thong Kuah2019-07-245-0/+7
|\ \ | | | | | | | | | | | | Set DOCKER_TLS_CERTDIR in CI job templates See merge request gitlab-org/gitlab-ce!31080
| * | Set DOCKER_TLS_CERTDIR in CI job templates65019-job-templates-dind-tls-fixTiger2019-07-245-0/+7
| | | | | | | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/65019
* | | Set DOCKER_TLS_CERTDIR in Auto Dev-Ops CI template65019-auto-devops-dind-tls-fixTiger2019-07-241-0/+2
|/ / | | | | | | https://gitlab.com/gitlab-org/gitlab-ce/issues/65019
* | Merge branch '52442-initial-mysql-support-removal' into 'master'Robert Speicher2019-07-239-272/+64
|\ \ | | | | | | | | | | | | | | | | | | Remove dead mysql code Closes #63191 See merge request gitlab-org/gitlab-ce!29608
| * | Remove dead MySQL codeNick Thomas2019-07-239-272/+64
| | | | | | | | | | | | None of this code can be reached any more, so it can all be removed
* | | Rename changelog to correct issue number, be more explicit that we're ↵James Keogh2019-07-231-4/+5
| | | | | | | | | | | | talking about Auto DevOps projects
* | | Merge branch 'adjust-group-level-analytics-to-accept-multiple-project-ids' ↵Stan Hu2019-07-237-39/+62
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into 'master' Adjust group level analytics to accept multiple projects ids See merge request gitlab-org/gitlab-ce!30744
| * | | Change sql queryMałgorzata Ksionek2019-07-231-3/+3
| | | |
| * | | Add code review remarksadjust-group-level-analytics-to-accept-multiple-project-idsMałgorzata Ksionek2019-07-237-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add cr remarks Improve specs according to the review Fix schema Add cr remarks Fix naming Add cr remarks
| * | | Add basic project extractionMałgorzata Ksionek2019-07-237-35/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allow project filtering Prepare summary for accepting multiple groups Modify deploys group summary class Add filtering by project name in issues summary Fix rubocop offences Add changelog entry Change name to id in project filtering Fix rebase problem Add project extraction
* | | | Add PIP_DEPENDENCY_PATH to dependency scanning templatemo khan2019-07-231-0/+1
| |/ / |/| |
* | | Merge branch 'safe-archiving-for-traces' into 'master'Kamil Trzciński2019-07-232-2/+17
|\ \ \ | | | | | | | | | | | | | | | | Extra logging for new live trace architecture See merge request gitlab-org/gitlab-ce!30892
| * | | Validate the existence of archived traces before removing live tracesafe-archiving-for-tracesShinya Maeda2019-07-232-2/+17
| |/ / | | | | | | | | | | | | Often live traces are removed even though the archived trace doesn't exist. This commit checkes the existence strictly.
* | | Merge branch 'sh-use-shared-state-cluster-pubsub' into 'master'Kamil Trzciński2019-07-231-1/+1
|\ \ \ | | | | | | | | | | | | | | | | Use persistent Redis cluster for Workhorse pub/sub notifications See merge request gitlab-org/gitlab-ce!30990
| * | | Use persistent Redis cluster for Workhorse pub/sub notificationssh-use-shared-state-cluster-pubsubStan Hu2019-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, in Omnibus, Workhorse expected to listen via the Redis shared state cluster for the `workhorse:notifications` publish/subscribe channel, but the Rails code was using the Sidekiq queue cluster for this. To fix this inconsistency, we make the Rails code use the persistent cluster, since we don't want Workhorse to be looking at anything Sidekiq-related.
* | | | Merge branch '64974-remove-livesum-from-ruby-sampler-metrics' into 'master'Kamil Trzciński2019-07-231-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Remove :livesum from RubySampler metrics See merge request gitlab-org/gitlab-ce!31047
| * | | | Remove :livesum from RubySampler metrics64974-remove-livesum-from-ruby-sampler-metricsAleksei Lipniagov2019-07-231-4/+4
| | |_|/ | |/| |
* | | | Merge branch 'georgekoltsov/64377-add-better-log-msg-to-members-mapper' into ↵Ash McKenzie2019-07-231-0/+2
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | 'master' Add better error message to MembersMapper#ensure_default_member! See merge request gitlab-org/gitlab-ce!30838
| * | | Add changelog entrygeorgekoltsov/64377-add-better-log-msg-to-members-mapperGeorge Koltsov2019-07-231-1/+1
| | | |
| * | | Add better error message MembersMapper#ensure_default_member!George Koltsov2019-07-171-0/+2
| | | | | | | | | | | | | | | | More details in: https://gitlab.com/gitlab-org/gitlab-ce/issues/64377
* | | | Merge branch 'rm-src-branch' into 'master'Grzegorz Bizon2019-07-231-1/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Support remove source branch on merge w/ push options See merge request gitlab-org/gitlab-ce!30728
| * | | | Support rm src branch on merge w/ push optionChristian Couder2019-07-171-1/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MergeRequests::PushOptionsHandlerService has been updated to allow creating and updating merge requests with the `remove_source_branch` set using git push options. To create a new merge request and set it to remove the source branch when it is merged: git push -u origin -o merge_request.create \ -o merge_request.remove_source_branch To update an existing merge request and set it to remove the source branch when it is merged: git push -u origin -o merge_request.remove_source_branch Issue https://gitlab.com/gitlab-org/gitlab-ce/issues/64320
* | | | Bring backward compatibility for request profilesKamil Trzciński2019-07-232-20/+24
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that we missed the backward compatibility support for profiles in the existing folder. This commit also fixes some specs to be idempotent and work in a temporary directory which not always seems to be the case. This commit also brings the profile_spec.rb which seems to be missing.
* | | Convert githost.log to JSON formatStan Hu2019-07-221-5/+1
| |/ |/| | | | | | | This will make it easier to parse this in production and adds the `correlation_id` if available.
* | Merge branch 'maintainers-can-create-subgroup' into 'master'Sean McGivern2019-07-221-0/+11
|\ \ | | | | | | | | | | | | Add a group setting to allow Maintainers to create sub-groups See merge request gitlab-org/gitlab-ce!29718
| * | Add "allowed to create subgroups" dropdown to group settings formFabio Papa2019-07-191-0/+7
| | |
| * | Add constants representing Owner and Maintainer group access levelsFabio Papa2019-07-191-0/+4
| | |
* | | OAuth2 support for GitLab personal access tokensSteve Abrams2019-07-221-3/+14
| | | | | | | | | | | | | | | | | | PATs are accepted using the OAuth2 compliant header "Authorization: Bearer {token}" in order to allow for OAuth requests while 2FA is enabled.
* | | Count wiki page creationAlex Kalderimis2019-07-213-6/+51
|/ / | | | | | | | | | | | | This adds a counter to count page creation, which is reflected in the usage-data we collect. The number created is stored in Redis, avoiding DB access.
* | Merge branch 'sh-fix-gitaly-server-info-cache' into 'master'Mayra Cabrera2019-07-191-1/+1
|\ \ | | | | | | | | | | | | | | | | | | Fix Gitaly auto-detection caching Closes #64802 See merge request gitlab-org/gitlab-ce!30954
| * | Fix Gitaly auto-detection cachingStan Hu2019-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If `GitalyClient#can_use_disk?` returned `false`, it was never cached properly and led to excessive number of Gitaly calls. Instead of using `cached_value.present?`, we need to check `cached_value.nil?`. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64802
* | | Document database review processToon Claes2019-07-191-0/+26
| | | | | | | | | | | | See https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/6069
* | | Merge branch '30939-remove-worker-label-from-ruby-sampler-metrics' into 'master'Kamil Trzciński2019-07-191-19/+6
|\ \ \ | | | | | | | | | | | | | | | | Get rid of `worker_label` in RubySampler See merge request gitlab-org/gitlab-ce!30942
| * | | Get rid of `worker_label` in RubySampler30939-remove-worker-label-from-ruby-sampler-metricsAleksei Lipniagov2019-07-191-19/+6
| |/ / | | | | | | | | | | | | | | | We have Prometheus::PidProvider which sets correct worker id for a process, so such implementation of `worker_label` in the sampler is obsolete.
* | | Avoid increasing redis counters when usage_ping is disabledFrancisco Javier López2019-07-191-0/+2
|/ /
* | Adjust redis cache metricsBen Kochie2019-07-191-3/+12
| | | | | | | | | | | | * Remove `controller` and `action` labels from duration histogram. * Create a new simple counter for `controller` and `action`. * Adjust histogram buckets to observe smaller response times.
* | Added Usage Data for some Web IDE actionsFrancisco Javier López2019-07-192-1/+21
| | | | | | | | | | | | | | The actions tracked in the web IDE are: - creation of commits - creation of merge requests - projects loaded
* | Merge branch '64295-predictable-environment-slugs' into 'master'Lin Jen-Shin2019-07-191-0/+58
|\ \ | | | | | | | | | | | | Use predictable environment slugs See merge request gitlab-org/gitlab-ce!30551
| * | Introduce predictable environment slugs64295-predictable-environment-slugsTiger2019-07-191-0/+58
| | | | | | | | | | | | | | | | | | | | | If an environment slug is predictable given only the environment name, we can use the environment slug earlier in the CI variable evaluation process as we don't have to wait for the environment record itself to be persisted.
* | | Set Private visibility for restricted Internal imported projectsGeorge Koltsov2019-07-191-0/+1
|/ / | | | | | | | | | | | | | | | | With https://gitlab.com/gitlab-org/gitlab-ee/issues/12388 change going live there is potential risk of breaking imports of 'Internal' projects. This change makes sure if 'Internal' visibility level is restricted all 'Internal' projects will be marked as 'Private' See: https://gitlab.com/gitlab-org/gitlab-ce/issues/64311