diff --git a/GITLAB_SHELL_VERSION b/GITLAB_SHELL_VERSION
index 4dff17b159d..6c3bb88f439 100644
--- a/GITLAB_SHELL_VERSION
+++ b/GITLAB_SHELL_VERSION
@@ -1 +1 @@
-14.22.0
+14.23.0
diff --git a/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue b/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue
index e47cc2e3888..330db7ff2ee 100644
--- a/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue
+++ b/app/assets/javascripts/work_items/components/notes/work_item_add_note.vue
@@ -152,8 +152,8 @@ export default {
// eslint-disable-next-line @gitlab/require-i18n-strings
'note note-wrapper note-comment discussion-reply-holder gl-border-t-0! clearfix': !this
.isNewDiscussion,
- 'gl-bg-white! gl-pt-0!': this.isEditing,
- 'gl-bg-orange-50!': this.isInternalThread,
+ 'gl-pt-0! is-replying': this.isEditing,
+ 'internal-note': this.isInternalThread,
};
},
},
diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss
index d029aa01e37..ecdbc171bdc 100644
--- a/app/assets/stylesheets/pages/note_form.scss
+++ b/app/assets/stylesheets/pages/note_form.scss
@@ -257,6 +257,12 @@ table {
&.is-replying {
padding-bottom: $gl-padding;
+ background-color: $white;
+ }
+
+ &.internal-note,
+ &.internal-note.is-replying {
+ background-color: $orange-50;
}
.user-avatar-link {
diff --git a/app/assets/stylesheets/themes/dark_mode_overrides.scss b/app/assets/stylesheets/themes/dark_mode_overrides.scss
index 030e41046d3..e004ca4bb4a 100644
--- a/app/assets/stylesheets/themes/dark_mode_overrides.scss
+++ b/app/assets/stylesheets/themes/dark_mode_overrides.scss
@@ -296,7 +296,8 @@ body.gl-dark {
}
.timeline-entry.internal-note:not(.note-form) .timeline-content,
-.timeline-entry.draft-note:not(.note-form) .timeline-content {
+.timeline-entry.draft-note:not(.note-form) .timeline-content,
+.discussion-reply-holder.internal-note {
// soften on darkmode
background-color: mix($gray-50, $orange-50, 75%) !important;
}
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index ebb8d9a7c53..bcd48ad6d80 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -30,6 +30,8 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
# Extend the standard implementation to also increment
# the number of failed sign in attempts
def failure
+ update_login_counter_metric(failed_strategy.name, 'failed')
+
if params[:username].present? && AuthHelper.form_based_provider?(failed_strategy.name)
user = User.find_by_login(params[:username])
@@ -79,6 +81,21 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
private
+ def track_event(user, provider, status)
+ log_audit_event(user, with: provider)
+ update_login_counter_metric(provider, status)
+ end
+
+ def update_login_counter_metric(provider, status)
+ omniauth_login_counter.increment(provider: provider, status: status)
+ end
+
+ def omniauth_login_counter
+ @counter ||= Gitlab::Metrics.counter(
+ :gitlab_omniauth_login_total,
+ 'Counter of OmniAuth login attempts')
+ end
+
def log_failed_login(user, provider)
# overridden in EE
end
@@ -99,7 +116,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
if current_user
return render_403 unless link_provider_allowed?(oauth['provider'])
- log_audit_event(current_user, with: oauth['provider'])
+ track_event(current_user, oauth['provider'], 'succeeded')
if Gitlab::CurrentSettings.admin_mode
return admin_mode_flow(auth_module::User) if current_user_mode.admin_mode_requested?
@@ -151,7 +168,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
# from that in `#context_user`. Pushing it manually here makes the information
# available in the logs for this request.
Gitlab::ApplicationContext.push(user: user)
- log_audit_event(user, with: oauth['provider'])
+ track_event(user, oauth['provider'], 'succeeded')
Gitlab::Tracking.event(self.class.name, "#{oauth['provider']}_sso", user: user) if new_user
set_remember_me(user)
diff --git a/app/finders/users_finder.rb b/app/finders/users_finder.rb
index 11e3c341c1f..57dbeca5c51 100644
--- a/app/finders/users_finder.rb
+++ b/app/finders/users_finder.rb
@@ -80,7 +80,15 @@ class UsersFinder
def by_search(users)
return users unless params[:search].present?
- users.search(params[:search], with_private_emails: current_user&.can_admin_all_resources?)
+ if Feature.enabled?(:autocomplete_users_use_search_service)
+ users.search(
+ params[:search],
+ with_private_emails: current_user&.can_admin_all_resources?,
+ use_minimum_char_limit: params[:use_minimum_char_limit]
+ )
+ else
+ users.search(params[:search], with_private_emails: current_user&.can_admin_all_resources?)
+ end
end
def by_blocked(users)
diff --git a/app/graphql/resolvers/timelog_resolver.rb b/app/graphql/resolvers/timelog_resolver.rb
index d2b67451698..4f52db6801d 100644
--- a/app/graphql/resolvers/timelog_resolver.rb
+++ b/app/graphql/resolvers/timelog_resolver.rb
@@ -37,7 +37,7 @@ module Resolvers
argument :sort, Types::TimeTracking::TimelogSortEnum,
description: 'List timelogs in a particular order.',
required: false,
- default_value: { field: 'spent_at', direction: :asc }
+ default_value: :spent_at_asc
def resolve_with_lookahead(**args)
validate_args!(object, args)
@@ -144,10 +144,7 @@ module Resolvers
def apply_sorting(timelogs, args)
return timelogs unless args[:sort]
- field = args[:sort][:field]
- direction = args[:sort][:direction]
-
- timelogs.sort_by_field(field, direction)
+ timelogs.sort_by_field(args[:sort])
end
def raise_argument_error(message)
diff --git a/app/graphql/types/time_tracking/timelog_sort_enum.rb b/app/graphql/types/time_tracking/timelog_sort_enum.rb
index ad21c084d78..40b9e0cfb67 100644
--- a/app/graphql/types/time_tracking/timelog_sort_enum.rb
+++ b/app/graphql/types/time_tracking/timelog_sort_enum.rb
@@ -6,16 +6,10 @@ module Types
graphql_name 'TimelogSort'
description 'Values for sorting timelogs'
- sortable_fields = ['Spent at', 'Time spent']
-
- sortable_fields.each do |field|
- value "#{field.upcase.tr(' ', '_')}_ASC",
- value: { field: field.downcase.tr(' ', '_'), direction: :asc },
- description: "#{field} by ascending order."
- value "#{field.upcase.tr(' ', '_')}_DESC",
- value: { field: field.downcase.tr(' ', '_'), direction: :desc },
- description: "#{field} by descending order."
- end
+ value 'SPENT_AT_ASC', 'Spent at ascending order.', value: :spent_at_asc
+ value 'SPENT_AT_DESC', 'Spent at descending order.', value: :spent_at_desc
+ value 'TIME_SPENT_ASC', 'Time spent ascending order.', value: :time_spent_asc
+ value 'TIME_SPENT_DESC', 'Time spent descending order.', value: :time_spent_desc
end
end
end
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index a1ce4221b19..7f0916ca316 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -359,12 +359,17 @@ module SearchHelper
def users_autocomplete(term, limit = 5)
return [] unless current_user && Ability.allowed?(current_user, :read_users_list)
- is_current_user_admin = current_user.can_admin_all_resources?
+ users = if Feature.enabled?(:autocomplete_users_use_search_service)
+ ::SearchService
+ .new(current_user, { scope: 'users', per_page: limit, search: term })
+ .search_objects
+ else
+ is_current_user_admin = current_user.can_admin_all_resources?
+ scope = is_current_user_admin ? User.all : User.without_forbidden_states
+ scope.search(term, with_private_emails: is_current_user_admin, use_minimum_char_limit: false).limit(limit)
+ end
- scope = is_current_user_admin ? User.all : User.without_forbidden_states
- scope.search(term, with_private_emails: is_current_user_admin, use_minimum_char_limit: false)
- .limit(limit)
- .map do |user|
+ users.map do |user|
{
category: "Users",
id: user.id,
diff --git a/app/models/concerns/analytics/cycle_analytics/stage_event_model.rb b/app/models/concerns/analytics/cycle_analytics/stage_event_model.rb
index c01399184ad..d268c32c088 100644
--- a/app/models/concerns/analytics/cycle_analytics/stage_event_model.rb
+++ b/app/models/concerns/analytics/cycle_analytics/stage_event_model.rb
@@ -5,6 +5,8 @@ module Analytics
extend ActiveSupport::Concern
included do
+ include FromUnion
+
scope :by_stage_event_hash_id, ->(id) { where(stage_event_hash_id: id) }
scope :by_project_id, ->(id) { where(project_id: id) }
scope :by_group_id, ->(id) { where(group_id: id) }
@@ -20,7 +22,7 @@ module Analytics
# start_event_timestamp must be included in the ORDER BY clause for the duration
# calculation to work: SELECT end_event_timestamp - start_event_timestamp
keyset_order(
- :end_event_timestamp => { order_expression: arel_order(arel_table[:end_event_timestamp], direction), distinct: false },
+ :end_event_timestamp => { order_expression: arel_order(arel_table[:end_event_timestamp], direction), distinct: false, nullable: direction == :asc ? :nulls_last : :nulls_first },
issuable_id_column => { order_expression: arel_order(arel_table[issuable_id_column], direction), distinct: true },
:start_event_timestamp => { order_expression: arel_order(arel_table[:start_event_timestamp], direction), distinct: false }
)
diff --git a/app/models/timelog.rb b/app/models/timelog.rb
index dc976816ad9..7f9cc2a99df 100644
--- a/app/models/timelog.rb
+++ b/app/models/timelog.rb
@@ -3,6 +3,7 @@
class Timelog < ApplicationRecord
include Importable
include IgnorableColumns
+ include Sortable
ignore_column :note_id_convert_to_bigint, remove_with: '16.0', remove_after: '2023-05-22'
@@ -45,11 +46,13 @@ class Timelog < ApplicationRecord
issue || merge_request
end
- def self.sort_by_field(field, direction)
- if direction == :asc
- order_scope_asc(field)
- else
- order_scope_desc(field)
+ def self.sort_by_field(field)
+ case field.to_s
+ when 'spent_at_asc' then order_scope_asc(:spent_at)
+ when 'spent_at_desc' then order_scope_desc(:spent_at)
+ when 'time_spent_asc' then order_scope_asc(:time_spent)
+ when 'time_spent_desc' then order_scope_desc(:time_spent)
+ else order_by(field)
end
end
diff --git a/config/feature_flags/development/autocomplete_users_use_search_service.yml b/config/feature_flags/development/autocomplete_users_use_search_service.yml
new file mode 100644
index 00000000000..1fe9b295076
--- /dev/null
+++ b/config/feature_flags/development/autocomplete_users_use_search_service.yml
@@ -0,0 +1,8 @@
+---
+name: autocomplete_users_use_search_service
+introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/122289
+rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/413972
+milestone: '16.1'
+type: development
+group: group::global search
+default_enabled: false
diff --git a/config/initializers/omniauth.rb b/config/initializers/omniauth.rb
index 707e4efe7bf..f76d71da9f3 100644
--- a/config/initializers/omniauth.rb
+++ b/config/initializers/omniauth.rb
@@ -21,3 +21,13 @@ OmniAuth.config.request_validation_phase do |env|
end
OmniAuth.config.logger = Gitlab::AppLogger
+
+omniauth_login_counter =
+ Gitlab::Metrics.counter(
+ :gitlab_omniauth_login_total,
+ 'Counter of initiated OmniAuth login attempts')
+
+OmniAuth.config.before_request_phase do |env|
+ provider = env['omniauth.strategy']&.name
+ omniauth_login_counter.increment(provider: provider, status: :initiated)
+end
diff --git a/config/metrics/counts_28d/20210216180310_project_snippets.yml b/config/metrics/counts_28d/20210216180310_project_snippets.yml
index a91e66d97ad..e7c66f90a3d 100644
--- a/config/metrics/counts_28d/20210216180310_project_snippets.yml
+++ b/config/metrics/counts_28d/20210216180310_project_snippets.yml
@@ -4,7 +4,7 @@ key_path: counts_monthly.project_snippets
description: Monthly count of project Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216180312_snippets.yml b/config/metrics/counts_28d/20210216180312_snippets.yml
index 3f8acf0857f..e9a091c507b 100644
--- a/config/metrics/counts_28d/20210216180312_snippets.yml
+++ b/config/metrics/counts_28d/20210216180312_snippets.yml
@@ -4,7 +4,7 @@ key_path: counts_monthly.snippets
description: Monthly count of All Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216180317_snippets.yml b/config/metrics/counts_28d/20210216180317_snippets.yml
index 0b3cc1b3915..e2f08a5730e 100644
--- a/config/metrics/counts_28d/20210216180317_snippets.yml
+++ b/config/metrics/counts_28d/20210216180317_snippets.yml
@@ -5,7 +5,7 @@ name: count_distinct_author_id_from_snippets
description: Count of distinct author_id from snippets for last 28 days
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216180319_action_monthly_active_users_web_ide_edit.yml b/config/metrics/counts_28d/20210216180319_action_monthly_active_users_web_ide_edit.yml
index e5757e6c0d0..0e8e4741016 100644
--- a/config/metrics/counts_28d/20210216180319_action_monthly_active_users_web_ide_edit.yml
+++ b/config/metrics/counts_28d/20210216180319_action_monthly_active_users_web_ide_edit.yml
@@ -4,7 +4,7 @@ key_path: usage_activity_by_stage_monthly.create.action_monthly_active_users_web
description: Number of users editing using web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: removed
removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/111351
diff --git a/config/metrics/counts_28d/20210216180321_action_monthly_active_users_sfe_edit.yml b/config/metrics/counts_28d/20210216180321_action_monthly_active_users_sfe_edit.yml
index 0716b6f397f..8ee0f7e9fc3 100644
--- a/config/metrics/counts_28d/20210216180321_action_monthly_active_users_sfe_edit.yml
+++ b/config/metrics/counts_28d/20210216180321_action_monthly_active_users_sfe_edit.yml
@@ -4,7 +4,7 @@ key_path: usage_activity_by_stage_monthly.create.action_monthly_active_users_sfe
description: Number of users using single file editor
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: removed
removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113551
diff --git a/config/metrics/counts_28d/20210216180323_action_monthly_active_users_snippet_editor_edit.yml b/config/metrics/counts_28d/20210216180323_action_monthly_active_users_snippet_editor_edit.yml
index 8167e44c015..52a16056ce1 100644
--- a/config/metrics/counts_28d/20210216180323_action_monthly_active_users_snippet_editor_edit.yml
+++ b/config/metrics/counts_28d/20210216180323_action_monthly_active_users_snippet_editor_edit.yml
@@ -4,7 +4,7 @@ key_path: usage_activity_by_stage_monthly.create.action_monthly_active_users_sni
description: Number of users using the snippet editor
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: removed
removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/113551
diff --git a/config/metrics/counts_28d/20210216180327_action_monthly_active_users_ide_edit.yml b/config/metrics/counts_28d/20210216180327_action_monthly_active_users_ide_edit.yml
index 33bb1b12c50..3c7acc92050 100644
--- a/config/metrics/counts_28d/20210216180327_action_monthly_active_users_ide_edit.yml
+++ b/config/metrics/counts_28d/20210216180327_action_monthly_active_users_ide_edit.yml
@@ -4,7 +4,7 @@ key_path: usage_activity_by_stage_monthly.create.action_monthly_active_users_ide
description: Number of unique users per month who edited a file from any web editor
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216180330_g_edit_by_web_ide_monthly.yml b/config/metrics/counts_28d/20210216180330_g_edit_by_web_ide_monthly.yml
index bd147983063..f45d7fcc784 100644
--- a/config/metrics/counts_28d/20210216180330_g_edit_by_web_ide_monthly.yml
+++ b/config/metrics/counts_28d/20210216180330_g_edit_by_web_ide_monthly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.g_edit_by_web_ide_monthly
description: Number of users editing a file from the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216180334_g_edit_by_sfe_monthly.yml b/config/metrics/counts_28d/20210216180334_g_edit_by_sfe_monthly.yml
index fa5b71b3ca3..9c0e63e0d8f 100644
--- a/config/metrics/counts_28d/20210216180334_g_edit_by_sfe_monthly.yml
+++ b/config/metrics/counts_28d/20210216180334_g_edit_by_sfe_monthly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.g_edit_by_sfe_monthly
description: Number of users editing a file from the single file editor
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216180338_g_edit_by_snippet_ide_monthly.yml b/config/metrics/counts_28d/20210216180338_g_edit_by_snippet_ide_monthly.yml
index f1faa6a45b8..8074329bd9d 100644
--- a/config/metrics/counts_28d/20210216180338_g_edit_by_snippet_ide_monthly.yml
+++ b/config/metrics/counts_28d/20210216180338_g_edit_by_snippet_ide_monthly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.g_edit_by_snippet_ide_monthly
description: Count of monthly edits to a snippet
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216180341_ide_edit_total_unique_counts_monthly.yml b/config/metrics/counts_28d/20210216180341_ide_edit_total_unique_counts_monthly.yml
index 163821c571b..2e50156911d 100644
--- a/config/metrics/counts_28d/20210216180341_ide_edit_total_unique_counts_monthly.yml
+++ b/config/metrics/counts_28d/20210216180341_ide_edit_total_unique_counts_monthly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.ide_edit_total_unique_counts_monthly
description: Count of unique users per month who edited a file from the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20210216184255_i_snippets_show_monthly.yml b/config/metrics/counts_28d/20210216184255_i_snippets_show_monthly.yml
index abd475b4ba5..94c8f512ff2 100644
--- a/config/metrics/counts_28d/20210216184255_i_snippets_show_monthly.yml
+++ b/config/metrics/counts_28d/20210216184255_i_snippets_show_monthly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.snippets.i_snippets_show_monthly
description: Monthly number of users viewing snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 28d
diff --git a/config/metrics/counts_28d/20220428154012_live_preview.yml b/config/metrics/counts_28d/20220428154012_live_preview.yml
index aa06bbcaaea..e048398da57 100644
--- a/config/metrics/counts_28d/20220428154012_live_preview.yml
+++ b/config/metrics/counts_28d/20220428154012_live_preview.yml
@@ -4,7 +4,7 @@ key_path: usage_activity_by_stage_monthly.create.action_monthly_active_users_liv
description: Count of monthly unique users that successfully connect to Live Preview
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/85420
diff --git a/config/metrics/counts_7d/20210216180328_g_edit_by_web_ide_weekly.yml b/config/metrics/counts_7d/20210216180328_g_edit_by_web_ide_weekly.yml
index 9244afc1249..c17e5e77411 100644
--- a/config/metrics/counts_7d/20210216180328_g_edit_by_web_ide_weekly.yml
+++ b/config/metrics/counts_7d/20210216180328_g_edit_by_web_ide_weekly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.g_edit_by_web_ide_weekly
description: Weekly number of users editing using the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: 7d
diff --git a/config/metrics/counts_7d/20210216180332_g_edit_by_sfe_weekly.yml b/config/metrics/counts_7d/20210216180332_g_edit_by_sfe_weekly.yml
index ed66ba900bd..4ce88623768 100644
--- a/config/metrics/counts_7d/20210216180332_g_edit_by_sfe_weekly.yml
+++ b/config/metrics/counts_7d/20210216180332_g_edit_by_sfe_weekly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.g_edit_by_sfe_weekly
description: Weekly number of users editing from the single file editor
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 7d
diff --git a/config/metrics/counts_7d/20210216180336_g_edit_by_snippet_ide_weekly.yml b/config/metrics/counts_7d/20210216180336_g_edit_by_snippet_ide_weekly.yml
index e32159e0914..435a5c381a0 100644
--- a/config/metrics/counts_7d/20210216180336_g_edit_by_snippet_ide_weekly.yml
+++ b/config/metrics/counts_7d/20210216180336_g_edit_by_snippet_ide_weekly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.g_edit_by_snippet_ide_weekly
description: Weekly number of users editing Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 7d
diff --git a/config/metrics/counts_7d/20210216180339_ide_edit_total_unique_counts_weekly.yml b/config/metrics/counts_7d/20210216180339_ide_edit_total_unique_counts_weekly.yml
index c9ef8e978c8..413a032309e 100644
--- a/config/metrics/counts_7d/20210216180339_ide_edit_total_unique_counts_weekly.yml
+++ b/config/metrics/counts_7d/20210216180339_ide_edit_total_unique_counts_weekly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.ide_edit.ide_edit_total_unique_counts_weekly
description: Weekly number of users editing a file using the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: 7d
diff --git a/config/metrics/counts_7d/20210216182100_wiki_action_weekly.yml b/config/metrics/counts_7d/20210216182100_wiki_action_weekly.yml
index 3a79b0a0cfe..f10eb6110b3 100644
--- a/config/metrics/counts_7d/20210216182100_wiki_action_weekly.yml
+++ b/config/metrics/counts_7d/20210216182100_wiki_action_weekly.yml
@@ -3,8 +3,8 @@ data_category: optional
key_path: redis_hll_counters.source_code.wiki_action_weekly
description: Count of unique actions done on a wiki (create, edit, delete)
product_section: dev
-product_stage: create
-product_group: source_code
+product_stage: plan
+product_group: knowledge
value_type: number
status: active
time_frame: 7d
diff --git a/config/metrics/counts_7d/20210216184253_i_snippets_show_weekly.yml b/config/metrics/counts_7d/20210216184253_i_snippets_show_weekly.yml
index 333deea8921..c0c298e5836 100644
--- a/config/metrics/counts_7d/20210216184253_i_snippets_show_weekly.yml
+++ b/config/metrics/counts_7d/20210216184253_i_snippets_show_weekly.yml
@@ -4,7 +4,7 @@ key_path: redis_hll_counters.snippets.i_snippets_show_weekly
description: Weekly number of users viewing snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: 7d
diff --git a/config/metrics/counts_all/20210216180239_personal_snippets.yml b/config/metrics/counts_all/20210216180239_personal_snippets.yml
index 7477fd3cdf3..4a031b6a7b4 100644
--- a/config/metrics/counts_all/20210216180239_personal_snippets.yml
+++ b/config/metrics/counts_all/20210216180239_personal_snippets.yml
@@ -4,7 +4,7 @@ key_path: counts.personal_snippets
description: Count of personal Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180241_project_snippets.yml b/config/metrics/counts_all/20210216180241_project_snippets.yml
index 74e3ac6e97b..cd35e388a4e 100644
--- a/config/metrics/counts_all/20210216180241_project_snippets.yml
+++ b/config/metrics/counts_all/20210216180241_project_snippets.yml
@@ -4,7 +4,7 @@ key_path: counts.project_snippets
description: Count of project Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180242_web_ide_commits.yml b/config/metrics/counts_all/20210216180242_web_ide_commits.yml
index a67a62716c7..a5562cac4b1 100644
--- a/config/metrics/counts_all/20210216180242_web_ide_commits.yml
+++ b/config/metrics/counts_all/20210216180242_web_ide_commits.yml
@@ -4,7 +4,7 @@ key_path: counts.web_ide_commits
description: Count of commits made from the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180244_web_ide_views.yml b/config/metrics/counts_all/20210216180244_web_ide_views.yml
index c18feaacf6d..84c1455f8ad 100644
--- a/config/metrics/counts_all/20210216180244_web_ide_views.yml
+++ b/config/metrics/counts_all/20210216180244_web_ide_views.yml
@@ -4,7 +4,7 @@ key_path: counts.web_ide_views
description: Count of views of the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180246_web_ide_merge_requests.yml b/config/metrics/counts_all/20210216180246_web_ide_merge_requests.yml
index 29252f16e73..818456eefdc 100644
--- a/config/metrics/counts_all/20210216180246_web_ide_merge_requests.yml
+++ b/config/metrics/counts_all/20210216180246_web_ide_merge_requests.yml
@@ -4,7 +4,7 @@ key_path: counts.web_ide_merge_requests
description: Count of merge requests created from the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180248_web_ide_previews.yml b/config/metrics/counts_all/20210216180248_web_ide_previews.yml
index 5a59b88ac79..f0e36883650 100644
--- a/config/metrics/counts_all/20210216180248_web_ide_previews.yml
+++ b/config/metrics/counts_all/20210216180248_web_ide_previews.yml
@@ -4,7 +4,7 @@ key_path: counts.web_ide_previews
description: Count of Live Preview tab views in the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180250_web_ide_terminals.yml b/config/metrics/counts_all/20210216180250_web_ide_terminals.yml
index 04d14f57470..9ed5ca63170 100644
--- a/config/metrics/counts_all/20210216180250_web_ide_terminals.yml
+++ b/config/metrics/counts_all/20210216180250_web_ide_terminals.yml
@@ -4,7 +4,7 @@ key_path: counts.web_ide_terminals
description: Count of Web Terminal tab views in the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180252_web_ide_pipelines.yml b/config/metrics/counts_all/20210216180252_web_ide_pipelines.yml
index fc7dd96d4ae..77519bd2f63 100644
--- a/config/metrics/counts_all/20210216180252_web_ide_pipelines.yml
+++ b/config/metrics/counts_all/20210216180252_web_ide_pipelines.yml
@@ -4,7 +4,7 @@ key_path: counts.web_ide_pipelines
description: Count of Pipeline tab views in the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180253_snippet_comment.yml b/config/metrics/counts_all/20210216180253_snippet_comment.yml
index 9dae9e8aaad..a0d546d1fe1 100644
--- a/config/metrics/counts_all/20210216180253_snippet_comment.yml
+++ b/config/metrics/counts_all/20210216180253_snippet_comment.yml
@@ -4,7 +4,7 @@ key_path: counts.snippet_comment
description: Count of comments on Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180255_snippet_create.yml b/config/metrics/counts_all/20210216180255_snippet_create.yml
index 719ae81b0d3..487bc39b7c2 100644
--- a/config/metrics/counts_all/20210216180255_snippet_create.yml
+++ b/config/metrics/counts_all/20210216180255_snippet_create.yml
@@ -4,7 +4,7 @@ key_path: counts.snippet_create
description: Count of newly created Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180257_snippet_update.yml b/config/metrics/counts_all/20210216180257_snippet_update.yml
index d0802cb275a..0ae80fb6a2d 100644
--- a/config/metrics/counts_all/20210216180257_snippet_update.yml
+++ b/config/metrics/counts_all/20210216180257_snippet_update.yml
@@ -4,7 +4,7 @@ key_path: counts.snippet_update
description: Count of updates to existing Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180304_user_preferences_user_gitpod_enabled.yml b/config/metrics/counts_all/20210216180304_user_preferences_user_gitpod_enabled.yml
index 07347d421d3..15a486227c2 100644
--- a/config/metrics/counts_all/20210216180304_user_preferences_user_gitpod_enabled.yml
+++ b/config/metrics/counts_all/20210216180304_user_preferences_user_gitpod_enabled.yml
@@ -4,7 +4,7 @@ key_path: counts.user_preferences_user_gitpod_enabled
description: Count of users with the GitPod integration enabled
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180306_snippets.yml b/config/metrics/counts_all/20210216180306_snippets.yml
index b7fa05e1a16..88b7ae413d8 100644
--- a/config/metrics/counts_all/20210216180306_snippets.yml
+++ b/config/metrics/counts_all/20210216180306_snippets.yml
@@ -4,7 +4,7 @@ key_path: counts.snippets
description: Count of all Snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180316_snippets.yml b/config/metrics/counts_all/20210216180316_snippets.yml
index cfafaf5d379..567d0b1d54b 100644
--- a/config/metrics/counts_all/20210216180316_snippets.yml
+++ b/config/metrics/counts_all/20210216180316_snippets.yml
@@ -5,7 +5,7 @@ name: count_distinct_author_id_from_snippets
description: Count of distinct author_id from snippets
product_section: dev
product_stage: create
-product_group: editor
+product_group: source_code
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180734_wiki_pages_create.yml b/config/metrics/counts_all/20210216180734_wiki_pages_create.yml
index ff3dc3c54d4..4358b1b68fc 100644
--- a/config/metrics/counts_all/20210216180734_wiki_pages_create.yml
+++ b/config/metrics/counts_all/20210216180734_wiki_pages_create.yml
@@ -3,8 +3,8 @@ data_category: optional
key_path: counts.wiki_pages_create
description: Count of all Wiki pages created
product_section: dev
-product_stage: create
-product_group: editor
+product_stage: plan
+product_group: knowledge
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180736_wiki_pages_update.yml b/config/metrics/counts_all/20210216180736_wiki_pages_update.yml
index 05722e59fcd..98cd7ced351 100644
--- a/config/metrics/counts_all/20210216180736_wiki_pages_update.yml
+++ b/config/metrics/counts_all/20210216180736_wiki_pages_update.yml
@@ -3,8 +3,8 @@ data_category: optional
key_path: counts.wiki_pages_update
description: Count of all Wiki page updates
product_section: dev
-product_stage: create
-product_group: editor
+product_stage: plan
+product_group: knowledge
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20210216180738_wiki_pages_delete.yml b/config/metrics/counts_all/20210216180738_wiki_pages_delete.yml
index 4e441376286..1c861793ac9 100644
--- a/config/metrics/counts_all/20210216180738_wiki_pages_delete.yml
+++ b/config/metrics/counts_all/20210216180738_wiki_pages_delete.yml
@@ -3,8 +3,8 @@ data_category: optional
key_path: counts.wiki_pages_delete
description: Count of all Wiki pages deleted
product_section: dev
-product_stage: create
-product_group: editor
+product_stage: plan
+product_group: knowledge
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/counts_all/20220122022215_web_ide_previews_success.yml b/config/metrics/counts_all/20220122022215_web_ide_previews_success.yml
index 0320f29ca14..7ae4a738977 100644
--- a/config/metrics/counts_all/20220122022215_web_ide_previews_success.yml
+++ b/config/metrics/counts_all/20220122022215_web_ide_previews_success.yml
@@ -4,7 +4,7 @@ key_path: counts.web_ide_previews_success
description: Count of Live Preview tab successful initializations in the Web IDE
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: number
status: active
time_frame: all
diff --git a/config/metrics/settings/20210204124920_web_ide_clientside_preview_enabled.yml b/config/metrics/settings/20210204124920_web_ide_clientside_preview_enabled.yml
index da6055ae7cc..a206d8ecd7a 100644
--- a/config/metrics/settings/20210204124920_web_ide_clientside_preview_enabled.yml
+++ b/config/metrics/settings/20210204124920_web_ide_clientside_preview_enabled.yml
@@ -4,7 +4,7 @@ key_path: web_ide_clientside_preview_enabled
description: Whether Web IDE clientside preview is enabled
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: boolean
status: active
time_frame: none
diff --git a/config/metrics/settings/20210216180314_gitpod_enabled.yml b/config/metrics/settings/20210216180314_gitpod_enabled.yml
index 0510f56cf0a..3bd80b5e141 100644
--- a/config/metrics/settings/20210216180314_gitpod_enabled.yml
+++ b/config/metrics/settings/20210216180314_gitpod_enabled.yml
@@ -4,7 +4,7 @@ key_path: gitpod_enabled
description: Whether Gitpod is enabled in the instance
product_section: dev
product_stage: create
-product_group: editor
+product_group: ide
value_type: boolean
status: active
time_frame: none
diff --git a/db/migrate/20230606182433_add_enterprise_columns_to_user_details.rb b/db/migrate/20230606182433_add_enterprise_columns_to_user_details.rb
new file mode 100644
index 00000000000..092a304b307
--- /dev/null
+++ b/db/migrate/20230606182433_add_enterprise_columns_to_user_details.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class AddEnterpriseColumnsToUserDetails < Gitlab::Database::Migration[2.1]
+ enable_lock_retries!
+
+ def change
+ add_column :user_details, :enterprise_group_id, :bigint
+
+ add_column :user_details, :enterprise_group_associated_at, :datetime_with_timezone
+ end
+end
diff --git a/db/post_migrate/20230605085936_add_new_index_to_vsa_issue_stage_events.rb b/db/post_migrate/20230605085936_add_new_index_to_vsa_issue_stage_events.rb
new file mode 100644
index 00000000000..75f28f35fe2
--- /dev/null
+++ b/db/post_migrate/20230605085936_add_new_index_to_vsa_issue_stage_events.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddNewIndexToVsaIssueStageEvents < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::PartitioningMigrationHelpers
+
+ TABLE_NAME = :analytics_cycle_analytics_issue_stage_events
+ COLUMN_NAMES = %I[stage_event_hash_id group_id end_event_timestamp issue_id].freeze
+ INDEX_NAME = 'index_issue_stage_events_for_consistency_check'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_partitioned_index TABLE_NAME, COLUMN_NAMES, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_partitioned_index_by_name TABLE_NAME, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230605085957_add_new_index_to_vsa_mr_stage_events.rb b/db/post_migrate/20230605085957_add_new_index_to_vsa_mr_stage_events.rb
new file mode 100644
index 00000000000..b4ed38519c5
--- /dev/null
+++ b/db/post_migrate/20230605085957_add_new_index_to_vsa_mr_stage_events.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AddNewIndexToVsaMrStageEvents < Gitlab::Database::Migration[2.1]
+ include Gitlab::Database::PartitioningMigrationHelpers
+
+ TABLE_NAME = :analytics_cycle_analytics_merge_request_stage_events
+ COLUMN_NAMES = %I[stage_event_hash_id group_id end_event_timestamp merge_request_id]
+ INDEX_NAME = 'index_mr_stage_events_for_consistency_check'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_partitioned_index TABLE_NAME, COLUMN_NAMES, name: INDEX_NAME
+ end
+
+ def down
+ remove_concurrent_partitioned_index_by_name TABLE_NAME, INDEX_NAME
+ end
+end
diff --git a/db/post_migrate/20230606183327_add_index_user_details_on_enterprise_group_id.rb b/db/post_migrate/20230606183327_add_index_user_details_on_enterprise_group_id.rb
new file mode 100644
index 00000000000..d3b53867b4f
--- /dev/null
+++ b/db/post_migrate/20230606183327_add_index_user_details_on_enterprise_group_id.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddIndexUserDetailsOnEnterpriseGroupId < Gitlab::Database::Migration[2.1]
+ INDEX_NAME = 'index_user_details_on_enterprise_group_id'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :user_details, :enterprise_group_id, name: INDEX_NAME
+
+ add_concurrent_foreign_key :user_details, :namespaces, column: :enterprise_group_id, on_delete: :nullify
+ end
+
+ def down
+ with_lock_retries do
+ remove_foreign_key :user_details, column: :enterprise_group_id
+ end
+
+ remove_concurrent_index_by_name :user_details, name: INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20230605085936 b/db/schema_migrations/20230605085936
new file mode 100644
index 00000000000..f8b9df81c0d
--- /dev/null
+++ b/db/schema_migrations/20230605085936
@@ -0,0 +1 @@
+8e78d4837a56de399861b4ec7ef4052a5df486834f8a97496a9bc51765413379
\ No newline at end of file
diff --git a/db/schema_migrations/20230605085957 b/db/schema_migrations/20230605085957
new file mode 100644
index 00000000000..be5ad58e0f3
--- /dev/null
+++ b/db/schema_migrations/20230605085957
@@ -0,0 +1 @@
+bfe04f7c677a6703fc1476079c8f2f48c860747a73c4d16d58bebee31fff5ec9
\ No newline at end of file
diff --git a/db/schema_migrations/20230606182433 b/db/schema_migrations/20230606182433
new file mode 100644
index 00000000000..e08f3f5fdc1
--- /dev/null
+++ b/db/schema_migrations/20230606182433
@@ -0,0 +1 @@
+987987571003b905a1f05c07fbe4119bdb077c54752a7379499969c6979964a1
\ No newline at end of file
diff --git a/db/schema_migrations/20230606183327 b/db/schema_migrations/20230606183327
new file mode 100644
index 00000000000..d3d4b811eea
--- /dev/null
+++ b/db/schema_migrations/20230606183327
@@ -0,0 +1 @@
+a6fbd8a132215155117646648c8d44af158c2578563fc02d7705b8608b61eee4
\ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 4ad846f49af..f1aba967e4b 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -23541,6 +23541,8 @@ CREATE TABLE user_details (
onboarding_step_url text,
discord text DEFAULT ''::text NOT NULL,
provisioned_by_group_at timestamp with time zone,
+ enterprise_group_id bigint,
+ enterprise_group_associated_at timestamp with time zone,
CONSTRAINT check_245664af82 CHECK ((char_length(webauthn_xid) <= 100)),
CONSTRAINT check_444573ee52 CHECK ((char_length(skype) <= 500)),
CONSTRAINT check_466a25be35 CHECK ((char_length(twitter) <= 500)),
@@ -28580,6 +28582,10 @@ CREATE INDEX index_merge_request_stage_events_project_duration ON ONLY analytics
CREATE INDEX index_006f943df6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_issue_stage_events_for_consistency_check ON ONLY analytics_cycle_analytics_issue_stage_events USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
+CREATE INDEX index_009e6c1133 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_02749b504c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_merge_request_stage_events_group_duration ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28612,6 +28618,8 @@ CREATE INDEX index_issue_stage_events_project_in_progress_duration ON ONLY analy
CREATE INDEX index_0d837a5dda ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_0e98daa03c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_0f28a65451 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_10588dbff0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28630,6 +28638,8 @@ CREATE INDEX index_14f3645821 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_16627b455e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_17fa2812c5 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_1a0388713a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_1a349ed064 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28646,8 +28656,14 @@ CREATE INDEX index_201c5ddbe9 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_20353089e0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_mr_stage_events_for_consistency_check ON ONLY analytics_cycle_analytics_merge_request_stage_events USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_203dd694bc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_206349925b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_2098118748 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_21db459e34 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_21e262390a ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28680,6 +28696,8 @@ CREATE INDEX index_27d7ad78d8 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_281840d2d1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_2945cf4c6d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_296f64df5c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_2ad4b4fdbc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28712,6 +28730,8 @@ CREATE INDEX index_3640194b77 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_372160a706 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_389dd3c9fc ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_38a538234e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_39625b8a41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28720,10 +28740,14 @@ CREATE INDEX index_399dc06649 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_3a10b315c0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_3a8848c00b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_3c2a3a6ac9 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_3e6be332b7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_4137a6fac3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_41a1c3a4c6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_435802dd01 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28734,10 +28758,14 @@ CREATE INDEX index_453a659cb6 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_46b989b294 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_4717e7049b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_47638677a3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_4810ac88f5 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_482a09e0ee ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_491b4b749e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_4a243772d7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28764,6 +28792,10 @@ CREATE INDEX index_4f2eb7a06b ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_4f6fc34e57 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_50272372ba ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
+CREATE INDEX index_5034eae5ff ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_50c09f6e04 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_5111e3e7e7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28772,16 +28804,24 @@ CREATE INDEX index_52ea79bf8e ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_541cc045fc ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_5445e466ee ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_551676e972 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_56281bfb73 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_5660b1b38e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_584c1e6fb0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_5913107510 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_59a8209ab6 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_59ce40fcc4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_59cfd5bc9a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_5a5f39d824 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_5b613b5fcf ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28790,10 +28830,16 @@ CREATE INDEX index_5b944f308d ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_5bc2f32084 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_5bfa62771b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_5c4053b63d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_5db09170d4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_5e46aea379 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
+CREATE INDEX index_5e78c2eac1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_5ee060202f ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_5f24f6ead2 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28816,8 +28862,12 @@ CREATE INDEX index_64e3a1dfa1 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_64eb4cf8bd ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_6578d04baa ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_6580ecb2db ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_66a736da09 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_682eba05f6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_69bdcf213e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28830,6 +28880,10 @@ CREATE INDEX index_6b1ce61c8f ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_6cfb391b86 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_6e560c1a4d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_6e64aa1646 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_6e6c2e6a1d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_6ea423bbd1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28840,6 +28894,8 @@ CREATE INDEX index_6f4e0abe54 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_6fa47e1334 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_708d792ae9 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_70c657954b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_71c2b26944 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28866,6 +28922,8 @@ CREATE INDEX index_7ead2300ca ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_7ecb5b68b4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_7f543eed8d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_807671c4be ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_807fa83fc0 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28876,6 +28934,8 @@ CREATE INDEX index_81b9cf594f ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_82c675952c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_837cc295f1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_83c5049b3e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_83edf231b8 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28892,20 +28952,32 @@ CREATE INDEX index_87d40fb9f9 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_88b40d6740 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_89c49cf697 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_89c79afe5c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_8a0fc3de4f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_8a8eb06b9a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_8b1b6b03b4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_8b9f9a19a4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_8fb48e72ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_918bb2ebbb ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_91d5e4e3df ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_9201b952a0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_92c09e352b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_9490e0e0b7 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_9555c2ae92 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_95a353f50b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_971af9481e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28914,6 +28986,8 @@ CREATE INDEX index_9955b1dc59 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_9b8e89ae41 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_9d0e953ab3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_9ee83b068b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_a1a9dc36c1 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28922,6 +28996,8 @@ CREATE INDEX index_a2d9f185a5 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_a3feed3097 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_a46b7b7f26 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_a6999c65c9 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_a6c68d16b2 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28930,10 +29006,16 @@ CREATE INDEX index_a8276a450f ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_a88f20fc98 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_a8fe03fe34 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_a9424aa392 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_a99cee1904 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_a9b1763c36 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
+CREATE INDEX index_a9ba23c88e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_a9deff2159 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_aabc184267 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28942,6 +29024,8 @@ CREATE INDEX index_ab22231a16 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_abbdf80ab1 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_ad55e8b11c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_adc159c3fe ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_aed7f7b10c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28950,6 +29034,14 @@ CREATE INDEX index_aee84adb5b ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_b1dda405af ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_b24e8538c8 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_b3b64068e7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
+CREATE INDEX index_b3c4c9a53f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
+CREATE INDEX index_b4b2bba753 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_b607012614 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_b7f21460bb ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -28960,10 +29052,18 @@ CREATE INDEX index_bc189e47ab ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_bca83177ef ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_bcaa8dcd34 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_be0a028bcc ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_bedd7e160b ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_bee2b94a80 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_bf1809b19e ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_c02f569fba ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_c08e669dfa ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_c09bb66559 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -28990,46 +29090,70 @@ CREATE INDEX index_c66758baa7 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_c6ea8a0e26 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_c7ac8595d3 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_c8c4219c0a ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_c971e6c5ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_c9b14a3d9f ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_cb222425ed ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_cbb61ea269 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_cc0ba6343b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_ccb4f5c5a6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_cd2b2939a4 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_cda41e106e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_ce87cbaf2d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_cfa4237c83 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_d01ea0126a ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_d03e9cdfae ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_d0d285c264 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_d17b82ddd9 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
+CREATE INDEX index_d1c24d8199 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_d27b4c84e7 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_d2fe918e83 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_d35c969634 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_d493a5c171 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_d6047ee813 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_d69c2485f4 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_d70379e22c ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_d8fa9793ad ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_d9384b768d ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_db2753330c ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_dc571ba649 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_de0334da63 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_df62a8c50e ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_e1a4f994d8 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_e38489ea98 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_e3d1fd5b19 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 USING btree (stage_event_hash_id, project_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_e3d6234929 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
@@ -29048,12 +29172,18 @@ CREATE INDEX index_e8f3a327b2 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_ea0c2d3361 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_ea1b583157 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_eb558957f0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_ec25d494e6 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_ece25b5987 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_ed094a4f13 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 USING btree (stage_event_hash_id, project_id, end_event_timestamp, issue_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
+CREATE INDEX index_ed6dbac8c0 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 USING btree (stage_event_hash_id, group_id, end_event_timestamp, issue_id);
+
CREATE INDEX index_ee4c549a2d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 USING btree (stage_event_hash_id, project_id, end_event_timestamp, merge_request_id, start_event_timestamp) WHERE (end_event_timestamp IS NOT NULL);
CREATE INDEX index_ef6a48bd29 ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -29082,10 +29212,14 @@ CREATE INDEX index_f76e8a5304 ON gitlab_partitions_static.analytics_cycle_analyt
CREATE INDEX index_f86acdc2ff ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_f86f73056d ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_f878aab8e3 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_f902c261ce ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 USING btree (stage_event_hash_id, project_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
+CREATE INDEX index_f91599d825 ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 USING btree (stage_event_hash_id, group_id, end_event_timestamp, merge_request_id);
+
CREATE INDEX index_fbccc855cf ON gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 USING btree (stage_event_hash_id, group_id, start_event_timestamp, merge_request_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
CREATE INDEX index_fbf2d3310b ON gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 USING btree (stage_event_hash_id, group_id, start_event_timestamp, issue_id) WHERE ((end_event_timestamp IS NULL) AND (state_id = 1));
@@ -32906,6 +33040,8 @@ CREATE INDEX index_user_custom_attributes_on_key_and_value ON user_custom_attrib
CREATE UNIQUE INDEX index_user_custom_attributes_on_user_id_and_key ON user_custom_attributes USING btree (user_id, key);
+CREATE INDEX index_user_details_on_enterprise_group_id ON user_details USING btree (enterprise_group_id);
+
CREATE INDEX index_user_details_on_password_last_changed_at ON user_details USING btree (password_last_changed_at);
COMMENT ON INDEX index_user_details_on_password_last_changed_at IS 'JiHu-specific index';
@@ -33566,6 +33702,8 @@ ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_pa
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_006f943df6;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_009e6c1133;
+
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_02749b504c;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_0287f5ba09;
@@ -33588,6 +33726,8 @@ ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0d837a5dda;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_0e98daa03c;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_0f28a65451;
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_10588dbff0;
@@ -33604,6 +33744,8 @@ ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION git
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_16627b455e;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_17fa2812c5;
+
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_1a0388713a;
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_1a349ed064;
@@ -33620,8 +33762,12 @@ ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH P
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_20353089e0;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_203dd694bc;
+
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_206349925b;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_2098118748;
+
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21db459e34;
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_21e262390a;
@@ -33654,6 +33800,8 @@ ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_281840d2d1;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_2945cf4c6d;
+
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_296f64df5c;
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_2ad4b4fdbc;
@@ -33686,6 +33834,8 @@ ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_372160a706;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_389dd3c9fc;
+
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_38a538234e;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_39625b8a41;
@@ -33694,10 +33844,14 @@ ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_part
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3a10b315c0;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_3a8848c00b;
+
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_3c2a3a6ac9;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_3e6be332b7;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_4137a6fac3;
+
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_41a1c3a4c6;
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_435802dd01;
@@ -33708,10 +33862,14 @@ ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_46b989b294;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_4717e7049b;
+
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_47638677a3;
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4810ac88f5;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_482a09e0ee;
+
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_491b4b749e;
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_4a243772d7;
@@ -33738,6 +33896,10 @@ ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH P
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_4f6fc34e57;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_50272372ba;
+
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_5034eae5ff;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_50c09f6e04;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5111e3e7e7;
@@ -33746,16 +33908,24 @@ ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION g
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_541cc045fc;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_5445e466ee;
+
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_551676e972;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_56281bfb73;
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5660b1b38e;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_584c1e6fb0;
+
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_5913107510;
+
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_59a8209ab6;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_59ce40fcc4;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_59cfd5bc9a;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5a5f39d824;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5b613b5fcf;
@@ -33764,10 +33934,16 @@ ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION git
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_5bc2f32084;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_5bfa62771b;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5c4053b63d;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_5db09170d4;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_5e46aea379;
+
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_5e78c2eac1;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5ee060202f;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_5f24f6ead2;
@@ -33790,8 +33966,12 @@ ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_part
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_64eb4cf8bd;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_6578d04baa;
+
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6580ecb2db;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_66a736da09;
+
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_682eba05f6;
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_69bdcf213e;
@@ -33804,6 +33984,10 @@ ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH P
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_6cfb391b86;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_6e560c1a4d;
+
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_6e64aa1646;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6e6c2e6a1d;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_6ea423bbd1;
@@ -33814,6 +33998,8 @@ ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_6fa47e1334;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_708d792ae9;
+
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_70c657954b;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_71c2b26944;
@@ -33840,6 +34026,8 @@ ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_part
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_7ecb5b68b4;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_7f543eed8d;
+
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_807671c4be;
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_807fa83fc0;
@@ -33850,6 +34038,8 @@ ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_82c675952c;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_837cc295f1;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_83c5049b3e;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_83edf231b8;
@@ -33866,20 +34056,32 @@ ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION g
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_88b40d6740;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_89c49cf697;
+
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_89c79afe5c;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_8a0fc3de4f;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_8a8eb06b9a;
+
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_8b1b6b03b4;
+
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8b9f9a19a4;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_8fb48e72ce;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_918bb2ebbb;
+
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_91d5e4e3df;
+
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_9201b952a0;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_92c09e352b;
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9490e0e0b7;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_9555c2ae92;
+
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_95a353f50b;
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_971af9481e;
@@ -33888,6 +34090,8 @@ ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH P
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_9b8e89ae41;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_9d0e953ab3;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_9ee83b068b;
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a1a9dc36c1;
@@ -33896,6 +34100,8 @@ ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a3feed3097;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_a46b7b7f26;
+
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a6999c65c9;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a6c68d16b2;
@@ -33904,10 +34110,16 @@ ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION g
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a88f20fc98;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_a8fe03fe34;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a9424aa392;
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_a99cee1904;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_a9b1763c36;
+
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_a9ba23c88e;
+
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_a9deff2159;
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aabc184267;
@@ -33916,6 +34128,8 @@ ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITI
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_abbdf80ab1;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_ad55e8b11c;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_adc159c3fe;
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_aed7f7b10c;
@@ -33924,6 +34138,14 @@ ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION git
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b1dda405af;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_b24e8538c8;
+
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_b3b64068e7;
+
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_b3c4c9a53f;
+
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_b4b2bba753;
+
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b607012614;
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_b7f21460bb;
@@ -33934,10 +34156,18 @@ ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_part
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_bca83177ef;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_bcaa8dcd34;
+
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_be0a028bcc;
+
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bedd7e160b;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_bee2b94a80;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_bf1809b19e;
+
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_c02f569fba;
+
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c08e669dfa;
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c09bb66559;
@@ -33964,46 +34194,70 @@ ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c6ea8a0e26;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_c7ac8595d3;
+
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_c8c4219c0a;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_c971e6c5ce;
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_c9b14a3d9f;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_cb222425ed;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cbb61ea269;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_cc0ba6343b;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_ccb4f5c5a6;
+
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_cd2b2939a4;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cda41e106e;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_ce87cbaf2d;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_cfa4237c83;
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_d01ea0126a;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_d03e9cdfae;
+
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d0d285c264;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_d17b82ddd9;
+
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_d1c24d8199;
+
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d27b4c84e7;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d2fe918e83;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d35c969634;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_d493a5c171;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d6047ee813;
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d69c2485f4;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_d70379e22c;
+
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_d8fa9793ad;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_d9384b768d;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_db2753330c;
+
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_dc571ba649;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_de0334da63;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_df62a8c50e;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e1a4f994d8;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_e38489ea98;
+
ALTER INDEX index_merge_request_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_e3d1fd5b19;
ALTER INDEX index_issue_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_e3d6234929;
@@ -34022,12 +34276,18 @@ ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH P
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ea0c2d3361;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_ea1b583157;
+
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_eb558957f0;
ALTER INDEX index_merge_request_stage_events_group_duration ATTACH PARTITION gitlab_partitions_static.index_ec25d494e6;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_ece25b5987;
+
ALTER INDEX index_issue_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ed094a4f13;
+ALTER INDEX index_issue_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_ed6dbac8c0;
+
ALTER INDEX index_merge_request_stage_events_project_duration ATTACH PARTITION gitlab_partitions_static.index_ee4c549a2d;
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_ef6a48bd29;
@@ -34056,10 +34316,14 @@ ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH P
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f86acdc2ff;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_f86f73056d;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f878aab8e3;
ALTER INDEX index_issue_stage_events_project_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_f902c261ce;
+ALTER INDEX index_mr_stage_events_for_consistency_check ATTACH PARTITION gitlab_partitions_static.index_f91599d825;
+
ALTER INDEX index_merge_request_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbccc855cf;
ALTER INDEX index_issue_stage_events_group_in_progress_duration ATTACH PARTITION gitlab_partitions_static.index_fbf2d3310b;
@@ -35662,6 +35926,9 @@ ALTER TABLE ONLY timelogs
ALTER TABLE ONLY geo_event_log
ADD CONSTRAINT fk_c4b1c1f66e FOREIGN KEY (repository_deleted_event_id) REFERENCES geo_repository_deleted_events(id) ON DELETE CASCADE;
+ALTER TABLE ONLY user_details
+ ADD CONSTRAINT fk_c53c794142 FOREIGN KEY (enterprise_group_id) REFERENCES namespaces(id) ON DELETE SET NULL;
+
ALTER TABLE ONLY issues
ADD CONSTRAINT fk_c63cbf6c25 FOREIGN KEY (closed_by_id) REFERENCES users(id) ON DELETE SET NULL;
diff --git a/doc/administration/monitoring/prometheus/gitlab_metrics.md b/doc/administration/monitoring/prometheus/gitlab_metrics.md
index 7577b260f6b..d26cf2ed0af 100644
--- a/doc/administration/monitoring/prometheus/gitlab_metrics.md
+++ b/doc/administration/monitoring/prometheus/gitlab_metrics.md
@@ -52,6 +52,7 @@ The following metrics are available:
| `gitlab_ci_active_jobs` | Histogram | 14.2 | Count of active jobs when pipeline is created | |
| `gitlab_database_transaction_seconds` | Histogram | 12.1 | Time spent in database transactions, in seconds | |
| `gitlab_method_call_duration_seconds` | Histogram | 10.2 | Method calls real duration | `controller`, `action`, `module`, `method` |
+| `gitlab_omniauth_login_total` | Counter | 16.1 | Total number of OmniAuth logins attempts | `provider`, `status` |
| `gitlab_page_out_of_bounds` | Counter | 12.8 | Counter for the PageLimiter pagination limit being hit | `controller`, `action`, `bot` |
| `gitlab_rails_boot_time_seconds` | Gauge | 14.8 | Time elapsed for Rails primary process to finish startup | |
| `gitlab_rails_queue_duration_seconds` | Histogram | 9.4 | Measures latency between GitLab Workhorse forwarding a request to Rails | |
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 2bb170c47da..539791620c4 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -26206,10 +26206,10 @@ Values for sorting timelogs.
| ----- | ----------- |
| `CREATED_ASC` | Created at ascending order. |
| `CREATED_DESC` | Created at descending order. |
-| `SPENT_AT_ASC` | Spent at by ascending order. |
-| `SPENT_AT_DESC` | Spent at by descending order. |
-| `TIME_SPENT_ASC` | Time spent by ascending order. |
-| `TIME_SPENT_DESC` | Time spent by descending order. |
+| `SPENT_AT_ASC` | Spent at ascending order. |
+| `SPENT_AT_DESC` | Spent at descending order. |
+| `TIME_SPENT_ASC` | Time spent ascending order. |
+| `TIME_SPENT_DESC` | Time spent descending order. |
| `UPDATED_ASC` | Updated at ascending order. |
| `UPDATED_DESC` | Updated at descending order. |
| `created_asc` **{warning-solid}** | **Deprecated** in 13.5. This was renamed. Use: `CREATED_ASC`. |
diff --git a/doc/ci/testing/test_coverage_visualization.md b/doc/ci/testing/test_coverage_visualization.md
index 8ebe636e1ad..669157daa21 100644
--- a/doc/ci/testing/test_coverage_visualization.md
+++ b/doc/ci/testing/test_coverage_visualization.md
@@ -429,6 +429,8 @@ the coverage report itself and verify that:
- The file you are viewing in the diff view is mentioned in the coverage report.
- The `source` and `filename` nodes in the report follows the [expected structure](#automatic-class-path-correction)
to match the files in your repository.
+- The pipeline has completed. If the pipeline is [blocked on a manual job](../jobs/job_control.md#types-of-manual-jobs),
+ the pipeline is not considered complete.
Report artifacts are not downloadable by default. If you want the report to be downloadable
from the job details page, add your coverage report to the artifact `paths`:
diff --git a/doc/integration/advanced_search/elasticsearch.md b/doc/integration/advanced_search/elasticsearch.md
index 71268e8e78e..e6e1c7489ee 100644
--- a/doc/integration/advanced_search/elasticsearch.md
+++ b/doc/integration/advanced_search/elasticsearch.md
@@ -577,11 +577,16 @@ is recreated with the correct up-to-date schema.
### All migrations must be finished before doing a major upgrade
-Before doing a major version GitLab upgrade, you should have completed all
+Before upgrading to a major GitLab version, you must complete all
migrations that exist up until the latest minor version before that major
-version. If you have halted migrations, these need to be resolved and
-[retried](#retry-a-halted-migration) before proceeding with a major version
-upgrade. Read more about [upgrading to a new major version](../../update/index.md#upgrading-to-a-new-major-version).
+version. You must also resolve and [retry any halted migrations](#retry-a-halted-migration)
+before proceeding with a major version upgrade. For more information, see [Upgrading to a new major version](../../update/index.md#upgrading-to-a-new-major-version).
+
+Migrations that have been removed are
+[marked as obsolete](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/63001).
+If you upgrade GitLab before all pending advanced search migrations are completed,
+those migrations are made obsolete and cannot be executed. In this case, you must
+[re-create your index from scratch](elasticsearch_troubleshooting.md#last-resort-to-recreate-an-index).
## GitLab advanced search Rake tasks
diff --git a/doc/update/index.md b/doc/update/index.md
index 67c17bef7fb..c5e40d59bbd 100644
--- a/doc/update/index.md
+++ b/doc/update/index.md
@@ -140,6 +140,11 @@ To clean up the migration, upgrade to 15.1 or later.
For other advanced search migrations stuck in pending, see [how to retry a halted migration](../integration/advanced_search/elasticsearch.md#retry-a-halted-migration).
+If you upgrade GitLab before all pending advanced search migrations are completed, any pending migrations
+that have been removed in the new version cannot be executed or retried.
+In this case, you must
+[re-create your index from scratch](../integration/advanced_search/elasticsearch_troubleshooting.md#last-resort-to-recreate-an-index).
+
### What do you do for the error `Elasticsearch version not compatible`
Confirm that your version of Elasticsearch or OpenSearch is [compatible with your version of GitLab](../integration/advanced_search/elasticsearch.md#version-requirements).
diff --git a/doc/user/project/settings/import_export.md b/doc/user/project/settings/import_export.md
index 8730db7af58..35af3679185 100644
--- a/doc/user/project/settings/import_export.md
+++ b/doc/user/project/settings/import_export.md
@@ -182,6 +182,7 @@ Items that are **not** exported include:
- [Activity logs for Git-related events](https://gitlab.com/gitlab-org/gitlab/-/issues/214700) (for example, pushing and creating tags)
- Security policies associated with your project
- Links between issues and linked items
+- Links to related merge requests
Migrating projects with file exports uses the same export and import mechanisms as creating projects from templates at the [group](../../group/custom_project_templates.md) and
[instance](../../admin_area/custom_project_templates.md) levels. Therefore, the list of exported items is the same.
diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb
index 2d875742430..bf46c28af9d 100644
--- a/lib/gitlab/gon_helper.rb
+++ b/lib/gitlab/gon_helper.rb
@@ -73,6 +73,7 @@ module Gitlab
push_frontend_feature_flag(:command_palette, current_user)
# To be removed with https://gitlab.com/gitlab-org/gitlab/-/issues/399248
push_frontend_feature_flag(:remove_monitor_metrics)
+ push_frontend_feature_flag(:gitlab_duo, current_user)
end
# Exposes the state of a feature flag to the frontend code.
diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb
index 16a03f2356c..a733dca6a56 100644
--- a/lib/gitlab/search_results.rb
+++ b/lib/gitlab/search_results.rb
@@ -107,7 +107,11 @@ module Gitlab
def users
return User.none unless Ability.allowed?(current_user, :read_users_list)
- UsersFinder.new(current_user, search: query).execute
+ if Feature.enabled?(:autocomplete_users_use_search_service)
+ UsersFinder.new(current_user, { search: query, use_minimum_char_limit: false }).execute
+ else
+ UsersFinder.new(current_user, search: query).execute
+ end
end
# highlighting is only performed by Elasticsearch backed results
diff --git a/spec/controllers/graphql_controller_spec.rb b/spec/controllers/graphql_controller_spec.rb
index 2842ce93e3a..2a16fb1ea37 100644
--- a/spec/controllers/graphql_controller_spec.rb
+++ b/spec/controllers/graphql_controller_spec.rb
@@ -463,7 +463,7 @@ RSpec.describe GraphqlController, feature_category: :integrations do
it 'fails if the GraphiQL gem version is not 1.8.0' do
# We cache the IntrospectionQuery based on the default IntrospectionQuery by GraphiQL. If this spec fails,
# GraphiQL has been updated, so we should check whether the IntropsectionQuery we cache is still valid.
- # It is stored in `app/assets/javascripts/graphql_shared/queries/introspection.query.graphql`
+ # It is stored in `app/graphql/cached_introspection_query.rb#query_string`
expect(GraphiQL::Rails::VERSION).to eq("1.8.0")
end
end
diff --git a/spec/controllers/omniauth_callbacks_controller_spec.rb b/spec/controllers/omniauth_callbacks_controller_spec.rb
index 2e9fc1cece5..21672cf5dbe 100644
--- a/spec/controllers/omniauth_callbacks_controller_spec.rb
+++ b/spec/controllers/omniauth_callbacks_controller_spec.rb
@@ -18,6 +18,39 @@ RSpec.describe OmniauthCallbacksController, type: :controller, feature_category:
Rails.application.env_config['omniauth.auth'] = @original_env_config_omniauth_auth
end
+ context 'authentication succeeds' do
+ let(:extern_uid) { 'my-uid' }
+ let(:provider) { :github }
+
+ context 'without signed-in user' do
+ it 'increments Prometheus counter' do
+ expect { post(provider) }.to(
+ change do
+ Gitlab::Metrics.registry
+ .get(:gitlab_omniauth_login_total)
+ .get(provider: 'github', status: 'succeeded')
+ end.by(1)
+ )
+ end
+ end
+
+ context 'with signed-in user' do
+ before do
+ sign_in user
+ end
+
+ it 'increments Prometheus counter' do
+ expect { post(provider) }.to(
+ change do
+ Gitlab::Metrics.registry
+ .get(:gitlab_omniauth_login_total)
+ .get(provider: 'github', status: 'succeeded')
+ end.by(1)
+ )
+ end
+ end
+ end
+
context 'a deactivated user' do
let(:provider) { :github }
let(:extern_uid) { 'my-uid' }
@@ -96,21 +129,31 @@ RSpec.describe OmniauthCallbacksController, type: :controller, feature_category:
let(:extern_uid) { 'my-uid' }
let(:provider) { :saml }
- def stub_route_as(path)
- allow(@routes).to receive(:generate_extras) { [path, []] }
+ before do
+ request.env['omniauth.error'] = OneLogin::RubySaml::ValidationError.new("Fingerprint mismatch")
+ request.env['omniauth.error.strategy'] = OmniAuth::Strategies::SAML.new(nil)
+ allow(@routes).to receive(:generate_extras).and_return(['/users/auth/saml/callback', []])
end
it 'calls through to the failure handler' do
- request.env['omniauth.error'] = OneLogin::RubySaml::ValidationError.new("Fingerprint mismatch")
- request.env['omniauth.error.strategy'] = OmniAuth::Strategies::SAML.new(nil)
- stub_route_as('/users/auth/saml/callback')
-
ForgeryProtection.with_forgery_protection do
post :failure
end
expect(flash[:alert]).to match(/Fingerprint mismatch/)
end
+
+ it 'increments Prometheus counter' do
+ ForgeryProtection.with_forgery_protection do
+ expect { post :failure }.to(
+ change do
+ Gitlab::Metrics.registry
+ .get(:gitlab_omniauth_login_total)
+ .get(provider: 'saml', status: 'failed')
+ end.by(1)
+ )
+ end
+ end
end
context 'when a redirect fragment is provided' do
diff --git a/spec/finders/users_finder_spec.rb b/spec/finders/users_finder_spec.rb
index 2e94ca5757a..e0a9237a79b 100644
--- a/spec/finders/users_finder_spec.rb
+++ b/spec/finders/users_finder_spec.rb
@@ -45,6 +45,46 @@ RSpec.describe UsersFinder do
expect(users).to be_empty
end
+ describe 'minimum character limit for search' do
+ it 'passes use_minimum_char_limit from params' do
+ search_term = normal_user.username[..1]
+ expect(User).to receive(:search)
+ .with(search_term, use_minimum_char_limit: false, with_private_emails: anything)
+ .once.and_call_original
+
+ described_class.new(user, { search: search_term, use_minimum_char_limit: false }).execute
+ end
+
+ it 'allows searching with 2 characters when use_minimum_char_limit is false' do
+ users = described_class
+ .new(user, { search: normal_user.username[..1], use_minimum_char_limit: false })
+ .execute
+
+ expect(users).to include(normal_user)
+ end
+
+ it 'does not allow searching with 2 characters when use_minimum_char_limit is not set' do
+ users = described_class
+ .new(user, search: normal_user.username[..1])
+ .execute
+
+ expect(users).to be_empty
+ end
+
+ context 'when autocomplete_users_use_search_service feature flag is disabled' do
+ before do
+ stub_feature_flags(autocomplete_users_use_search_service: false)
+ end
+
+ it 'does not pass use_minimum_char_limit from params' do
+ search_term = normal_user.username[..1]
+ expect(User).to receive(:search).with(search_term, with_private_emails: anything).once.and_call_original
+
+ described_class.new(user, { search: search_term, use_minimum_char_limit: false }).execute
+ end
+ end
+ end
+
it 'filters by external users' do
users = described_class.new(user, external: true).execute
diff --git a/spec/frontend/boards/boards_util_spec.js b/spec/frontend/boards/boards_util_spec.js
index ab3cf072357..3601bf14703 100644
--- a/spec/frontend/boards/boards_util_spec.js
+++ b/spec/frontend/boards/boards_util_spec.js
@@ -1,4 +1,5 @@
-import { formatIssueInput, filterVariables } from '~/boards/boards_util';
+import { formatIssueInput, filterVariables, FiltersInfo } from '~/boards/boards_util';
+import { FilterFields } from '~/boards/constants';
describe('formatIssueInput', () => {
const issueInput = {
@@ -149,4 +150,40 @@ describe('filterVariables', () => {
expect(result).toEqual(expected);
});
+
+ it.each([
+ [
+ 'converts milestone wild card',
+ {
+ filters: {
+ milestoneTitle: 'Started',
+ },
+ expected: {
+ milestoneWildcardId: 'STARTED',
+ not: {},
+ },
+ },
+ ],
+ [
+ 'converts assignee wild card',
+ {
+ filters: {
+ assigneeUsername: 'Any',
+ },
+ expected: {
+ assigneeWildcardId: 'ANY',
+ not: {},
+ },
+ },
+ ],
+ ])('%s', (_, { filters, issuableType = 'issue', expected }) => {
+ const result = filterVariables({
+ filters,
+ issuableType,
+ filterInfo: FiltersInfo,
+ filterFields: FilterFields,
+ });
+
+ expect(result).toEqual(expected);
+ });
});
diff --git a/spec/frontend/work_items/components/notes/work_item_add_note_spec.js b/spec/frontend/work_items/components/notes/work_item_add_note_spec.js
index fc907edcac9..9bb84947db5 100644
--- a/spec/frontend/work_items/components/notes/work_item_add_note_spec.js
+++ b/spec/frontend/work_items/components/notes/work_item_add_note_spec.js
@@ -41,6 +41,7 @@ describe('Work item add note', () => {
signedIn = true,
isEditing = true,
workItemType = 'Task',
+ isInternalThread = false,
} = {}) => {
workItemResponseHandler = jest.fn().mockResolvedValue(workItemResponse);
if (signedIn) {
@@ -65,6 +66,7 @@ describe('Work item add note', () => {
workItemType,
markdownPreviewPath: '/group/project/preview_markdown?target_type=WorkItem',
autocompleteDataSources: {},
+ isInternalThread,
},
stubs: {
WorkItemCommentLocked,
@@ -257,4 +259,10 @@ describe('Work item add note', () => {
expect(workItemResponseHandler).not.toHaveBeenCalled();
});
+
+ it('wrapper adds `internal-note` class when internal thread', async () => {
+ await createComponent({ isInternalThread: true });
+
+ expect(wrapper.attributes('class')).toContain('internal-note');
+ });
});
diff --git a/spec/graphql/resolvers/timelog_resolver_spec.rb b/spec/graphql/resolvers/timelog_resolver_spec.rb
index 5177873321c..798d8a56cf5 100644
--- a/spec/graphql/resolvers/timelog_resolver_spec.rb
+++ b/spec/graphql/resolvers/timelog_resolver_spec.rb
@@ -291,17 +291,51 @@ RSpec.describe Resolvers::TimelogResolver, feature_category: :team_planning do
end
context 'when the sort argument is provided' do
- let_it_be(:timelog_a) { create(:issue_timelog, time_spent: 7200, spent_at: 1.hour.ago, user: current_user) }
- let_it_be(:timelog_b) { create(:issue_timelog, time_spent: 5400, spent_at: 2.hours.ago, user: current_user) }
- let_it_be(:timelog_c) { create(:issue_timelog, time_spent: 1800, spent_at: 30.minutes.ago, user: current_user) }
- let_it_be(:timelog_d) { create(:issue_timelog, time_spent: 3600, spent_at: 1.day.ago, user: current_user) }
+ let_it_be(:timelog_a) do
+ create(
+ :issue_timelog, time_spent: 7200, spent_at: 1.hour.ago,
+ created_at: 1.hour.ago, updated_at: 1.hour.ago, user: current_user
+ )
+ end
+
+ let_it_be(:timelog_b) do
+ create(
+ :issue_timelog, time_spent: 5400, spent_at: 2.hours.ago,
+ created_at: 2.hours.ago, updated_at: 2.hours.ago, user: current_user
+ )
+ end
+
+ let_it_be(:timelog_c) do
+ create(
+ :issue_timelog, time_spent: 1800, spent_at: 30.minutes.ago,
+ created_at: 30.minutes.ago, updated_at: 30.minutes.ago, user: current_user
+ )
+ end
+
+ let_it_be(:timelog_d) do
+ create(
+ :issue_timelog, time_spent: 3600, spent_at: 1.day.ago,
+ created_at: 1.day.ago, updated_at: 1.day.ago, user: current_user
+ )
+ end
let(:object) { current_user }
- let(:args) { { sort: 'TIME_SPENT_ASC' } }
let(:extra_args) { {} }
- it 'returns all the timelogs in the correct order' do
- expect(timelogs.items).to eq([timelog_c, timelog_d, timelog_b, timelog_a])
+ context 'when sort argument comes from TimelogSortEnum' do
+ let(:args) { { sort: 'TIME_SPENT_ASC' } }
+
+ it 'returns all the timelogs in the correct order' do
+ expect(timelogs.items).to eq([timelog_c, timelog_d, timelog_b, timelog_a])
+ end
+ end
+
+ context 'when sort argument comes from SortEnum' do
+ let(:args) { { sort: 'CREATED_ASC' } }
+
+ it 'returns all the timelogs in the correct order' do
+ expect(timelogs.items).to eq([timelog_d, timelog_b, timelog_a, timelog_c])
+ end
end
end
diff --git a/spec/helpers/search_helper_spec.rb b/spec/helpers/search_helper_spec.rb
index c0f129cefc3..bbc07e91728 100644
--- a/spec/helpers/search_helper_spec.rb
+++ b/spec/helpers/search_helper_spec.rb
@@ -60,7 +60,7 @@ RSpec.describe SearchHelper, feature_category: :global_search do
expect(search_autocomplete_opts(project.name).size).to eq(1)
end
- context 'for users' do
+ shared_examples 'for users' do
let_it_be(:another_user) { create(:user, name: 'Jane Doe') }
let(:term) { 'jane' }
@@ -153,6 +153,16 @@ RSpec.describe SearchHelper, feature_category: :global_search do
end
end
+ [true, false].each do |enabled|
+ context "with feature flag autcomplete_users_use_search_service #{enabled}" do
+ before do
+ stub_feature_flags(autocomplete_users_use_search_service: enabled)
+ end
+
+ include_examples 'for users'
+ end
+ end
+
it "includes the required project attrs" do
project = create(:project, namespace: create(:namespace, owner: user))
result = search_autocomplete_opts(project.name).first
diff --git a/spec/lib/gitlab/search_results_spec.rb b/spec/lib/gitlab/search_results_spec.rb
index 0d4411a5d41..ce54f853e1b 100644
--- a/spec/lib/gitlab/search_results_spec.rb
+++ b/spec/lib/gitlab/search_results_spec.rb
@@ -292,16 +292,28 @@ RSpec.describe Gitlab::SearchResults, feature_category: :global_search do
it 'does not call the UsersFinder when the current_user is not allowed to read users list' do
allow(Ability).to receive(:allowed?).and_return(false)
- expect(UsersFinder).not_to receive(:new).with(user, search: 'foo').and_call_original
+ expect(UsersFinder).not_to receive(:new).with(user, { search: 'foo', use_minimum_char_limit: false }).and_call_original
results.objects('users')
end
it 'calls the UsersFinder' do
- expect(UsersFinder).to receive(:new).with(user, search: 'foo').and_call_original
+ expect(UsersFinder).to receive(:new).with(user, { search: 'foo', use_minimum_char_limit: false }).and_call_original
results.objects('users')
end
+
+ context 'when autocomplete_users_use_search_service feature flag is disabled' do
+ before do
+ stub_feature_flags(autocomplete_users_use_search_service: false)
+ end
+
+ it 'calls the UsersFinder without use_minimum_char_limit' do
+ expect(UsersFinder).to receive(:new).with(user, search: 'foo').and_call_original
+
+ results.objects('users')
+ end
+ end
end
end
diff --git a/spec/models/timelog_spec.rb b/spec/models/timelog_spec.rb
index 515057a862b..4f2f16875b8 100644
--- a/spec/models/timelog_spec.rb
+++ b/spec/models/timelog_spec.rb
@@ -152,26 +152,66 @@ RSpec.describe Timelog, feature_category: :team_planning do
describe 'sorting' do
let_it_be(:user) { create(:user) }
- let_it_be(:timelog_a) { create(:issue_timelog, time_spent: 7200, spent_at: 1.hour.ago, user: user) }
- let_it_be(:timelog_b) { create(:issue_timelog, time_spent: 5400, spent_at: 2.hours.ago, user: user) }
- let_it_be(:timelog_c) { create(:issue_timelog, time_spent: 1800, spent_at: 30.minutes.ago, user: user) }
- let_it_be(:timelog_d) { create(:issue_timelog, time_spent: 3600, spent_at: 1.day.ago, user: user) }
+
+ let_it_be(:timelog_a) do
+ create(
+ :issue_timelog, time_spent: 7200, spent_at: 1.hour.ago,
+ created_at: 1.hour.ago, updated_at: 1.hour.ago, user: user
+ )
+ end
+
+ let_it_be(:timelog_b) do
+ create(
+ :issue_timelog, time_spent: 5400, spent_at: 2.hours.ago,
+ created_at: 2.hours.ago, updated_at: 2.hours.ago, user: user
+ )
+ end
+
+ let_it_be(:timelog_c) do
+ create(
+ :issue_timelog, time_spent: 1800, spent_at: 30.minutes.ago,
+ created_at: 30.minutes.ago, updated_at: 30.minutes.ago, user: user
+ )
+ end
+
+ let_it_be(:timelog_d) do
+ create(
+ :issue_timelog, time_spent: 3600, spent_at: 1.day.ago,
+ created_at: 1.day.ago, updated_at: 1.day.ago, user: user
+ )
+ end
describe '.sort_by_field' do
it 'sorts timelogs by time spent in ascending order' do
- expect(user.timelogs.sort_by_field('time_spent', :asc)).to eq([timelog_c, timelog_d, timelog_b, timelog_a])
+ expect(user.timelogs.sort_by_field(:time_spent_asc)).to eq([timelog_c, timelog_d, timelog_b, timelog_a])
end
it 'sorts timelogs by time spent in descending order' do
- expect(user.timelogs.sort_by_field('time_spent', :desc)).to eq([timelog_a, timelog_b, timelog_d, timelog_c])
+ expect(user.timelogs.sort_by_field(:time_spent_desc)).to eq([timelog_a, timelog_b, timelog_d, timelog_c])
end
it 'sorts timelogs by spent at in ascending order' do
- expect(user.timelogs.sort_by_field('spent_at', :asc)).to eq([timelog_d, timelog_b, timelog_a, timelog_c])
+ expect(user.timelogs.sort_by_field(:spent_at_asc)).to eq([timelog_d, timelog_b, timelog_a, timelog_c])
end
it 'sorts timelogs by spent at in descending order' do
- expect(user.timelogs.sort_by_field('spent_at', :desc)).to eq([timelog_c, timelog_a, timelog_b, timelog_d])
+ expect(user.timelogs.sort_by_field(:spent_at_desc)).to eq([timelog_c, timelog_a, timelog_b, timelog_d])
+ end
+
+ it 'sorts timelogs by created at in ascending order' do
+ expect(user.timelogs.sort_by_field(:created_at_asc)).to eq([timelog_d, timelog_b, timelog_a, timelog_c])
+ end
+
+ it 'sorts timelogs by created at in descending order' do
+ expect(user.timelogs.sort_by_field(:created_at_desc)).to eq([timelog_c, timelog_a, timelog_b, timelog_d])
+ end
+
+ it 'sorts timelogs by updated at in ascending order' do
+ expect(user.timelogs.sort_by_field(:updated_at_asc)).to eq([timelog_d, timelog_b, timelog_a, timelog_c])
+ end
+
+ it 'sorts timelogs by updated at in descending order' do
+ expect(user.timelogs.sort_by_field(:updated_at_desc)).to eq([timelog_c, timelog_a, timelog_b, timelog_d])
end
end
end
diff --git a/spec/requests/rack_middlewares/omniauth_spec.rb b/spec/requests/rack_middlewares/omniauth_spec.rb
new file mode 100644
index 00000000000..e0401d37d91
--- /dev/null
+++ b/spec/requests/rack_middlewares/omniauth_spec.rb
@@ -0,0 +1,14 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe 'OmniAuth Rack middlewares', feature_category: :system_access do
+ describe 'OmniAuth before_request_phase callback' do
+ it 'increments Prometheus counter' do
+ post('/users/auth/google_oauth2')
+
+ counter = Gitlab::Metrics.registry.get(:gitlab_omniauth_login_total)
+ expect(counter.get(provider: 'google_oauth2', status: 'initiated')).to eq(1)
+ end
+ end
+end