gitlab-org--gitlab-foss/spec/lib
Yorick Peterse ac702af822
Fix setting share_with_group_lock
Prior to this commit running
Namespace#force_share_with_group_lock_on_descendants would result in
updating _all_ namespaces in the namespaces table, not just the
descendants. This is the result of ActiveRecord::Relation#update_all not
taking into account the CTE. To work around this we use the CTE query as
a sub-query instead of directly calling #update_all.

To prevent this from happening the relations returned by
Gitlab::GroupHierarchy are now marked as read-only, resulting in an
error being raised when methods such as #update_all are used.

Fortunately on GitLab.com our statement timeouts appear to have
prevented this query from actually doing any damage other than causing
a very large amount of dead tuples.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37916
2017-09-15 17:38:46 +02:00
..
api/helpers Total Pages should be at least one 2017-08-17 21:47:01 +02:00
banzai Remove ImageLazyLoadFilter from EmailPipeline 2017-09-12 11:54:14 -04:00
bitbucket Enable the Layout/SpaceBeforeBlockBraces cop 2017-08-09 11:52:22 +02:00
constraints Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
container_registry Prevent new / renamed project from using a repository path that already exists on disk 2017-08-25 20:06:06 +02:00
gitlab Fix setting share_with_group_lock 2017-09-15 17:38:46 +02:00
json_web_token Enable the Layout/SpaceBeforeBlockBraces cop 2017-08-09 11:52:22 +02:00
mattermost Fix Mattermost integration 2017-08-04 12:22:10 +03:00
microsoft_teams
rspec_flaky Use a new RspecFlakyListener to detect flaky specs 2017-08-11 14:55:10 +02:00
system_check Refactor on namespace and repository checks and added specs 2017-09-12 06:57:22 +02:00
additional_email_headers_interceptor_spec.rb
after_commit_queue_spec.rb Backports EE mirror stuck handling feature (https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2628) to CE 2017-08-17 13:38:05 +01:00
disable_email_interceptor_spec.rb Use described_class when possible 2017-07-27 14:31:53 +02:00
event_filter_spec.rb Migrate events into a new format 2017-08-10 17:45:44 +02:00
expand_variables_spec.rb
extracts_path_spec.rb Enable the Layout/SpaceBeforeBlockBraces cop 2017-08-09 11:52:22 +02:00
feature_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
file_size_validator_spec.rb Whitelist or fix additional Gitlab/PublicSend cop violations 2017-08-14 12:14:11 -04:00
gitlab_spec.rb Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true 2017-07-27 14:31:53 +02:00
repository_cache_spec.rb Change all :empty_project to :project 2017-08-02 17:47:31 -04:00
system_check_spec.rb Use described_class when possible 2017-07-27 14:31:53 +02:00