summaryrefslogtreecommitdiff
path: root/config/initializers
Commit message (Collapse)AuthorAgeFilesLines
* Add part of needed codeGosia Ksionek2019-04-051-0/+1
| | | | | | | | | | | | | | | | | Add columns to store project creation settings Add project creation level column in groups and default project creation column in application settings Remove obsolete line from schema Update migration with project_creation_level column existence check Rename migrations to avoid conflicts Update migration methods Update migration method
* Merge branch '54417-graphql-type-authorization' into 'master'Nick Thomas2019-04-041-0/+3
|\ | | | | | | | | | | | | GraphQL Type authorization Closes #54417 See merge request gitlab-org/gitlab-ce!25724
| * GraphQL Type authorizationLuke Duncalfe2019-04-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables authorizations to be defined on GraphQL Types. module Types class ProjectType < BaseObject authorize :read_project end end If a field has authorizations defined on it, and the return type of the field also has authorizations defined on it. then all of the combined permissions in the authorizations will be checked and must pass. Connection fields are checked by "digging" to find the type class of the "node" field in the expected location of edges->node. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54417
* | Prevent premailer from converting HTML entitiesHeinrich Lee Yu2019-04-041-1/+2
|/ | | | This prevents `&mdash` in our templates being change to `-`
* Load 'Gitlab::Jira::Middleware' if it existsFelipe Artur2019-04-011-0/+11
| | | | | Loads 'Gitlab::Jira::Middleware' only if it exists so this initializer can be backported to CE.
* Merge branch '54670-external-diffs-when-outdated' into 'master'Sean McGivern2019-03-281-0/+5
|\ | | | | | | | | | | | | Allow external diffs to be used conditionally Closes #54670 See merge request gitlab-org/gitlab-ce!25432
| * Allow external diffs to be used conditionallyNick Thomas2019-03-271-0/+5
| | | | | | | | | | | | | | | | | | | | Since external diffs are likely to be a bit slower than in-database ones, add a mode that makes diffs external after they've been obsoleted by events. This should strike a balance between performance and disk space. A background cron drives the majority of migrations, since diffs become outdated through user actions.
* | Log Gitaly RPC duration to api_json.log and production_json.logStan Hu2019-03-271-1/+6
|/ | | | | | | This makes it easier to debug Gitaly performance issues in the field. This commit also makes the tracking of query time thread-safe via RequestStore.
* Add helper method to return a human-friendly name for database adapterDouglas Barbosa Alexandre2019-03-211-1/+1
|
* Merge branch 'send-columns-to-sentry-on-missingattributeerror' into 'master'Stan Hu2019-03-191-0/+15
|\ | | | | | | | | Send schema cache to Sentry on MissingAttributeError See merge request gitlab-org/gitlab-ce!26331
| * Send schema cache to Sentry on MissingAttributeErrorSean McGivern2019-03-191-0/+15
| | | | | | | | | | | | We don't know why this happens, so this is an attempt to debug the issue by sending a full list of all columns ActiveRecord knows about when the error is raised.
* | Integrate Gitlab::Keys with Gitlab::ShellPatrick Bajao2019-03-191-0/+1
|/ | | | | | | | | | | In this commit, some methods that aren't being used are removed from `Gitlab::Shell`. They are the ff: - `#remove_keys_not_found_in_db` - `#batch_read_key_ids` - `#list_key_ids` The corresponding methods in `Gitlab::Keys` have been removed as well.
* Run rubocop -aNick Thomas2019-03-131-4/+2
|
* Batch insert CI rspec_profiling dataStan Hu2019-03-121-15/+35
| | | | | | | | | | | | | | | Instead of inserting a row after each example to an external database, we save the CI profiling reports into the `rspec_profiling` directory and insert the data in the update-tests-metadata CI stage. This should make each spec run faster and also reduce the number of PostgreSQL connections needed by concurrent CI builds. `scripts/insert-rspec-profiling-data` also inserts one file at a time via the PostgreSQL COPY command for faster inserts. The one side effect is that the `created_at` and `updated_at` timestamps aren't available since they aren't generated in the CSV. Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/10154
* Merge branch 'add_ldap_tls_options' into 'master'Douwe Maan2019-03-051-0/+18
|\ | | | | | | | | | | | | Allow raw `tls_options` to be passed in LDAP configuration Closes #46391 See merge request gitlab-org/gitlab-ce!20678
| * Allow raw `tls_options` to be passed in LDAP configurationDrew Blessing2019-03-041-0/+18
| | | | | | | | | | | | | | We've previously exposed ca_file and ssl_version but there are many possible options that can be used inside tls_options. Instead of exposing individual ones, simply expose the entire hash so it can be passed in and we won't have to add things in the future.
* | Merge branch '40396-sidekiq-in-process-group' into 'master'Stan Hu2019-03-041-0/+3
|\ \ | | | | | | | | | | | | sidekiq: terminate child processes at shutdown See merge request gitlab-org/gitlab-ce!25669
| * | sidekiq: terminate child processes at shutdownNick Thomas2019-03-041-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sidekiq jobs frequently spawn long-lived child processes to do work. In some circumstances, these can be reparented to init when sidekiq is terminated, leading to duplication of work and strange concurrency problems. This commit changes sidekiq so that, if run as a process group leader, it will forward `INT` and `TERM` signals to the whole process group. If the memory killer is active, it will also use the process group when resorting to `kill -9` to shut down. These changes mean that a naive `kill <pid-of-sidekiq>` will now do the right thing, killing any child processes spawned by sidekiq, as long as the process supervisor placed it in its own process group. If sidekiq isn't a process group leader, this new code is skipped.
* | Types::BaseField accepts authorize after reloadBob Van Landuyt2019-03-041-1/+1
|/ | | | | | | | | | When working on files in `app/graphql` the code correctly gets autoloaded. However, the redefined `Types::BaseField` would never receive the `.accepts_definition` call, causing all queries after a reload to fail. Calling `.accepts_definition` on its superclass makes sure the reloaded version also has the `authorize` definition specified.
* Fix double space before commentSean McGivern2019-03-011-1/+1
|
* Mark Fog initializer with frozen_string_literal: trueStan Hu2019-03-011-0/+2
|
* Add a monkey patch that will squelch warnings for legacy Fog gemsStan Hu2019-02-281-0/+50
|
* Revert "Restart Unicorn and Sidekiq when GRPC throws 14:Endpoint read failed"Nick Thomas2019-02-281-1/+1
| | | | This reverts commit 006753110a462e62f549cdf3c410e73eed068dbf.
* Prepare test suite for switch to Gitaly-embedded Git hooksJacob Vosmaer2019-02-271-1/+1
|
* Merge branch 'enable_trace_sidekiq_development' into 'master'Douwe Maan2019-02-261-0/+4
|\ | | | | | | | | Turn on backtrace for sidekiq in development See merge request gitlab-org/gitlab-ce!25515
| * Turn on backtrace for sidekiq in developmentThong Kuah2019-02-251-0/+4
| | | | | | | | This enables easier debugging in GDK
* | Improve GraphQL Authorization DSLLuke Duncalfe2019-02-261-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously GraphQL field authorization happened like this: class ProjectType field :my_field, MyFieldType do authorize :permission end end This change allowed us to authorize like this instead: class ProjectType field :my_field, MyFieldType, authorize: :permission end A new initializer registers the `authorize` metadata keyword on GraphQL Schema Objects and Fields, and we can collect this data within the context of Instrumentation like this: field.metadata[:authorize] The previous functionality of authorize is still being used for mutations, as the #authorize method here is called at during the code that executes during the mutation, rather than when a field resolves. https://gitlab.com/gitlab-org/gitlab-ce/issues/57828
* Log queue duration in production_json.logStan Hu2019-02-121-1/+2
| | | | | | | | `queue_duration` is a useful metric that is currently in api_json.log but not in production_json.log. We should add it because it tells us how long the request sat in Workhorse before Unicorn processed it. Having this field enables the support team to better troubleshoot when delays began to happen.
* Merge branch '52424-goodbye-hipchat' into 'master'Douglas Barbosa Alexandre2019-02-111-14/+0
|\ | | | | | | | | | | | | Remove HipChat integration from GitLab Closes #52424 See merge request gitlab-org/gitlab-ce!22223
| * Remove HipChat integration from GitLabNick Thomas2019-02-081-14/+0
| |
* | Merge branch 'an-peek-jaeger' into 'master'Grzegorz Bizon2019-02-111-0/+1
|\ \ | | | | | | | | | | | | Provide a performance bar link to the Jaeger UI See merge request gitlab-org/gitlab-ce!24902
| * | Provide a performance bar link to the Jaeger UIan-peek-jaegerAndrew Newdigate2019-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jaeger is a distributed tracing tool. This change adds a "Tracing" link to the performance bar to directly link to a current request in Jaeger. This is useful for two reasons: 1 - it provides affordance to developers that the distributed tracing tool is available, so that it can quickly be discovered. 2 - it allows developers to quickly find a specific trace without having to manually navigate to a second user-interface.
* | | Fix error when reloading code in Sidekiqpl-copy-still-activePeter Leitzen2019-02-101-1/+1
| |/ |/| | | | | | | | | | | This commit fixes the following error in development: ArgumentError: A copy of Gitlab::Metrics::Transaction has been removed from the module tree but is still active!
* | Fix #44332 - Add support for profile and emailGotenXiao2019-02-061-2/+21
| |
* | Merge branch '52568-external-mr-diffs' into 'master'Sean McGivern2019-02-061-0/+8
|\ \ | | | | | | | | | | | | | | | | | | Allow merge request diffs to be placed into an object store Closes #52568 See merge request gitlab-org/gitlab-ce!24276
| * | Allow MR diffs to be placed into an object storeNick Thomas2019-02-051-0/+8
| |/
* | Monkey-patch Sprockets to prevent cache ballooningRémy Coutable2019-02-051-0/+3
|/ | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* Add OpenTracing instrumentation for Action View Render eventsAndrew Newdigate2019-01-301-0/+1
| | | | | | | | | This change adds three new instrumentations, driven through rails notifications: render_template.action_view, render_collection.action_view and render_partial.action_view. These can help developers understand why renders are taking a long time which may in turn help them to improve their performance.
* Merge branch '54250-upstream-kubeclient-redirect-patch' into 'master'Kamil Trzciński2019-01-251-22/+0
|\ | | | | | | | | | | | | Use http_max_redirects opt to replace monkeypatch Closes #54250 See merge request gitlab-org/gitlab-ce!24284
| * Use http_max_redirects opt to replace monkeypatchThong Kuah2019-01-251-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | http_max_redirects was introduced in 4.2.2, so upgrade kubeclient. The monkey-patch was global so we will have to check that all instances of Kubeclient::Client are handled. Spec all methods of KubeClient This should provide better confidence that we are indeed disallowing redirection in all cases
* | Merge branch 'an-opentracing-active-record-tracing' into 'master'Kamil Trzciński2019-01-251-0/+3
|\ \ | |/ |/| | | | | Adds tracing support for ActiveRecord notifications See merge request gitlab-org/gitlab-ce!24604
| * Adds tracing support for ActiveRecord notificationsAndrew Newdigate2019-01-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This change will publish distributed tracing spans related to SQL ActiveRecord queries. These queries are unbound, so will still contain parameter substitution strings in place of actual parameter values. This ensures that the SQL strings do not need to be scrubbed, since the values are not included in the SQL. More details of rails instrumentation can be found here: https://guides.rubyonrails.org/active_support_instrumentation.html
* | Enable the Layout/ExtraSpacing cop56392-enable-the-layout-extraspacing-copRémy Coutable2019-01-243-3/+3
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch ↵Nick Thomas2019-01-231-0/+41
|\ \ | |/ |/| | | | | | | | | | | | | '52674-api-v4-projects-project_id-jobs-endpoint-hits-statement-timeout' into 'master' [API] Omit `X-Total` and `X-Total-Pages` headers when items count is more than 10,000 Closes #42194 and #52674 See merge request gitlab-org/gitlab-ce!23931
| * [API] Omit X-Total{,-Pages} when count > 10kRémy Coutable2019-01-221-0/+41
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Merge branch 'an-opentracing-propagation' into 'master'Kamil Trzciński2019-01-221-0/+20
|\ \ | |/ |/| | | | | Adds inter-service OpenTracing propagation See merge request gitlab-org/gitlab-ce!24239
| * Adds inter-service OpenTracing propagationAndrew Newdigate2019-01-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows the GitLab rails and sidekiq components to receive tracing spans from upstream services such as Workhorse and pass these spans on to downstream services including Gitaly and Sidekiq. This change will also emit traces for incoming and outgoing requests using the propagated trace information. This will allow operators and engineers to view traces across the Workhorse, GitLab Rails, Sidekiq and Gitaly components. Additional intra-service instrumentation will be added in future changes.
* | Merge branch 'raise-on-unfiltered-params' into 'master'Rémy Coutable2019-01-211-2/+0
|\ \ | |/ |/| | | | | Set ActionController raise_on_unfiltered_parameters to true See merge request gitlab-org/gitlab-ce!24443
| * Actually set raise_on_unfiltered_parameters to trueJasper Maes2019-01-161-2/+0
| |
* | Conditionally initialize the global opentracing tracerAndrew Newdigate2019-01-171-0/+13
|/ | | | | | | | | | | | | | | | | This change will instantiate an OpenTracing tracer and configure it as the global tracer when the GITLAB_TRACING environment variable is configured. GITLAB_TRACING takes a "connection string"-like value, encapsulating the driver (eg jaeger, etc) and options for the driver. Since each service, whether it's written in Ruby or Golang, uses the same connection-string, it should be very easy to configure all services in a cluster, or even a single development machine to be setup to use tracing. Note that this change does not include instrumentation or propagation changes as this is a way of breaking a previous larger change into components. The instrumentation and propagation changes will follow in separate changes.