diff options
28 files changed, 179 insertions, 592 deletions
@@ -13,7 +13,7 @@ gem 'bundler-checksum', '~> 0.1.0', path: 'vendor/gems/bundler-checksum', requir # NOTE: When incrementing the major or minor version here, also increment activerecord_version # in vendor/gems/attr_encrypted/attr_encrypted.gemspec until we resolve # https://gitlab.com/gitlab-org/gitlab/-/issues/375713 -gem 'rails', '~> 7.0.4.3' +gem 'rails', '~> 7.0.5' gem 'bootsnap', '~> 1.16.0', require: false diff --git a/Gemfile.checksum b/Gemfile.checksum index b9e5384f30a..c3a99c8782c 100644 --- a/Gemfile.checksum +++ b/Gemfile.checksum @@ -2,18 +2,18 @@ {"name":"CFPropertyList","version":"3.0.5","platform":"ruby","checksum":"a78551cd4768d78ebca98488c27e33652ef818be64697a54676d34e6434674a4"}, {"name":"RedCloth","version":"4.3.2","platform":"ruby","checksum":"1ee7bc55c8dcec92cf7741a2132a9a6cd19e4b884fbc1b3aca23e1a4fcd92d55"}, {"name":"acme-client","version":"2.0.11","platform":"ruby","checksum":"edf6da9f3c5dbe3ab0c6738eb3b97978b7a60e3500445480d2a72fcc610089de"}, -{"name":"actioncable","version":"7.0.4.3","platform":"ruby","checksum":"aa70062c2f2c55cc64fc6aa233223c37c7bc7f1cdbc1a5200cfa2ae4a18934f8"}, -{"name":"actionmailbox","version":"7.0.4.3","platform":"ruby","checksum":"bca54fd1779f9851a6391d4ecc0bc7cb1c3b5249ba93b38755f5b34856061438"}, -{"name":"actionmailer","version":"7.0.4.3","platform":"ruby","checksum":"7e4c382c589997a25253c61d1e5978cb81dbf1978ad35a557580167f7a504f84"}, -{"name":"actionpack","version":"7.0.4.3","platform":"ruby","checksum":"adf30cb429332085b25509ec17541d9108468cb3246eae8f4e0bb0e9268660b1"}, -{"name":"actiontext","version":"7.0.4.3","platform":"ruby","checksum":"8f21e30c0eec9ce9c9277388efd836b53a3955e4756efd226e4b8c644960065f"}, -{"name":"actionview","version":"7.0.4.3","platform":"ruby","checksum":"df24eeab4db187c791218039e1c3ccbf84e765b7887fdb08628bb98ff51120c1"}, -{"name":"activejob","version":"7.0.4.3","platform":"ruby","checksum":"7c74f0fb4e7a8abfbc91a9375c4da4d988c08918c78d5e2d77b44f8aa4e3aa23"}, -{"name":"activemodel","version":"7.0.4.3","platform":"ruby","checksum":"3b511cfc2f37fca76eb25ba191d302f6dd5afd12ef80fb897b1f99d55ed7b07a"}, -{"name":"activerecord","version":"7.0.4.3","platform":"ruby","checksum":"bb91f8c1ce5de7008d6190a50d899e9117b0b638df44b298246be92f224a8b07"}, +{"name":"actioncable","version":"7.0.5","platform":"ruby","checksum":"f2d15f6845b7e929961723e0e62555c3c4585fc7d24f0b1ebadc246296e62c00"}, +{"name":"actionmailbox","version":"7.0.5","platform":"ruby","checksum":"91d57e6e3fac581014b51777daa68875fa42e72039a14489c2c846397c072935"}, +{"name":"actionmailer","version":"7.0.5","platform":"ruby","checksum":"2527c2fdb8358a48f98629a1544e2f01eb21f1c5555d772fa21be0056940690c"}, +{"name":"actionpack","version":"7.0.5","platform":"ruby","checksum":"1c129019b3c59b799f5946c9dfde1f8f47f1a60985d86fa4a0fc4c837f3ce170"}, +{"name":"actiontext","version":"7.0.5","platform":"ruby","checksum":"81e59a7b5f05ce45c0b341ea378aebed6ef49d55d1090c0f24f419bc2094972d"}, +{"name":"actionview","version":"7.0.5","platform":"ruby","checksum":"4221e2381cf5eff9637f3466bc112ab0171c18f0b7a833b73c3c8d4155db1dfc"}, +{"name":"activejob","version":"7.0.5","platform":"ruby","checksum":"fb988160c19b1f7606908e664bacbd72c70ada2704c3e5c4441e3dba4fecfaa1"}, +{"name":"activemodel","version":"7.0.5","platform":"ruby","checksum":"510bcf2033f463cc59c310c3972bd475fda31acab6dfcfb469824a437b984b32"}, +{"name":"activerecord","version":"7.0.5","platform":"ruby","checksum":"542e800fe3ade7cec04d979f7ac47b9a546dc3788e89122bb4918602c65fa013"}, {"name":"activerecord-explain-analyze","version":"0.1.0","platform":"ruby","checksum":"5debb11fe23f35b91953a80677d80ba9284ee737fd9d148c1d7603ce45217f7b"}, -{"name":"activestorage","version":"7.0.4.3","platform":"ruby","checksum":"9930c676ffc4d193a44efe696346e7b3eb344ff4d898878d9ed7ccde6757f8ca"}, -{"name":"activesupport","version":"7.0.4.3","platform":"ruby","checksum":"571ed0fac8510f1fc8a1d66aa070d07ea269913bf9ef50960a8044536358a096"}, +{"name":"activestorage","version":"7.0.5","platform":"ruby","checksum":"281375a68b0ddcccc2b5fc8982e6fa524d885f92c6a7395f56adce3cba19e255"}, +{"name":"activesupport","version":"7.0.5","platform":"ruby","checksum":"d58f62bf992ffe1c0efdaedc6edf1a94fdd3cfcecbca80098de587514c2cf3b0"}, {"name":"acts-as-taggable-on","version":"9.0.0","platform":"ruby","checksum":"5a409be0eae125b7b02c1a7316264b40d4a583584a13d4ea4a6d82acdb351b86"}, {"name":"addressable","version":"2.8.1","platform":"ruby","checksum":"bc724a176ef02118c8a3ed6b5c04c39cf59209607ffcce77b91d0261dbadedfa"}, {"name":"aes_key_wrap","version":"1.1.0","platform":"ruby","checksum":"b935f4756b37375895db45669e79dfcdc0f7901e12d4e08974d5540c8e0776a5"}, @@ -480,12 +480,12 @@ {"name":"rack-proxy","version":"0.7.6","platform":"ruby","checksum":"8704c5009bb60eb16dacf4bcc5e067a8484e668321e8443534bb58ded320c2a8"}, {"name":"rack-test","version":"2.1.0","platform":"ruby","checksum":"0c61fc61904049d691922ea4bb99e28004ed3f43aa5cfd495024cc345f125dfb"}, {"name":"rack-timeout","version":"0.6.3","platform":"ruby","checksum":"1754892eacc124d405e7f1145731ec9b7421ebd1bee5d51ddc18b72c204d0ab3"}, -{"name":"rails","version":"7.0.4.3","platform":"ruby","checksum":"5b675b237abb7328020002d06cc6c9003a09cde4b4774f989bfa440c6e93e2ed"}, +{"name":"rails","version":"7.0.5","platform":"ruby","checksum":"57ef2baa4a1f5f954bc6e5a019b1fac8486ece36f79c1cf366e6de33210637fe"}, {"name":"rails-controller-testing","version":"1.0.5","platform":"ruby","checksum":"741448db59366073e86fc965ba403f881c636b79a2c39a48d0486f2607182e94"}, {"name":"rails-dom-testing","version":"2.0.3","platform":"ruby","checksum":"b140c4f39f6e609c8113137b9a60dfc2ecb89864e496f87f23a68b3b8f12d8d1"}, {"name":"rails-html-sanitizer","version":"1.5.0","platform":"ruby","checksum":"bf326075e8a968cd882c30b15a4c9100059be3af2356093dc68324ec3bd9ea79"}, {"name":"rails-i18n","version":"7.0.3","platform":"ruby","checksum":"e3158e98c5332d129fd5131f171ac575eb30dbb8919b21595382b08850cf2bd3"}, -{"name":"railties","version":"7.0.4.3","platform":"ruby","checksum":"98cb3dd00bedf8857810c806933cf28ff0f3a94304f2be25b4ae4ea0c38ad770"}, +{"name":"railties","version":"7.0.5","platform":"ruby","checksum":"dcf38098623cf03e7d99fee50954a0f664307b0358cc00ad5c6759094067c34e"}, {"name":"rainbow","version":"3.1.1","platform":"ruby","checksum":"039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a"}, {"name":"rake","version":"13.0.6","platform":"ruby","checksum":"5ce4bf5037b4196c24ac62834d8db1ce175470391026bd9e557d669beeb19097"}, {"name":"rb-fsevent","version":"0.11.2","platform":"ruby","checksum":"43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe"}, diff --git a/Gemfile.lock b/Gemfile.lock index 5c3e5e63e04..8844732d35e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -105,70 +105,70 @@ GEM acme-client (2.0.11) faraday (>= 1.0, < 3.0.0) faraday-retry (~> 1.0) - actioncable (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + actioncable (7.0.5) + actionpack (= 7.0.5) + activesupport (= 7.0.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailbox (7.0.5) + actionpack (= 7.0.5) + activejob (= 7.0.5) + activerecord (= 7.0.5) + activestorage (= 7.0.5) + activesupport (= 7.0.5) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.3) - actionpack (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailer (7.0.5) + actionpack (= 7.0.5) + actionview (= 7.0.5) + activejob (= 7.0.5) + activesupport (= 7.0.5) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.3) - actionview (= 7.0.4.3) - activesupport (= 7.0.4.3) - rack (~> 2.0, >= 2.2.0) + actionpack (7.0.5) + actionview (= 7.0.5) + activesupport (= 7.0.5) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.3) - actionpack (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actiontext (7.0.5) + actionpack (= 7.0.5) + activerecord (= 7.0.5) + activestorage (= 7.0.5) + activesupport (= 7.0.5) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.0.5) + activesupport (= 7.0.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.4.3) - activesupport (= 7.0.4.3) + activejob (7.0.5) + activesupport (= 7.0.5) globalid (>= 0.3.6) - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) - activerecord (7.0.4.3) - activemodel (= 7.0.4.3) - activesupport (= 7.0.4.3) + activemodel (7.0.5) + activesupport (= 7.0.5) + activerecord (7.0.5) + activemodel (= 7.0.5) + activesupport (= 7.0.5) activerecord-explain-analyze (0.1.0) activerecord (>= 4) pg - activestorage (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activesupport (= 7.0.4.3) + activestorage (7.0.5) + actionpack (= 7.0.5) + activejob (= 7.0.5) + activerecord (= 7.0.5) + activesupport (= 7.0.5) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.3) + activesupport (7.0.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -1210,20 +1210,20 @@ GEM rack-test (2.1.0) rack (>= 1.3) rack-timeout (0.6.3) - rails (7.0.4.3) - actioncable (= 7.0.4.3) - actionmailbox (= 7.0.4.3) - actionmailer (= 7.0.4.3) - actionpack (= 7.0.4.3) - actiontext (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activemodel (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rails (7.0.5) + actioncable (= 7.0.5) + actionmailbox (= 7.0.5) + actionmailer (= 7.0.5) + actionpack (= 7.0.5) + actiontext (= 7.0.5) + actionview (= 7.0.5) + activejob (= 7.0.5) + activemodel (= 7.0.5) + activerecord (= 7.0.5) + activestorage (= 7.0.5) + activesupport (= 7.0.5) bundler (>= 1.15.0) - railties (= 7.0.4.3) + railties (= 7.0.5) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -1236,9 +1236,9 @@ GEM rails-i18n (7.0.3) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + railties (7.0.5) + actionpack (= 7.0.5) + activesupport (= 7.0.5) method_source rake (>= 12.2) thor (~> 1.0) @@ -1903,7 +1903,7 @@ DEPENDENCIES rack-oauth2 (~> 1.21.3) rack-proxy (~> 0.7.6) rack-timeout (~> 0.6.3) - rails (~> 7.0.4.3) + rails (~> 7.0.5) rails-controller-testing rails-i18n (~> 7.0) rainbow (~> 3.0) diff --git a/config/initializers/action_cable.rb b/config/initializers/action_cable.rb index 3f9ceb7cfa7..0d2073586be 100644 --- a/config/initializers/action_cable.rb +++ b/config/initializers/action_cable.rb @@ -10,7 +10,6 @@ Rails.application.configure do end ActionCable::SubscriptionAdapter::Base.prepend(Gitlab::Patch::ActionCableSubscriptionAdapterIdentifier) -ActionCable::SubscriptionAdapter::Redis::Listener.prepend(Gitlab::Patch::ActionCableRedisListener) # https://github.com/rails/rails/blob/bb5ac1623e8de08c1b7b62b1368758f0d3bb6379/actioncable/lib/action_cable/subscription_adapter/redis.rb#L18 ActionCable::SubscriptionAdapter::Redis.redis_connector = lambda do |config| diff --git a/config/initializers/action_dispatch_journey_router.rb b/config/initializers/action_dispatch_journey_router.rb index a43fb1a38df..14f5ee367a6 100644 --- a/config/initializers/action_dispatch_journey_router.rb +++ b/config/initializers/action_dispatch_journey_router.rb @@ -5,8 +5,8 @@ module ActionDispatch class Router private - # Besides the patche, this method is a duplicate for the original method defined in Rails: - # https://github.com/rails/rails/blob/v7.0.4.2/actionpack/lib/action_dispatch/journey/router.rb#L109-L132 + # Besides the patch, this method is a duplicate for the original method defined in Rails: + # https://github.com/rails/rails/blob/v7.0.5/actionpack/lib/action_dispatch/journey/router.rb#L109-L132 # See https://github.com/rails/rails/issues/47244 def find_routes(req) path_info = req.path_info diff --git a/config/initializers/active_record_preloader.rb b/config/initializers/active_record_preloader.rb index 33c73c2eb3d..6443ce66b51 100644 --- a/config/initializers/active_record_preloader.rb +++ b/config/initializers/active_record_preloader.rb @@ -31,14 +31,14 @@ module ActiveRecord end module NonActiveRecordPreloader - # https://github.com/rails/rails/blob/v7.0.4.2/activerecord/lib/active_record/associations/preloader/association.rb#L114-L116 + # https://github.com/rails/rails/blob/v7.0.5/activerecord/lib/active_record/associations/preloader/association.rb#L114-L116 def run? return true unless klass < ActiveRecord::Base super end - # https://github.com/rails/rails/blob/v7.0.4.2/activerecord/lib/active_record/associations/preloader/association.rb#L137-L141 + # https://github.com/rails/rails/blob/v7.0.5/activerecord/lib/active_record/associations/preloader/association.rb#L137-L141 def preloaded_records return [] unless klass < ActiveRecord::Base @@ -51,7 +51,7 @@ module ActiveRecord class Branch module NonActiveRecordPreloader - # https://github.com/rails/rails/blob/v7.0.4.2/activerecord/lib/active_record/associations/preloader/branch.rb#L37-L45 + # https://github.com/rails/rails/blob/v7.0.5/activerecord/lib/active_record/associations/preloader/branch.rb#L37-L45 def target_classes super.delete_if { |klass| !(klass < ActiveRecord::Base) } end diff --git a/config/initializers/activerecord_postgresql_timestamp_with_timezone_patches.rb b/config/initializers/activerecord_postgresql_timestamp_with_timezone_patches.rb deleted file mode 100644 index f3fd276a191..00000000000 --- a/config/initializers/activerecord_postgresql_timestamp_with_timezone_patches.rb +++ /dev/null @@ -1,40 +0,0 @@ -# frozen_string_literal: true - -# Monkey patch to fix errors like `undefined method 'getutc' for Date' seen -# during Rails 7 upgrade: -# -# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/90907#note_1253684870 and -# https://github.com/rails/rails/issues/46341#issuecomment-1406391573 - -if Rails.gem_version >= Gem::Version.new('7.0.5') - raise "Remove `#{__FILE__}`. This is backport of https://github.com/rails/rails/pull/46365" -end - -module ActiveRecord - module ConnectionAdapters - module PostgreSQL - module OID # :nodoc: - class TimestampWithTimeZone < DateTime # :nodoc: - def type - real_type_unless_aliased(:timestamptz) - end - - def cast_value(value) - return if value.blank? - - time = super - return time unless time.acts_like?(:time) - - # While in UTC mode, the PG gem may not return times back in "UTC" even if they were provided to - # Postgres in UTC. We prefer times always in UTC, so here we convert back. - if is_utc? - time.getutc - else - time.getlocal - end - end - end - end - end - end -end diff --git a/db/docs/verification_codes.yml b/db/docs/verification_codes.yml index 0e91ac8e2c4..b34818070b1 100644 --- a/db/docs/verification_codes.yml +++ b/db/docs/verification_codes.yml @@ -1,7 +1,7 @@ --- table_name: verification_codes classes: -- +- feature_categories: - jihu description: Used by the JiHu edition for user verification diff --git a/db/migrate/20230621065943_add_elasticsearch_requeue_workers_to_application_settings.rb b/db/migrate/20230621065943_add_elasticsearch_requeue_workers_to_application_settings.rb new file mode 100644 index 00000000000..2297cc5cdc2 --- /dev/null +++ b/db/migrate/20230621065943_add_elasticsearch_requeue_workers_to_application_settings.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class AddElasticsearchRequeueWorkersToApplicationSettings < Gitlab::Database::Migration[2.1] + def change + add_column :application_settings, :elasticsearch_requeue_workers, :boolean, null: false, default: false + end +end diff --git a/db/migrate/20230621070810_update_requeue_workers_in_application_settings_for_gitlab_com.rb b/db/migrate/20230621070810_update_requeue_workers_in_application_settings_for_gitlab_com.rb new file mode 100644 index 00000000000..9ed9af71066 --- /dev/null +++ b/db/migrate/20230621070810_update_requeue_workers_in_application_settings_for_gitlab_com.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class UpdateRequeueWorkersInApplicationSettingsForGitlabCom < Gitlab::Database::Migration[2.1] + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + return unless Gitlab.com? + + execute 'UPDATE application_settings SET elasticsearch_requeue_workers = true' + end + + def down + return unless Gitlab.com? + + execute 'UPDATE application_settings SET elasticsearch_requeue_workers = false' + end +end diff --git a/db/schema_migrations/20230621065943 b/db/schema_migrations/20230621065943 new file mode 100644 index 00000000000..4c918e07f34 --- /dev/null +++ b/db/schema_migrations/20230621065943 @@ -0,0 +1 @@ +f51d14579ace7c0b843c1371086218770c2c2083fec5d1088a49bf9bd6c6e572
\ No newline at end of file diff --git a/db/schema_migrations/20230621070810 b/db/schema_migrations/20230621070810 new file mode 100644 index 00000000000..e080764583d --- /dev/null +++ b/db/schema_migrations/20230621070810 @@ -0,0 +1 @@ +87393271016f643e4df201322e26f703ce9cf74d2189f0e0e586ff48697f994a
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 5b15098e069..35c119628ce 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -11766,6 +11766,7 @@ CREATE TABLE application_settings ( unconfirmed_users_delete_after_days integer DEFAULT 7 NOT NULL, default_branch_protection_defaults jsonb DEFAULT '{}'::jsonb NOT NULL, gitlab_shell_operation_limit integer DEFAULT 600, + elasticsearch_requeue_workers boolean DEFAULT false NOT NULL, CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)), CONSTRAINT app_settings_container_registry_pre_import_tags_rate_positive CHECK ((container_registry_pre_import_tags_rate >= (0)::numeric)), CONSTRAINT app_settings_dep_proxy_ttl_policies_worker_capacity_positive CHECK ((dependency_proxy_ttl_group_policy_worker_capacity >= 0)), @@ -35081,390 +35082,6 @@ ALTER INDEX p_ci_builds_scheduled_at_idx ATTACH PARTITION partial_index_ci_build ALTER INDEX p_ci_builds_token_encrypted_partition_id_idx ATTACH PARTITION unique_ci_builds_token_encrypted_and_partition_id; -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_issue BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_analytics_cycle_analytics_merge BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_00 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_00 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_01 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_01 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_02 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_02 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_03 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_03 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_04 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_04 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_05 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_05 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_06 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_06 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_07 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_07 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_08 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_08 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_09 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_09 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_10 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_10 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_11 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_11 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_12 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_12 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_13 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_13 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_14 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_14 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_15 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_15 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_16 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_16 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_17 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_17 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_18 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_18 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_19 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_19 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_20 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_20 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_21 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_21 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_22 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_22 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_23 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_23 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_24 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_24 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_25 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_25 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_26 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_26 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_27 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_27 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_28 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_28 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_29 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_29 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_30 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_30 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_31 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_31 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_32 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_32 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_33 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_33 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_34 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_34 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_35 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_35 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_36 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_36 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_37 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_37 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_38 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_38 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_39 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_39 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_40 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_40 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_41 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_41 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_42 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_42 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_43 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_43 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_44 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_44 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_45 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_45 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_46 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_46 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_47 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_47 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_48 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_48 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_49 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_49 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_50 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_50 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_51 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_51 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_52 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_52 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_53 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_53 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_54 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_54 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_55 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_55 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_56 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_56 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_57 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_57 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_58 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_58 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_59 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_59 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_60 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_60 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_61 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_61 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_62 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_62 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_issue_search_data_63 BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.issue_search_data_63 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_00 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_01 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_02 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_03 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_04 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_05 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_06 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_07 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_08 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_09 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_10 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_11 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_12 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_13 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_14 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_15 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_16 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_17 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_18 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_19 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_20 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_21 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_22 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_23 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_24 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_25 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_26 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_27 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_28 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_29 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_30 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_31 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_32 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_33 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_34 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_35 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_36 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_37 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_38 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_39 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_40 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_41 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_42 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_43 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_44 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_45 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_46 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_47 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_48 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_49 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_50 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_51 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_52 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_53 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_54 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_55 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_56 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_57 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_58 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_59 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_60 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_61 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_62 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - -CREATE TRIGGER gitlab_schema_write_trigger_for_product_analytics_events_experi BEFORE INSERT OR DELETE OR UPDATE OR TRUNCATE ON gitlab_partitions_static.product_analytics_events_experimental_63 FOR EACH STATEMENT EXECUTE FUNCTION gitlab_schema_prevent_write(); - CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); CREATE TRIGGER ci_builds_loose_fk_trigger AFTER DELETE ON ci_builds REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); diff --git a/doc/api/deployments.md b/doc/api/deployments.md index e937a234b08..4621312d1aa 100644 --- a/doc/api/deployments.md +++ b/doc/api/deployments.md @@ -7,6 +7,8 @@ type: concepts, howto # Deployments API **(FREE)** +> Support for [GitLab CI/CD job token](../ci/jobs/ci_job_token.md) authentication [introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/414549) in GitLab 16.2. + ## List project deployments Get a list of deployments in a project. diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md index fed0e553a9e..227b52c276e 100644 --- a/doc/api/pipelines.md +++ b/doc/api/pipelines.md @@ -308,7 +308,7 @@ GET /projects/:id/pipelines/latest | `ref` | string | no | The branch or tag to check for the latest pipeline. Defaults to the default branch when not specified. | ```shell -curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/latest" +curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/latest" ``` Example of response diff --git a/doc/api/settings.md b/doc/api/settings.md index 29e79580d23..0c320b1bd82 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -372,6 +372,7 @@ listed in the descriptions of the relevant settings. | `elasticsearch_indexed_field_length_limit` **(PREMIUM)** | integer | no | Maximum size of text fields to index by Elasticsearch. 0 value means no limit. This does not apply to repository and wiki indexing. | | `elasticsearch_indexed_file_size_limit_kb` **(PREMIUM)** | integer | no | Maximum size of repository and wiki files that are indexed by Elasticsearch. | | `elasticsearch_indexing` **(PREMIUM)** | boolean | no | Enable Elasticsearch indexing. | +| `elasticsearch_requeue_workers` **(PREMIUM)** | boolean | no | Enable automatic requeuing of indexing workers. This improves non-code indexing throughput by enqueuing Sidekiq jobs until all documents are processed. | | `elasticsearch_limit_indexing` **(PREMIUM)** | boolean | no | Limit Elasticsearch to index certain namespaces and projects. | | `elasticsearch_max_bulk_concurrency` **(PREMIUM)** | integer | no | Maximum concurrency of Elasticsearch bulk requests per indexing operation. This only applies to repository indexing operations. | | `elasticsearch_max_bulk_size_mb` **(PREMIUM)** | integer | no | Maximum size of Elasticsearch bulk indexing requests in MB. This only applies to repository indexing operations. | diff --git a/doc/ci/jobs/ci_job_token.md b/doc/ci/jobs/ci_job_token.md index a60aaa04ea1..a67cd2de4e8 100644 --- a/doc/ci/jobs/ci_job_token.md +++ b/doc/ci/jobs/ci_job_token.md @@ -24,6 +24,7 @@ You can use a GitLab CI/CD job token to authenticate with specific API endpoints to [trigger a multi-project pipeline](../pipelines/downstream_pipelines.md#trigger-a-multi-project-pipeline-by-using-the-api). - [Releases](../../api/releases/index.md) and [Release links](../../api/releases/links.md). - [Terraform plan](../../user/infrastructure/index.md). +- [Deployments](../../api/deployments.md). The token has the same permissions to access the API as the user that caused the job to run. A user can cause a job to run by taking action like pushing a commit, diff --git a/lib/api/deployments.rb b/lib/api/deployments.rb index 3a0eea677b8..48281ec1639 100644 --- a/lib/api/deployments.rb +++ b/lib/api/deployments.rb @@ -68,6 +68,7 @@ module API desc: 'The status to filter deployments by. One of `created`, `running`, `success`, `failed`, `canceled`, or `blocked`' end + route_setting :authentication, job_token_allowed: true get ':id/deployments' do authorize! :read_deployment, user_project @@ -92,6 +93,7 @@ module API params do requires :deployment_id, type: Integer, desc: 'The ID of the deployment' end + route_setting :authentication, job_token_allowed: true get ':id/deployments/:deployment_id' do authorize! :read_deployment, user_project @@ -132,6 +134,7 @@ module API desc: 'The status to filter deployments by. One of `running`, `success`, `failed`, or `canceled`', values: %w[running success failed canceled] end + route_setting :authentication, job_token_allowed: true post ':id/deployments' do authorize!(:create_deployment, user_project) authorize!(:create_environment, user_project) @@ -175,6 +178,7 @@ module API desc: 'The new status of the deployment. One of `running`, `success`, `failed`, or `canceled`', values: %w[running success failed canceled] end + route_setting :authentication, job_token_allowed: true put ':id/deployments/:deployment_id' do authorize!(:read_deployment, user_project) @@ -207,6 +211,7 @@ module API params do requires :deployment_id, type: Integer, desc: 'The ID of the deployment' end + route_setting :authentication, job_token_allowed: true delete ':id/deployments/:deployment_id' do deployment = user_project.deployments.find(params[:deployment_id]) @@ -240,7 +245,7 @@ module API use :merge_requests_base_params end - + route_setting :authentication, job_token_allowed: true get ':id/deployments/:deployment_id/merge_requests' do authorize! :read_deployment, user_project diff --git a/lib/gitlab/patch/action_cable_redis_listener.rb b/lib/gitlab/patch/action_cable_redis_listener.rb deleted file mode 100644 index b21bee45991..00000000000 --- a/lib/gitlab/patch/action_cable_redis_listener.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Modifies https://github.com/rails/rails/blob/v6.1.4.6/actioncable/lib/action_cable/subscription_adapter/redis.rb -# so that it is resilient to Redis connection errors. -# See https://github.com/rails/rails/issues/27659. - -# rubocop:disable Gitlab/ModuleWithInstanceVariables -module Gitlab - module Patch - module ActionCableRedisListener - private - - def ensure_listener_running - @thread ||= Thread.new do - Thread.current.abort_on_exception = true - - conn = @adapter.redis_connection_for_subscriptions - listen conn - rescue ::Redis::BaseConnectionError - @thread = @raw_client = nil - ::ActionCable.server.restart - end - end - end - end -end diff --git a/lib/gitlab/utils/usage_data.rb b/lib/gitlab/utils/usage_data.rb index 4106084b301..1e482901929 100644 --- a/lib/gitlab/utils/usage_data.rb +++ b/lib/gitlab/utils/usage_data.rb @@ -240,7 +240,7 @@ module Gitlab yield.merge(key => Time.current) end - # @param event_name [String] the event name + # @param event_name [String, Symbol] the event name # @param values [Array|String] the values counted def track_usage_event(event_name, values) Gitlab::UsageDataCounters::HLLRedisCounter.track_event(event_name.to_s, values: values) diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 559f989d4c9..ba7595da236 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -3402,6 +3402,9 @@ msgstr "" msgid "AdminSettings|Import sources" msgstr "" +msgid "AdminSettings|Improve non-code indexing throughput by enqueuing Sidekiq jobs until all documents are processed." +msgstr "" + msgid "AdminSettings|Inactive project deletion" msgstr "" @@ -3501,6 +3504,9 @@ msgstr "" msgid "AdminSettings|Registration Features include:" msgstr "" +msgid "AdminSettings|Requeue indexing workers" +msgstr "" + msgid "AdminSettings|Require users to prove ownership of custom domains" msgstr "" @@ -3615,6 +3621,9 @@ msgstr "" msgid "AdminSettings|Use AWS OpenSearch Service with IAM credentials" msgstr "" +msgid "AdminSettings|Use for cluster and index migrations. When indexing is paused, GitLab still tracks changes." +msgstr "" + msgid "AdminSettings|Used to connect Jitsu to the Clickhouse instance." msgstr "" @@ -3627,9 +3636,6 @@ msgstr "" msgid "AdminSettings|Users and groups must accept the invitation before they're added to a group or project." msgstr "" -msgid "AdminSettings|When paused, GitLab still tracks the changes. This is useful for cluster/index migrations." -msgstr "" - msgid "AdminSettings|When to delete inactive projects" msgstr "" diff --git a/package.json b/package.json index de381009559..76f3bf4aefd 100644 --- a/package.json +++ b/package.json @@ -62,8 +62,8 @@ "@gitlab/web-ide": "0.0.1-dev-20230620122149", "@mattiasbuelens/web-streams-adapter": "^0.1.0", "@popperjs/core": "^2.11.2", - "@rails/actioncable": "7.0.4-3", - "@rails/ujs": "7.0.4-3", + "@rails/actioncable": "7.0.5", + "@rails/ujs": "7.0.5", "@snowplow/browser-plugin-client-hints": "^3.9.0", "@snowplow/browser-plugin-form-tracking": "^3.9.0", "@snowplow/browser-plugin-ga-cookies": "^3.9.0", diff --git a/patches/@rails+ujs+7.0.4-3.patch b/patches/@rails+ujs+7.0.5.patch index 65a4eb029b8..65a4eb029b8 100644 --- a/patches/@rails+ujs+7.0.4-3.patch +++ b/patches/@rails+ujs+7.0.5.patch diff --git a/spec/features/file_uploads/multipart_invalid_uploads_spec.rb b/spec/features/file_uploads/multipart_invalid_uploads_spec.rb index c4c5eb6b74b..aeb8fd11170 100644 --- a/spec/features/file_uploads/multipart_invalid_uploads_spec.rb +++ b/spec/features/file_uploads/multipart_invalid_uploads_spec.rb @@ -44,7 +44,7 @@ RSpec.describe 'Invalid uploads that must be rejected', :api, :js, feature_categ # These keys are rejected directly by rack itself. # The request will not be received by multipart.rb (can't use the 'handling file uploads' shared example) - it_behaves_like 'rejecting invalid keys', key_name: 'x' * 11000, message: 'Puma caught this error: exceeded available parameter key space (Rack::QueryParser::ParamsTooDeepError)' + it_behaves_like 'rejecting invalid keys', key_name: 'x' * 11000, status: 400, message: 'Bad Request' it_behaves_like 'rejecting invalid keys', key_name: 'package[]test', status: 400, message: 'Bad Request' it_behaves_like 'handling file uploads', 'by rejecting uploads with an invalid key' diff --git a/spec/initializers/activerecord_postgresql_timestamp_with_timezone_patches_spec.rb b/spec/initializers/activerecord_postgresql_timestamp_with_timezone_patches_spec.rb deleted file mode 100644 index 8ad73a0b890..00000000000 --- a/spec/initializers/activerecord_postgresql_timestamp_with_timezone_patches_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -# A missing test to provide full coverage for the patch -RSpec.describe 'ActiveRecord PostgreSQL Timespamp With Timezone', feature_category: :database do - before do - load Rails.root.join('config/initializers/activerecord_postgresql_timestamp_with_timezone_patches.rb') - end - - describe '#cast_value' do - it 'returns local time' do - timestamp = ActiveRecord::ConnectionAdapters::PostgreSQL::OID::TimestampWithTimeZone.new - - allow(ActiveRecord).to receive(:default_timezone).and_return(:local) - - expect(timestamp.cast_value(DateTime.now)).not_to be_utc - end - end -end diff --git a/spec/lib/gitlab/patch/action_cable_redis_listener_spec.rb b/spec/lib/gitlab/patch/action_cable_redis_listener_spec.rb deleted file mode 100644 index 14f556ff348..00000000000 --- a/spec/lib/gitlab/patch/action_cable_redis_listener_spec.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Gitlab::Patch::ActionCableRedisListener do - let(:adapter) { instance_double('ActionCable::SubscriptionAdapter::Redis') } - let(:connection) { instance_double('Redis') } - let(:listener) { ActionCable::SubscriptionAdapter::Redis::Listener.new(adapter, nil) } - - before do - allow(Thread).to receive(:new).and_yield - allow(adapter).to receive(:redis_connection_for_subscriptions).and_return(connection) - end - - it 'catches Redis connection errors and restarts Action Cable' do - expect(connection).to receive(:without_reconnect).and_raise Redis::ConnectionError - expect(ActionCable).to receive_message_chain(:server, :restart) - - expect { listener.add_channel('test_channel', nil) }.not_to raise_error - end - - it 're-raises other exceptions' do - expect(connection).to receive(:without_reconnect).and_raise StandardError - expect(ActionCable).not_to receive(:server) - - expect { listener.add_channel('test_channel', nil) }.to raise_error(StandardError) - end -end diff --git a/spec/migrations/20230621070810_update_requeue_workers_in_application_settings_for_gitlab_com_spec.rb b/spec/migrations/20230621070810_update_requeue_workers_in_application_settings_for_gitlab_com_spec.rb new file mode 100644 index 00000000000..763d9ea610c --- /dev/null +++ b/spec/migrations/20230621070810_update_requeue_workers_in_application_settings_for_gitlab_com_spec.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true + +require 'spec_helper' +require_migration! + +RSpec.describe UpdateRequeueWorkersInApplicationSettingsForGitlabCom, feature_category: :global_search do + let(:settings) { table(:application_settings) } + + describe "#up" do + it 'does nothing' do + record = settings.create! + + expect { migrate! }.not_to change { record.reload.elasticsearch_requeue_workers } + end + + it 'updates elasticsearch_requeue_workers when gitlab.com' do + allow(Gitlab).to receive(:com?).and_return(true) + + record = settings.create! + + expect { migrate! }.to change { record.reload.elasticsearch_requeue_workers }.from(false).to(true) + end + end + + describe "#down" do + it 'does nothing' do + record = settings.create!(elasticsearch_requeue_workers: true) + + migrate! + + expect { schema_migrate_down! }.not_to change { record.reload.elasticsearch_requeue_workers } + end + + it 'updates elasticsearch_requeue_workers when gitlab.com' do + allow(Gitlab).to receive(:com?).and_return(true) + + record = settings.create!(elasticsearch_requeue_workers: true) + + migrate! + + expect { schema_migrate_down! }.to change { record.reload.elasticsearch_requeue_workers }.from(true).to(false) + end + end +end diff --git a/yarn.lock b/yarn.lock index 2763ff96f83..9ce8fe3ccbe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1705,15 +1705,15 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.5.tgz#db5a11bf66bdab39569719555b0f76e138d7bd64" integrity sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw== -"@rails/actioncable@7.0.4-3": - version "7.0.4-3" - resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-7.0.4-3.tgz#f352f9b481294e135818275688ae0331f9bf3b31" - integrity sha512-sqf+G/8UfoFbA8n0FwJ1Ysl5lnwRnhluWpJW50ERYAIEqeNmeADIs9J1de6S4Wp7KwmyavwzT3OSgMd9rwZ6lw== - -"@rails/ujs@7.0.4-3": - version "7.0.4-3" - resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.0.4-3.tgz#a90a31189db702ac7a9e95b18c09503025fb4951" - integrity sha512-JttmF98C1xTVcCSWSDwbqF0IPrCKD6lpeB9uy4VjGYniZIidgSq0fSX1vmHxCH7CuSmsIFMNJ6LtLyCAb8Y6Ng== +"@rails/actioncable@7.0.5": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@rails/actioncable/-/actioncable-7.0.5.tgz#bbc11203e0d3d5084002abfcf01d621fdf5f3a9d" + integrity sha512-SOBA2heB9lTw0VYIx8M/ed7inSf4I9sR8OIlJprhgkfQ3WJtrxPJ6DDATR1Z3RYaIR7HlT2Olj08v1lfGIGuHA== + +"@rails/ujs@7.0.5": + version "7.0.5" + resolved "https://registry.yarnpkg.com/@rails/ujs/-/ujs-7.0.5.tgz#d35a71fe6ecd4ab88bbe4bc6c2f287c992c2de4c" + integrity sha512-/wQ6v4DGxhxflPWoLwGkOQoKbtIXx/LsVNKd8shRM+/HXxlVBEb+F5znN99TlxX8e/R3dN6anTPAqA+mfA5YtQ== "@remirror/core-constants@^2.0.0": version "2.0.0" |