summaryrefslogtreecommitdiff
path: root/config/initializers
Commit message (Collapse)AuthorAgeFilesLines
* Sync email address from specified omniauth providerRobin Bobbitt2017-06-071-0/+1
|
* Fix keys seedDouwe Maan2017-06-021-10/+14
|
* Allow scheduling from after_commit hooksDouwe Maan2017-06-021-9/+27
|
* Forbid Sidekiq scheduling in transactionsYorick Peterse2017-06-021-0/+27
| | | | | | | | | Scheduling jobs in transactions can lead to race conditions where a job runs before a transaction has been committed. The added initializer ensures the various Sidekiq scheduling methods raise an error when called inside a transaction. Fixes #27233
* Merge branch '31644-make-cookie-sessions-unique' into 'master'Douwe Maan2017-06-011-1/+7
|\ | | | | | | | | | | | | Update session cookie key name to be unique to instance in development Closes #31644 See merge request !11839
| * Update session cookie key name to be unique to instance in development31644-make-cookie-sessions-uniqueEric Eastwood2017-06-011-1/+7
| | | | | | | | Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/31644
* | Merge branch 'dm-discussions-n-plus-1' into 'master'Sean McGivern2017-06-012-0/+15
|\ \ | |/ |/| | | | | | | | | Resolve N+1 query issue with discussions Closes #33013 See merge request !11775
| * Do not try to preload Commits when using Note.includes(:noteable)Douwe Maan2017-05-312-0/+15
| |
* | Merge remote-tracking branch 'upstream/master' into rename-builds-controllerLin Jen-Shin2017-05-315-2/+139
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (116 commits) Revert "Merge branch 'grpc-1.3.4' into 'master'" Return nil when looking up config for unknown LDAP provider Avoid crash when trying to parse string with invalid UTF-8 sequence Enable Gitaly by default in GitLab 9.3 Don’t create comment on JIRA if link already exists Disable sub_group_issuables_spec.rb for mysql Fix math rendering on blob pages Add changelog Don't allow to pass a user to ProjectWiki#http_url_to_repo Revert "Merge branch '1937-https-clone-url-username' into 'master' " Fix bottom padding for build page Fix /unsubscribe slash command creating extra todos Fix omniauth-google-oauth2 dependencies in Gemfile.lock Update looks job log 'New issue'/'New merge request' dropdowns should show only projects with issues/merge requests feature enabled Fix spec for Members::AuthorizedDestroyService 31616-add-uptime-of-gitlab-instance-in-admin-area Set head pipeline when creating merge requests Create a separate helper to check if we show particular tab on a search page Add performance deltas between app deployments on Merge Request widget ...
| * \ Merge branch 'gitaly-opt-out' into 'master'Rémy Coutable2017-05-301-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Enable Gitaly by default in GitLab 9.3 Closes gitaly#242 See merge request !11796
| | * | Enable Gitaly by default in GitLab 9.3Jacob Vosmaer2017-05-301-1/+1
| | | |
| * | | Merge branch 'fix/gb/improve-active-record-test-extensions' into 'master'Rémy Coutable2017-05-301-1/+1
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | Make `ActiveRecord::Migrator` idempotent again in test environment Closes #33030 See merge request !11762
| | * | Make `ActiveRecord::Migrator` idempotent again in test envfix/gb/improve-active-record-test-extensionsGrzegorz Bizon2017-05-291-1/+1
| | | |
| * | | Merge branch '31616-add-uptime-of-gitlab-instance-in-admin-area' into 'master'Rémy Coutable2017-05-301-0/+1
| |\ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | 31616-add-uptime-of-gitlab-instance-in-admin-area Closes #31616 See merge request !11590
| | * | 31616-add-uptime-of-gitlab-instance-in-admin-areajboltz882017-05-291-0/+1
| | | |
| * | | Merge branch 'rework-authorizations-performance' into 'master'Douwe Maan2017-05-291-0/+132
| |\ \ \ | | |_|/ | |/| | | | | | | | | | Rework project authorizations and nested groups for better performance See merge request !10885
| | * | Use CTEs for nested groups and authorizationsYorick Peterse2017-05-171-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces the usage of Common Table Expressions (CTEs) to efficiently retrieve nested group hierarchies, without having to rely on the "routes" table (which is an _incredibly_ inefficient way of getting the data). This requires a patch to ActiveRecord (found in the added initializer) to work properly as ActiveRecord doesn't support WITH statements properly out of the box. Unfortunately MySQL provides no efficient way of getting nested groups. For example, the old routes setup could easily take 5-10 seconds depending on the amount of "routes" in a database. Providing vastly different logic for both MySQL and PostgreSQL will negatively impact the development process. Because of this the various nested groups related methods return empty relations when used in combination with MySQL. For project authorizations the logic is split up into two classes: * Gitlab::ProjectAuthorizations::WithNestedGroups * Gitlab::ProjectAuthorizations::WithoutNestedGroups Both classes get the fresh project authorizations (= as they should be in the "project_authorizations" table), including nested groups if PostgreSQL is used. The logic of these two classes is quite different apart from their public interface. This complicates development a bit, but unfortunately there is no way around this. This commit also introduces Gitlab::GroupHierarchy. This class can be used to get the ancestors and descendants of a base relation, or both by using a UNION. This in turn is used by methods such as: * Namespace#ancestors * Namespace#descendants * User#all_expanded_groups Again this class relies on CTEs and thus only works on PostgreSQL. The Namespace methods will return an empty relation when MySQL is used, while User#all_expanded_groups will return only the groups a user is a direct member of. Performance wise the impact is quite large. For example, on GitLab.com Namespace#descendants used to take around 580 ms to retrieve data for a particular user. Using CTEs we are able to reduce this down to roughly 1 millisecond, returning the exact same data. == On The Fly Refreshing Refreshing of authorizations on the fly (= when users.authorized_projects_populated was not set) is removed with this commit. This simplifies the code, and ensures any queries used for authorizations are not mutated because they are executed in a Rails scope (e.g. Project.visible_to_user). This commit includes a migration to schedule refreshing authorizations for all users, ensuring all of them have their authorizations in place. Said migration schedules users in batches of 5000, with 5 minutes between every batch to smear the load around a bit. == Spec Changes This commit also introduces some changes to various specs. For example, some specs for ProjectTeam assumed that creating a personal project would _not_ lead to the owner having access, which is incorrect. Because we also no longer refresh authorizations on the fly for new users some code had to be added to the "empty_project" factory. This chunk of code ensures that the owner's permissions are refreshed after creating the project, something that is normally done in Projects::CreateService.
| * | | Merge branch 'fix-counter-cache-for-acts-as-taggable' into 'master'Stan Hu2017-05-261-0/+4
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix Counter Cache not being disabled for acts-on-taggable Closes #30582 See merge request !11727
| | * | | Fix Counter Cache not being disabled for acts-on-taggablefix-counter-cache-for-acts-as-taggableKamil Trzcinski2017-05-261-0/+4
| | | |/ | | |/|
* | | | Merge remote-tracking branch 'upstream/master' into rename-builds-controllerLin Jen-Shin2017-05-263-3/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/master: (307 commits) Address feedback Add small update for the i18n guide. update webpack to v2.6.1 patch release to fix "Can't find variable: Promise" error update webpack-bundle-analyzer past v2.4.1 to support NamedChunksPlugin name all webpack chunks to improve long term cacheability add NameAllModulesPlugin to cover shortcomings of NamedModulesPlugin upgrade to latest webpack version Only use DROP INDEX CONCURRENTLY on postgreql 9.2+ Provide default for calculating label text color (!11681) Add failing test for #32728 Bugfix: Always use the default language when generating emails. Remove unecessary commit pattern check Add regexp_for_value helper method Remove shared example and improve sub_group_issuables_spec.rb Remove 'should' from scenario in has_subgroup_title_spec.rb Cartfile git and binary methods cannot take a GitHub repo Fix terminals support for Kubernetes service Add review comments to compare_spec.rb Fix transient error clicking dropdown items in compare_spec.rb Use non-global jQuery reference within raven bundle ...
| * | | Merge branch '32748-emails-are-being-sent-with-the-wrong-language' into 'master'Douwe Maan2017-05-251-0/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bugfix: Always use the default language when generating emails. Closes #32748 See merge request !11662
| | * | | Bugfix: Always use the default language when generating emails.32748-emails-are-being-sent-with-the-wrong-languageRuben Davila2017-05-251-0/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | There was a race condition issue when the application was generating an email and was using a language that was previously being used in other request.
| * | | Merge branch '17848-web-hook-logging' into 'master'Dmitriy Zaporozhets2017-05-251-1/+4
| |\ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | Implement Web Hooks calls logging Closes #17848 See merge request !11027
| | * | Implement web hooks loggingAlexander Randa2017-05-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implemented logging of project and system web hooks * implemented UI for user area (project hooks) * implemented UI for admin area (system hooks) * implemented retry of logged webhook * NOT imeplemented log remover
| * | | Merge branch '31933-improve-rspec-profiling-enabling' into 'master'Stan Hu2017-05-191-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty Closes #31933 See merge request !11543
| | * | | Enable RSpec profiling only if RSPEC_PROFILING_POSTGRES_URL is not empty31933-improve-rspec-profiling-enablingRémy Coutable2017-05-191-1/+1
| | |/ / | | | | | | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
| * | | Run the schedule worker once an hour by defaultzj-increase-accuracy-psZ.J. van de Weg2017-05-181-1/+1
| |/ / | | | | | | | | | [ci skip]
* | | Rename BuildsController to JobsControllerLin Jen-Shin2017-05-171-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | Rename other URL generators admin_builds_path -> admin_jobs_path Fix tests and more renaming Fix more tests Also change build_id to job_id in the controller
* | Don't reuse gRPC channelsJacob Vosmaer2017-05-151-2/+4
|/ | | | | | It seems that bad things happen when two gRPC stubs share one gRPC channel so let's stop doing that. The downside of this is that we create more gRPC connections; one per stub.
* Allow disabling usage ping in `gitlab.yml`Sean McGivern2017-05-111-0/+1
| | | | | | | | | Setting `usage_ping_enabled` to false in `gitlab.yml`: 1. Disables the usage ping, regardless of the value stored in the database. 2. Prevents the usage ping from being enabled through the admin panel. It can only be enabled by either removing the line from `gitlab.yml` and configuring through the admin panel, or setting it to true in `gitlab.yml`.
* Enable the Style/TrailingCommaInArguments copRémy Coutable2017-05-103-5/+5
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Enable the Style/TrailingCommaInLiteral copRémy Coutable2017-05-101-1/+1
| | | | | | Use the EnforcedStyleForMultiline: no_comma option. Signed-off-by: Rémy Coutable <remy@rymai.me>
* Use relative paths for group/project/user avatarsblackst0ne2017-05-101-1/+1
|
* Merge branch 'revert-58d1cd6b' into 'master' Stan Hu2017-05-071-1/+1
|\ | | | | | | | | Revert "Merge branch 'fix-rspec_profiling-establish_connection-string-deprecation' into 'master'" See merge request !11153
| * Revert "Merge branch ↵revert-58d1cd6bStan Hu2017-05-071-1/+1
| | | | | | | | | | 'fix-rspec_profiling-establish_connection-string-deprecation' into 'master'" This reverts merge request !11150
* | Add Pipeline Schedules that supersedes experimental Trigger ScheduleZeger-Jan van de Weg2017-05-071-3/+3
|/
* Cast ENV['RSPEC_PROFILING_POSTGRES_URL'] to symbol in establish_connection ↵fix-rspec_profiling-establish_connection-string-deprecationLuke "Jared" Bennett2017-05-071-1/+1
| | | | call of rspec_profiling.rb
* Use an absolute path for locale path in FastGettext configuse-absolute-path-for-gettext-configRuben Davila2017-05-051-1/+1
| | | | Unicorn was unable to start due to this bad config on Omnibus.
* Merge branch 'mrchrisw-import-shell-timeout'Sean McGivern2017-05-051-0/+1
|\
| * Add configurable timeout for git fetch and clone operationsmrchrisw-import-shell-timeoutChris Wilson2017-04-271-0/+1
| | | | | | | | | | | | | | GitLab uses the import_project method in GitLab Shell, This method uses a timeout for the operation, hardcoded to 800 seconds. With this MR the timeout is now configurable in the gitlab_shell settings.
* | First round of updates from the code review.Ruben Davila2017-05-021-1/+3
| |
* | Merge branch 'master' into 28433-internationalise-cycle-analytics-pageRuben Davila2017-05-024-9/+12
|\ \
| * \ Merge branch 'remove-unused-initializer' into 'master' Douwe Maan2017-05-021-5/+0
| |\ \ | | | | | | | | | | | | | | | | Remove unused initializer See merge request !11036
| | * | Remove unused initializerremove-unused-initializerSean McGivern2017-05-021-5/+0
| | | | | | | | | | | | | | | | We don't appear to have an `active_record_query_trace` dependency any more.
| * | | Update Carrierwave and fog-coreZeger-Jan van de Weg2017-05-011-0/+2
| |/ /
| * | Resolve "rspec_profiling is enabled for MySQL"Rémy Coutable2017-04-281-4/+4
| | |
| * | Merge branch 'test-pg' into 'master' Rémy Coutable2017-04-241-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Test both PostgreSQL and MySQL for the win Closes #2582 See merge request !10156
| | * | Set profiler only for postgresql not mysqlLin Jen-Shin2017-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | Feedback: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/10156#note_26812609
| * | | Make location of gitlab_workhorse_secret configurableJakub Jirutka2017-04-191-0/+6
| | |/ | |/| | | | | | | | | | | | | Hard-coding location of configuration files is very bad practice. This patch applies the same approach as currently used for gitlab_shell_secret file.
* | | Fix Rubocop complains.Ruben Davila2017-05-021-1/+0
| | |