summaryrefslogtreecommitdiff
path: root/config/initializers
Commit message (Collapse)AuthorAgeFilesLines
* Use transactions in JS feature specsjs-specs-transactionsHeinrich Lee Yu2019-07-121-0/+3
| | | | | Uses Rails transactional tests instead of DatabaseCleaner transaction strategy because that doesn't work with JS tests
* Merge branch '490-enable-puma-by-default-in-GDK' into 'master'Grzegorz Bizon2019-07-111-2/+2
|\ | | | | | | | | | | | | Enable puma by default in GDK Closes gitlab-development-kit#490 See merge request gitlab-org/gitlab-ce!30285
| * Enable puma by default in GDK490-enable-puma-by-default-in-GDKQingyu Zhao2019-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two changes: 1. Move bin/web to bin/web_unicorn(removed PUMA switching logic) Introduce new shadow script bin/web. Now we have 3 scripts working together: bin/web, bin/web_puma, bin/web_unicorn In bin/web, it checks ENV['USE_WEB_SERVER']: - if value is 'puma' or value is not set, call bin/web_puma - if value is 'unicorn', call bin/web_unicorn - report error if other values given 2. Gitlab rails allow ENV setting to override timeout - ENV['GITLAB_RAILS_RACK_TIMEOUT'] for service_timeout - ENV['GITLAB_RAILS_WAIT_TIMEOUT'] for wait_timeout
* | Add a rubocop for Rails.loggerMayra Cabrera2019-07-105-8/+8
| | | | | | | | | | | | Suggests to use a JSON structured log instead Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
* | CE-EE parity for shared config filesRobert Speicher2019-07-091-1/+2
| | | | | | | | | | This copies over EE-specific changes to shared configuration files in CE.
* | Merge branch 'rs-basic-config-files' into 'master'Lin Jen-Shin2019-07-099-2/+162
|\ \ | | | | | | | | | | | | CE-EE parity for config/initializers See merge request gitlab-org/gitlab-ce!30484
| * | Add frozen_string_literal to EE files now in CErs-basic-config-filesRobert Speicher2019-07-085-0/+10
| | |
| * | Move lib/gitlab dependency to applicationRobert Speicher2019-07-081-2/+0
| | | | | | | | | | | | We use the `Gitlab.ee` and `.ee?` methods in several initializers now.
| * | CE-EE parity for files in config/initializersRobert Speicher2019-07-084-2/+31
| | |
| * | Add EE-only initializersRobert Speicher2019-07-085-0/+123
| |/ | | | | | | | | These files are only used by EE, and are now wrapped in `Gitlab.ee` blocks for file parity.
* | Limit user information to RackAttack throttlesMayra Cabrera2019-07-091-1/+1
|/ | | | | | | | rack.attack.match_discriminator is only return on throttle_authenticated_api or throttle_authenticated_web requests, so we're avoiding logging user_id on blacklist requests Follow up of https://gitlab.com/gitlab-org/gitlab-ce/issues/62756
* Fix race in forbid_sidekiq_in_transactions.rbfix-sidekiq-transaction-check-raceKamil Trzciński2019-07-041-6/+7
| | | | | | Current code uses module attribute which stores value global instead of locally (thread locally). This results in concurrent accesses to overwrite the each other values
* Only save Peek session in Redis when Peek is enabledRémy Coutable2019-07-031-0/+3
| | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Merge branch ↵Kamil Trzciński2019-07-021-4/+16
|\ | | | | | | | | | | | | | | | | '63869-store-prometheus-metrics-in-separate-dirs-in-test-and-prod' into 'master' Use separate Prometheus metrics dirs in dev/test Closes #63869 See merge request gitlab-org/gitlab-ce!30253
| * Use separate Prometheus metrics dirs in dev/test63869-store-prometheus-metrics-in-separate-dirs-in-test-and-prodAleksei Lipniagov2019-07-021-4/+16
| | | | | | | | | | Store Sidekiq and Web server metrics from Prometheus in separate directories in `development` and `test` environments.
* | Include user id and username in auth logMayra Cabrera2019-07-021-2/+12
| | | | | | | | | | | | Fetches user based on the value of 'rack.attack.match_discriminator' Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/62756
* | Start UnicornSampler in master processJan Provaznik2019-07-021-6/+4
|/ | | | | Using `on_master_start` assures that the sampler is started in master process and not in worker processes.
* Includes logic to persist namespace statisticsMayra Cabrera2019-07-021-0/+3
| | | | | | | | | | | | | | | | | | | | | - Add two new ActiveRecord models: - RootNamespaceStoragestatistics will persist root namespace statistics - NamespaceAggregationSchedule will save information when a new update to the namespace statistics needs to be scheduled - Inject into UpdateProjectStatistics concern a new callback that will call an async job to insert a new row onto NamespaceAggregationSchedule table - When a new row is inserted a new job is scheduled. This job will update call an specific service to update the statistics and after that it will delete thee aggregated scheduled row - The RefresherServices makes heavy use of arel to build composable queries to update Namespace::RootStorageStatistics attributes. - Add an extra worker to traverse pending rows on NAmespace::AggregationSchedule table and schedule a worker for each one of this rows. - Add an extra worker to traverse pending rows on NAmespace::AggregationSchedule table and schedule a worker for each one of this rows
* Add a memory cache local to the thread to reduce Redis loadStan Hu2019-07-011-0/+3
| | | | | | | | | | | | Loading `ApplicationSetting` from Redis was responsible for at least 50% of the CPU load of the Redis cluster on GitLab.com. Since these values generally don't change very much, we can load this from the database and cache it in memory, skipping Redis altogther. We use `ActiveSupport::Cache::MemoryStore` as a drop-in replacement for `RedisCacheStore` even though we probably don't need synchronized access within `Thread.current`. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63977
* Run do_master_restart callback on server startJan Provaznik2019-07-011-4/+11
| | | | | | | | | | We want to call master_restart callback on start too - this callback is used for cleaning up prometheus files. It has been added to Omnibus already: https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/3350 So make sure that Unicorn example configs are up-to-date and that the same callback is called for Puma too.
* Merge branch 'zj-circuit-breaker-removal-part-deux' into 'master'Bob Van Landuyt2019-07-011-15/+6
|\ | | | | | | | | Remove ignored circuit_breaker columns See merge request gitlab-org/gitlab-ce!30159
| * Remove ignored circuit_breaker columnsZeger-Jan van de Weg2019-06-281-15/+6
| | | | | | | | | | | | The circuit breaker itself got removed a while ago, when that happened some parts got left behind. Using grep old stale settings and validations were found and are now removed.
* | Merge branch 'rs-config-settings' into 'master'Lin Jen-Shin2019-06-291-8/+136
|\ \ | | | | | | | | | | | | Copy Settings initializer from EE See merge request gitlab-org/gitlab-ce!30140
| * | Move mirror settings to their own EE blockrs-config-settingsRobert Speicher2019-06-281-3/+6
| | |
| * | Copy Settings initializer from EERobert Speicher2019-06-271-8/+133
| |/ | | | | | | This brings parity between the two versions.
* | Merge branch 'transaction-metrics' into 'master'Lin Jen-Shin2019-06-281-0/+3
|\ \ | | | | | | | | | | | | Monitor database transaction activity for Rails See merge request gitlab-org/gitlab-ce!29928
| * | Adds metrics to measure database transactionstransaction-metricsAndrew Newdigate2019-06-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we don't have good insight into the affect of Rails transaction blocks on the application. If these blocks are held open for extended periods, they can have detrimental effects on the application. This change will allow us to track these transactions, with the aim of reducing their duration.
* | | Replace 'JIRA' with 'Jira'Takuya Noguchi2019-06-281-1/+1
| |/ |/| | | | | | | | | https://community.atlassian.com/t5/Jira-questions/Is-it-quot-JIRA-quot-or-quot-Jira-quot/qaq-p/681163 Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
* | Merge branch 'refactor/remove-sentry-from-app-settings' into 'master'Stan Hu2019-06-261-10/+3
|\ \ | | | | | | | | | | | | Remove Sentry settings from application settings See merge request gitlab-org/gitlab-ce!28447
| * | refactor: remove Sentry from application settingsRoger Meier2019-06-251-10/+3
| | |
* | | Speed up obtaining Let's Encrypt certificatesVladimir Shushlin2019-06-261-1/+1
|/ /
* | Copy inflections from EErs-ee-inflectionsRobert Speicher2019-06-251-0/+8
|/
* Refactor inside_transaction? to Gitlab::DatabaseAndrew Newdigate2019-06-251-1/+1
| | | | | | | This is a small change to move AfterCommitQueue.inside_transaction? to Gitlab::Database.inside_transaction? Since this change is required by different changes which may not arrive in sequence, it's easier to extract this change out on it's own.
* Renew Let's Encrypt certificatesVladimir Shushlin2019-06-241-0/+4
| | | | | | | | Add index for pages domain ssl auto renewal Add PagesDomain.needs_ssl_renewal scope Add cron worker for ssl renewal Add worker for ssl renewal Add pages ssl renewal worker queues settings
* Merge branch 'config-yaml-differences' into 'master'Robert Speicher2019-06-201-0/+14
|\ | | | | | | | | Backport changes made by EE to various YAML configuration files See merge request gitlab-org/gitlab-ce!29606
| * Backport gitlab.yml.example from EEconfig-yaml-differencesYorick Peterse2019-06-201-0/+14
| | | | | | | | | | | | | | | | To make this happen, we need to conditionally add the group_saml strategy when running tests, but only on EE. This requires some changes to Gitlab.ee? so that it can be used before/without loading the Rails environment. We also have to change how we require a few files, so this can run outside of Rails.
* | Only support postgresqlNick Thomas2019-06-191-0/+4
|/ | | | MySQL support has been removed
* Add back sidekiq metrics exporterrc/add_back_sidekiq_exporterRyan Cobb2019-06-131-0/+6
|
* Moved RackTimeout observer to a different locationJan Provaznik2019-06-121-1/+1
| | | | | Because there will be similar observer for PumaWorkerKiller, it makes sense to keep both on better place.
* Adds sidekiq worker label for ruby metricsRyan Cobb2019-06-061-6/+0
|
* Merge dev.gitlab.org master into GitLab.com masterYorick Peterse2019-06-032-3/+52
|\
| * Protect Gitlab::HTTP against DNS rebinding attackDouwe Maan2019-05-302-3/+52
| | | | | | | | | | | | Gitlab::HTTP now resolves the hostname only once, verifies the IP is not blocked, and then uses the same IP to perform the actual request, while passing the original hostname in the `Host` header and SSL SNI field.
* | Added rack-timeout for PumaJan Provaznik2019-05-291-0/+23
| | | | | | | | | | | | | | It assures that requests are aborted after 60 seconds, otherwise an exception is raised. This exception is logged by Sentry, also there is a Prometheus counter for measuring number of requests in each state.
* | Add Puma samplerJan Provaznik2019-05-292-1/+8
|/ | | | | This sampler gathers Puma-specific metrics which can be used by Prometheus then.
* Store Let's Encrypt private key in settingsVladimir Shushlin2019-05-281-6/+1
| | | | | | | | | | | | | | | | Storing this key in secrets.yml was a bad idea, it would require users using HA setups to manually replicate secrets across nodes during update, it also needed support from omnibus package * Revert "Generate Let's Encrypt private key" This reverts commit 444959bfa0b79e827a2a1a7a314acac19390f976. * Add Let's Encrypt private key to settings as encrypted attribute * Generate Let's Encrypt private key in database migration
* Changes RackAttack logger to use structured logsMayra Cabrera2019-05-241-1/+9
| | | | | | | | Creates a new filename to register auth logs. This change should allow SRE's queries to make better queries through logging infrastructure. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54528
* Bump devise to 4.6Utkarsh Gupta2019-05-211-0/+5
| | | | Signed-off-by: Utkarsh Gupta <guptautkarsh2102@gmail.com>
* Fix typos in the whole gitlab-ce projectYoginth2019-05-201-1/+1
|
* Merge branch 'include-ee-fixtures' into 'master'12-0-auto-deploy-0009646Stan Hu2019-05-111-0/+4
|\ | | | | | | | | Add EE fixtures to SeedFu fixture paths See merge request gitlab-org/gitlab-ce!28241
| * Add EE fixtures to SeedFu pathinclude-ee-fixturesBalasankar "Balu" C2019-05-101-0/+4
| | | | | | | | Signed-off-by: Balasankar "Balu" C <balasankar@gitlab.com>